CS472 Evolutionary Computation
Assignment 4
(Genetic Programming)
|
250 points
|
|
DUE: Wed Nov 19 at 5pm PST
|
|
The problem
The classic problem in genetic programming is the "Santa Fe Trail
problem" or "The Ant on the Santa Fe Trail" or just "The Ant Problem".
In this problem the ant is a robot. It lives on a 32x32 torodal grid.
It has a position on the grid and a direction it is pointing (one of
the four cardinal directions). It executes an program in the form
of a expression tree. The tree is composed of operators:
| function | printing name | number operands | description |
|---|
| move | mv | 0 | move one step in the direction headed |
| right | rt | 0 | change heading 90 degrees to the right |
| left | lf | 0 | change heading 90 degrees to the left |
| if-food-ahead | if | 2 | if food in the direction pointed then do left child else do right child |
| prog2 | pg | 2 | do both left and right children |
This is an extremely simple language as far as GP goes. As the
tree is evaluated, every time move, right or left is seen the robot
performs the action and one time unit is consumed. When 400 time
units are consumed the robot stops. Every time a move lands the robot
on a food particle in the world, the robot eats it (destroys it) and
gets a point. The number of points collected at the end of 400 time
units is the fitness of the robot, assuming the ant starts out in the
empty cell in the upper left corner (cell (0,0)). The official world
has 89 particles on a the map (see tar below).
Here is an example program written out in a Lisp-like way:
(if mv (pg rt (if mv (pg rt mv))))
Your task is to write a GP that will evolve a program that when given
to the ant will cause it to score 89 points in the allotted time.
Your answer should be a tree with under 50 nodes and hopefully as
short as possible.
Resources
Here is a tar file of some useful tree
code and the map. The tree class provides support for user
defined operators of up to arity 2 and a check() function to vet your
trees. You can use this if you like or write your own. Ask me if you
want to use any other tree library.
What to Turn In
Turn in a full data rich two page report in pdf describing
compactly what you did including all the parameters of your evolution,
your performance results (graphs would be nice), what didn't work,
your conclusions and advise for people on how to solve this problem.
Tell me what was your best solution and how many food particles it
got. You should be able to get at least 85 particles in under 10 min
on Wormulon. Do NOT double space the report. Also turn in your code
in a form with a makefile that lets me build it and run it on
Wormulon.
Submission
Homework will be submitted as an uncompressed tar file to the
homework submission page. You can
submit as many times as you like. The LAST file you submit BEFORE the
deadline will be the one graded. For all submissions you will receive
email giving you some automated feedback on the unpacking and
compiling and running of code and other things that can be autotested.
I will read the results of the runs and the reports you submit.