AI Ants
Posted: Sat Mar 10, 2012 5:27 pm
Artificial Intelligence Ant Colony
This version has ants that move simultaneously. If two or more ants attempt to move to same square, none will move.
The ants see only the themselves and the eight squares around them. Each ant has a behavior that may change and a memory that indicates the location of the colony.
Behaviors:
new ant - remember nest location, choose random direction to search
searching - pickup food if found and head for nest, otherwise keep searching
return to nest - take direct route to nest
panic - (if running out of food) return to nest but stop and get food from nearby ants
I avoid permanent traffic jams by making the ants move randomly every once in a while.
The cells that have been traveled are colored. No pheromones are used.
This version has ants that move simultaneously. If two or more ants attempt to move to same square, none will move.
The ants see only the themselves and the eight squares around them. Each ant has a behavior that may change and a memory that indicates the location of the colony.
Behaviors:
new ant - remember nest location, choose random direction to search
searching - pickup food if found and head for nest, otherwise keep searching
return to nest - take direct route to nest
panic - (if running out of food) return to nest but stop and get food from nearby ants
I avoid permanent traffic jams by making the ants move randomly every once in a while.
The cells that have been traveled are colored. No pheromones are used.