Project #2a – Genetic Program
Due Oct 9th
This is the first subproject of the GP project. The goal of this subproject is to create and evaluate a population of GP individuals for either a symbolic regression problem or a robot control program such as the Santa Fe Trail problem. For this subproject you do not need to include mutation, crossover, or selection.
If you want to use it, or refer to it, I have written a node and an individual class that uses pointers to build and evaluate random expression trees. Trees are build of nodes, which point to each other.
To compile the test main program use:
g++ test.cpp node.cpp individual.cpp
For this subproject you only need the following functionallity:
- Generate random individuals.
- For symbolic regression the individuals should have, at least, the non-teminals: +, -, *, /.
- For the Santa Fe Trail problem the individuals should have, at least, the non-teminals: progn, iffoodahead.
- For symbolic regression the individuals should have, at least, the teminals: X1, X2 (i.e. two input variable) and constants.
- For the Santa Fe Trail problem the individuals should have, at least, the teminals: Turn Left, Turn Right, and Forward.
- The ability to copy individuals.
- The ability to evaluate individuals.
- The ability to erase individuals.
- The ability to calculate the size (number of terminals and non-terminals) of individuals.
- The ability to create a population of individuals and to find the best and average fitness of the population, and the average size of the individuals in the population.
Individuals should represent expression trees. They may be coded as trees or in some other data structure such as an array. For now you may choose your own fitness function, i.e. for symbolic regression choose your own set of X1, X2, and y points that the GP should evolve an expression to fit and for the Santa Fe Trail you may choose your own trail.
- Project Write-up: Write a short status up-date describing the results of your project that includes the following sections:
- Individual description – Description of the structure of your individuals. Be careful to include all of the details someone would need to replicate your work.
- Results – Basically, does it seem to be working. Include a list of the fitness from the randomly generated population and print one of the randomly generated individuals.
- Conclusions – If its not working, why not. And what are then next steps to complete the project.