Herself’s Artificial Intelligence

Humans, meet your replacements.

SantaFe Ant Trail

without comments

The SantaFe Trail is a textbook beginner’s problem in genetic programming. The ants are allowed to turn right or left or to move forward. Ants can see food if it is directly in front of them. The Trail is the one in the image above and it is also in the source code.

Ants follow two finite state machines, one if it sees food, another if it does not see food. Optimally the see food machine would only have move forward. But we let nature decide that.

Ants are created, given a random set of instructions and move one instruction each cycle. Then entire swarm moves a given number of cycles, then a new generation is born. The top half of the food finders in the generation mate. One mate contributes the ‘see food’ states, one the ‘doesn’t see food states’ and one move is randomly changed in each string of moves. The population is kept at a constant number.

Source Code:
Santa Fe Ants ( Java )

Papers:
Cartesian Genetic Programming (pdf )
Selection in massively Parallel Genetic Algorithms
Ant Algorithms for Discrete Optimization

See also:
Evolutionary AI

News:
Artificial Intelligence: Riders on a Swarm

Written by Linda MacPhee-Cobb

June 23rd, 2008 at 5:00 am

Posted in source code

Tagged with

Leave a Reply

You must be logged in to post a comment.