Our Ant

We submitted one ant to the competition which was pretty much a combination of all the good ideas the two of us could generate. In the end though, the ant is really based around two key tactics.

Highways

The first tactic is highways. At the beginning of the game, our ants take a little time to mark out our base in a 0 - 1 - 2 repeating pattern. When that's done a group of our colony takes off in each of the six directions extending this pattern outward. This forms highways.

Unfortunately, these don't help us find food any faster than a random ant. In fact, they cost us a good chunk of time to build. It usually pays off though. Our ants still have to sniff around for food piles, but once they have some, they just have to make it to the nearest highway. That's a lot easier to find than a tiny little base. Once a highway is located, it's as simple as counting to walk straight home. Even ants can handle that.

Tim found a nice optimization for searching for the highways on the final day of the contest. Our poor little ant carrying food was working his nose off to try and find the highway. He would check Ahead, LeftAhead, RightAhead, and Here at each step. To find the road, he would need to see a Marker 0, 1, or 2. Since you have to check for those separately, that was a lot of work. To counter that, we modified the road builders to lay a Marker 3 at each step, in addition to any other Markers. That cut our road search work by two thirds, giving the ants more time to gather food. Yummy.

We really tried to find an intelligent way to build smaller roads from the highways to piles of food, but couldn't seem to conquer that problem intelligently in the time we had.

Hoarding

Our other tactic involved keeping the food we found. We realized early on that ants could come take food off our base and we didn't like that one bit!

The first step was to build a safe zone to store food in. Tim found the perfect solution, pictured to the right with red ants. These Guard Ants are setup early in the game, their brain dropped into an infinite loop. The advantage is two holes that cannot be entered by enemy ants. Any opposing ant reaching our food stores is surrounded and dies, adding to our spoils as a bonus. Guard Ants are arranged so that they are immortal. It's impossible to surround them.

At that point we trained out ants to deliver food only into those holes. That's when everything fell apart. Important tip: 70 some ants trying to get in an out of 2 holes can create quite a traffic jam. Not good.

Knowing that, we taught one more ant a new trick, food delivery. We modified gathering ants to bring food into the ring of open base just outside the Guard Ants. The Delivery Ant circles this path, grabbing deposited food and dragging it into the nearest hole. This lone ant can't always keep up with the load, but he saves more than he misses, by no small margin.

Having worked out this strategy, we couldn't sleep soundly with our ants entering the opponents base and we forbid them to go there. This actually hurt our results against our weak test ants, but we still felt it was right. We couldn't fall for our own trick.

The whole time we were building this trick, we were secretly hoping for an opponent who would try a base raid strategy...

Files

Here are links to the contest submitted ant and the much easier to read higher level code.

Contact Team Road Crew

If you would like to contact our team, you are welcome to mail James.