I have decided that after I eat dinner, I am doing this full on. It will be way more worthwhile an activity than playing video games, which is probably what I was going to do tonight otherwise. Anyone else out there want to have a go at it?
Apparently all accounts will be purged tomorrow. It's beta right now.
Simply applying the A* results to the tutorial bot will make a tremendous improvement, and should be a very formidable bot. The tutorial often has ants that go back and forth forever in a loop, and A* will solve that. Once I add 5-10 more simple obvious improvements on top of that, it will be an easy ride up near the top of the charts. Then it will be an insanely hard ride to get even higher.
My general plan to have dynamically changing priorities. I'll program behaviors for exploration, growth, attack, and defense. Then each turn the four priorities will be reordered and ants will be allocated to the four different behaviors accordingly with most ants performing the highest priority task and the fewest doing the low priority task.
I actually want to try an AI based solution. Maybe something as simple as randomly select an action from the available action types, record the ants surroundings at the time, the action chosen, and the net value of the "turn" based on the change in score. Save that off to a seperate file, and repeat till you have an approximation of which actions are "good" in a given scenerio. Let that cook for a while, then use the data to seed your next set of actions (but keep calculating and improving). I have no idea how poor that would end up being, but it sounds like fun to test.
Maybe you could get around this rule by storing your data in a web service and connecting to it via an API. Even if they allow this, I see a high chance of your bot dying if there is a network hiccup. Remember, if you miss one time limit then you are done and all your ants sit still forever.
Oh, also, my ants are dwarves with randomly generated names.
I'm still having timeout situations on larger maps. I have to figure out what's causing that.
Also, because my guys are so good at finding the shortest path, they often make a bee-line for an enemy hill. But they don't clump up, so they die marching single file on the shortest path to their doom. I need to have some sort of formation strategy.
I haven't submitted this bot yet because it times out. I have submitted the tutorial bot, and it does surprisingly well. I'm amazed at how many people have submitted bots that are worst than the tutorial!
One idea I've had as a starter is to designate ant classes. The "worker" ants might use a* exclusively for food, while the "warrior" ants (maybe 50/50 split?) group up and only use a* once for the entire pack to hunt down nests. They would need to know how long to wait grouping up too. One warrior is designated general after the cluster is formed... you check path for him only (unless he dies), and all the other ants in the pack just try to move the same way. If the general moves up, they all try to move up. It's clumsy, but perhaps practical to get you one step closer to a base-line?
One thing I am definitely going to do is something I saw when I looked at the top bots. Remember, even if ants can shoot further than they can see, they would need a spotting ant to actually do the seeing for their "artillery". That means almost all of the time you can stay perfectly out of range of enemy ants. The behavior I saw on a really good bot was that when an enemy was encountered to stay just out of range. Then put out a rallying cry for other ants. And when the tide was turned, attack. Basically, an ant never has to step in an unsafe square. I'm going to implement something along those lines. Even if my ants are attacked from both sides, they will be squished together into a formidable force that will have a good chance for survival or doing as much retaliation damage as possible.