Saturday, October 2, 2010

Some weaknesses in my bot

My bot in the Google AI contest has a few clear weaknesses.  I am sure it has other ones, but these big ones mask any other problems.  Both are mainly because I ignored some issues when coding, and hoped that what I had would be good enough.  The code was fine for a while, but won't be much longer.

Here are the problems I know exist.

  1. The bot is overly aggressive about defense.   It hardly does any.  Often, it will throw a ton of ships at another planet, and then lose the source planet.  For people in the contest... yes, my bot loses occasionally to RageBot.
  2. The bot is overly conservative about taking neutral planets.  Watching these games, it is usually clear that the bot could have taken over one or several neutrals without a problem.  
  3. The first two issues interact with each other.  Trying to fix either makes the other even worse.
I am sure some people have found other problems, but I cannot see past these big ones.    Feel free to let me know, though, I'd appreciate the help.

Here is a unique game that I lost.  I like how voidptr's bot abandons ship all over the place, and makes better use of his resources.  [Thanks to Naktibalda for his Planetwars pastebin!!]


Anonymous said...

I think you were doing great until turn 49, and actually ignoring neutral planets is working. Look at the board-- you have a ship advantage and you have better field position. The enemy's growth advantage does him no good, and it's your game to lose.

Your planet with 214 ships is situated near the heart of enemy territory. Within just a few turns you could take a good chunk of his central production. He's got a lot of ships already committed way on the bottom of the board, and it will take time to get them turned around. By the time he does, you will have already won.

But what you do is send 128 ships way into the backfield at a medium-growth planet. Those ships will hang in the air for 11 long turns while the enemy gets his act together and breaks your supply line. By turn 70 you are split in two, and it's basically over.

I think the way to handle this situation is to ensure that your targeting heuristic takes into account the distance from the candidate target to other targets. You want to take targets that improve your field position, especially if you are going to overcommit ships to them.


Dave said...


Thanks for the comment.

This mistake was a combination of two of my heuristics. The targeting heuristic might have been fine on its own, but then I have a reinforcement heuristic that immediately kicked in. As you said, it should try to move my extra ships to somewhere more useful, instead of just to the closest planet that is closest to an enemy (which is what it is doing here.)

I am trying to redo my bot now so it is aware of more "strategic" plans, instead of just tactical. The older version of the bot is almost purely tactical, except in the way it assigns priority to targets. Your suggestion will go into the new bot, if I can get it working :) My biggest goal is to keep all of my heuristics simple. In the previous ai competition, and at places like TopCoder, I have learned that if I make something too hard, I'll never get it working.

Thanks again!


Ed Burnette said...

Looks like you're doing very well in the contest so far. The only US contestant in the top 10.

Dave said...


Thanks, that is kind of you to say. I really need to write some more here about how things are going. The bot from this post is not my current submission. My current one is better, but the new top bot is just a world apart from the rest of us.