My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Links

I worked on this code and was able to place at a high of ~240/~480 in the competition. I ended at a point at which I was kind of bored working on it. Here's the competition page. You'll need some files there to actually run the bot. Google AI Challenge


Strategy

  1. I tried to implement painter's flood fill per Wikipedia. This worked okay and I got to around ~300.
  2. Then I implemented A*. The strategy was to get within 5 squares of the enemy, and then flood fill. My reasoning was that if I had a better fill algorithm, I would win at that point.
  3. Next, I tried to implement minimax with alpha-beta pruning. It's not tested, but it should be fairly close. All I am missing is a utility function (well, that is probably the most impt piece!). For the utility function, I wanted to bisect the playing field by finding the perpendicular bisector between the players, then flood-filling to determine the number of blank spaces in each player's respective region. I have the bisection algorithm done, but got bored once I started implementing the flood fill.
Powered by Google Project Hosting