Parameter representations for a Simple Genetic Algorithm (SGA)


Use this simple genetic algorithm to solve the first four DeJong functions. They are listed on page 108 in the textbook and are also available here

Here is what I would like to see in terms of results and what you will be turning in.

I would like to see a graphs of performance (fitness vs time (generation)) for each of the functions averaged over at least 30 runs. These graphs should show the average of the maximum fitness in the population for every generation, the average of the population average fitness for every generation, and the average of the minimum fitness in the population for every generation.

If you are up for a challenge, you can try to solve the 3-bit adder problem (adding two 3 bit numbers for a 4 bit answer by using the evaluation function double eval(int *vec) in evalA.o that expects a 300 bit int vector. Maximizing this function and getting a fitness of 256 = 64 * 4 means that you have designed a 3-bit adder. You need not use the canonical GA but a GA with other kinds of selection, crossover, and mutation. You might also want to try your hillclimber.

However, you might want to start with the simpler 2-bit adder problem before you look at 3-bit adders. Here is evalA2Bit.o object file containing an eval(int * vec) function that expects a 120 bit vector and returns a double.

I would like to see the following graphs for every De-Jong function. On each graph, plot max-avg, avg-avg, min-avg fitnesses over 30 runs.

  1. pX = 0.7, pM = 0.001
  2. pX = 0.7, pM = 0.01
  3. pX = 0.7, pM = 0.0001
  4. pX = 0.3, pM = 0.001
  5. pX = 1.0, pM = 0.001
This will enable you to understand how the genetic algorithm performs when you change the exploration-exploitation tradeoff by manipulating the probabilities of crossover and mutation. The lower the probability of crossover/mutation, the less exploration and the more exploitation the GA does. You should see this reflected in your graphs.

If you attempt the optional adders, I would also like to see a table with your GA's parameters and performance graphs that are averages over 30 runs for those parameter values that get you highest performance, reliability, and speed.

Here are the functions as shown in the book

Ensure that you stay below 5000 function evaluations. Explore combinations of population size and number of generations to run in order to achieve maximum performance.

Turn in a PDF with:

For each DeJong function:

  1. The name of the DeJong function and the five graphs corresponding to crossover and mutation probabilities above and for the population size and number of generations that maximizes your genetic algorithm performance.
  2. Answer: What was the minimum and how close did you get to the minumum
  3. Answer: How reliable was your GA in finding the minumum?

Good Luck Let me know if you need more disk space.


Sushil Louis