James and I wrote this for CS 405, Artificial Intelligence. the Google Code location for the program is here:
http://code.google.com/p/geneticalgorithm/
The Premise of the program is quite simple. The user inputs 3 integers between -25 and 25. The three integers are then used the variables A, B, and C in the function y = Ax+By+Cz.
The goal is to manipulate x y and z in-order to obtain the lowest absolute value for y. Even though an input of 0,0,0 for x y and z would always yield a minimum value we ignore this fact for the purpose of exploring genetic algorithms.
Our program creates a random population size where you specify the number of generations. The population is then subjected to crossover, mutation and reproduction algorithms for the specified number of generations. Each individual is evaluated using the function. The better the evaluation the more likley it is to be mutated, crossed over, or reproduced (copied) into the next generation. After the specified number of generations the best XYZ set found thus far is displayed as the answer.
Collin Schroeder
