BerryBots updates

Jump to navigation Jump to search
Revision as of 14 August 2013 at 23:07.
The highlighted comment was created in this revision.

BerryBots updates

So I try not to spam you guys too much about BerryBots, but maybe I'll post about some of the bigger stuff.

A couple people have posted bots on the forums recently (both Robocoders):

  • Frohman posted the first public bot, Insolitus, a battle bot that beats supersample.BasicBattler in 1v1 and draws about even with it in Melee (which means it also crushes the other samples). Some type of antigravity movement and linear targeting.
  • Justin (of DemonicRage) has a bot called NightShade. It's the strongest 1v1 bot for now, also supports races and mazes, and has pretty sexy debugging graphics.

Next big thing coming is the Game Runner API, which I'm pretty excited about. I have it working now, probably releasing it in a week or two with some polish and related changes to results handling. Some cool things are that it handles multi-threading for you and makes it really easy to prompt the user for inputs (seasons, threads, ships, stages, etc). You launch a Game Runner script through the app kind of like starting a battle.

    Voidious22:31, 7 April 2013

    Just released v1.2.0 with the Game Runner API. I think it holds up pretty well in a comparison against the Robocode control API - it handles multi-threading under the covers, lets you configure input parameters and prompt the user for those fields with a graphical dialog, and includes some examples that do basic batch battles or a single-elimination tournament.

    I feel like this was the final prerequisite to the kind of real bot development like I'm used to. So I'm pretty stoked on that. :-)

      Voidious02:50, 22 April 2013
       

      And now that Game Runner is out, I added a leaderboard for the LaserGallery stage. Might work on a gun myself sometime soon: LaserGallery/Scores

        Voidious16:12, 22 April 2013
         

        This is pretty cool - HTML5 replays: 6-bot melee on battle1

        (Sorry, seems broken on Linux/FireFox, still troubleshooting that one.)

          Voidious05:14, 6 May 2013

          Wow, that is awesome!

            Skilgannon08:06, 6 May 2013
             

            Very impressive!

              ABC12:09, 6 May 2013
               

              I finally got around to writing a learning gun for BerryBots. At first I was just out to port Rednaxela's kd-tree to Lua, since I thought that was a prerequisite to the gun I wanted, and a prerequisite to testing correctness of a kd-tree is writing an optimized linear KNN search. But once I had a linear KNN search, I realized it would be plenty fast enough to run the targeting challenge stage, which is only a few thousand ticks per enemy with a decent gun, so I built out the rest of the gun.

              So it's mostly just KNN with waves / displacement vectors. A precise MEA and GuessFactors is probably worth pursuing. But I think the next thing to start to handle is the presence of walls, which has a lot of ramifications.

              It came out pretty good: testgun.lua. Not much code, runs pretty fast, reasonably effective. And it's a new high score on Laser Gallery.

                Voidious (talk)00:26, 14 August 2013

                Ahh, neat.

                With regards to handling the presence of walls, that's a case where I see the utility of PIF versus displacement vectors and guessfactors as being significant. Guessfactors aren't really well-suited to the presence of walls. Displacement vectors allow you to handle walls occluding where they end up. PIF however allows you to handle not only walls occluding where they end up, but also handle ruling out paths which would be interrupted by walls.

                  Rednaxela (talk)15:04, 14 August 2013
                   

                  Yeah, agreed that PIF has some key advantages. Checking wall collisions every PIF tick might be slow, I'm not sure. There's no trig, but it would be (# walls) * (# projections) * (# ticks per projection) line intersection checks - not sure how much that adds to the PIF CPU load.

                  I'm excited to try this in Melee, too, since you can see everyone at once. Though I may need that kd-tree pretty quickly.

                    Voidious (talk)16:56, 14 August 2013

                    You don't need to do that many line intersection checks. If you store your walls in a tree (i.e. r-tree or bucket kd-tree), or even a sorted list (sorting by one of the two axis), you can avoid needing to check every single wall by quickly ruling out large groups of walls that are too far away.

                    If your robot is using a pathfinding algorithm to navigate the walls, you could re-use the that structure to find which walls you need to check (if any) to avoid needing new structures to search walls (i.e. track the current pathfinding node, and use that node's information to know which boundaries to check on a tick if any).

                    To save per-tick iterations, you can also use a trick I've used and seen used in PIF implementations: Based on the minimum number of ticks away waves/walls are, you can skip ahead in your PIF history, ignoring all the ticks inbetween.

                    In other words... nah... you can more or less put the (# walls) term inside a log(n), and reduce the (# ticks per projection) to something significantly smaller too

                      Rednaxela (talk)00:07, 15 August 2013