f(x1,x2) = 21.5 + x1 * sin(4*pi*x1) + x2 * sin(20*pi*x2)
over the range -3.0 to 12.1 for x1 and 4.1 to 5.8 for x2.
Use a 30 bit encoding for each of the variables x1 and x2, that is, the total chromosome length will be 60 bits. You will have to think carefully about your encoding scheme since x1 can take on negative values!
Use the stub app_report() to print out the floating point values of (x1,x2) for the best fit chromosome.
For comparison, try simple_ga_prog from the class directory on the same problem. Remember that each chromosome gene in SGA-C is a bit, whereas in simple_ga_prog each gene is a real number.
For both programs, vary the population size, the crossover probability, and the mutation probability to see what works best.
This programming assignment is due in class Monday, April 22, 1996.
There are three things to turn in electronically using the submit command:
Use the submit command to turn in file copies of all of the above. Place them in the Pr2 directory of MCS770. No more laserprinter and paper!