My bot has played two more games, and legitimately won both. But while I was thinking last night I came up with a bad realization: since my bot runs from enemy ants, it would run away from protecting the hills. This could allow a single ant to capture a hill that had lots of ants around it.
This hasn’t happened yet. I’d better put a fix in before it does.
My entry for Google’s Fall 2011 AI Challenge has been posted. In it’s first game it pulled out a decisive victory, in that it was gathering food but none of the other bots were. Still, it’s up there.
Current intelligence rating: badly sleep deprived toddler.
Right now, the logic is pretty simple. For each ant it works through a list of objectives, making the first move that an objective returns. It tries to raze opponent’s hills and gather food, all while running away from enemies. If it can’t do either of those, it will basically make a random move. There is code to prevent the ants from cycling between two squares, but it has an unintended consequence. The ants aren’t allowed to go back to the last square they were on. The leads to ants trapped on little islands surrounded by water (there are five such trapped ants in the shot above).
On the whole it works well. Since my colony spends so much time gathering food, it grows fast. The cowering I built into them helps keep them alive, and the random walking combined with the food seeking provides some exploration. In the end, the colony can grow pretty large and they tend to stay clumped up. I’d imagine I’m no match for the good bots, but I should be able to survive OK.
As I post this, there are only 25 Clojure based bots. I’m hoping to make a good showing on the list. That’s my main goal.
Do you have a stuffed monkey who is always causing trouble? Do you have a 3D printer? Well thanks to my latest item on Thingiverse, you can easily keep him corralled. With a gate that slides open for easy access, you’ll still be able to take him out to show off to friends at parties.