Next: 2 Ant Fitness Assessment
Up: 1 Artificial Ant
Previous: 1 Artificial Ant
The functions and terminals are executed to
move the ant on the grid during evaluation.
The typical functions include:
The last two functions are simple sequencing functions.
The following terminals provide the `ant' with locomotion and change of
- if_food_ahead(a,b) : if the `ant' faces a food pellet then evaluate
a, else evaluate b,
- progn2(a,b) : evaluate a, then b, returning b's value, and
- progn3(a,b,c) : evaluate a, b then c, returning c's value.
- left : turn the `ant' left by 90 degrees,
- right : turn the `ant' right by 90 degrees, and
- move : move the `ant' forward by one square/step.