Next: Implementation in C++
Up: Implementation in C
Previous: Results
Several things could be done to speed up the performance of the
simulation:
- Better implement the garbage collection and the memory
allocation routines. One does not need to constantly free and
malloc memory that probably will be recycled again. An
intelligent stack approach to keeping already malloc'ed memory
will speed up performance, but will not be so ``nice'' to the OS.
- Use the nodecount to reduce the amount of redundant
computation. Currently, each member of the population has its
nodecount recomputed every generation. If this information were only
computed in the first generation, then any additions and subtractions
due to crossover can be taken care of intelligently by only computing
the size of the subtree that is taken away/added to the member.
This would require some rewriting of the current algorithm.
Please see the end of this paper for the C code that implements this
problem, and the genetic programming algorithms.