Genetic Algorithms: Aroob Amjad Ahmed
Genetic Algorithms: Aroob Amjad Ahmed
The main purpose of the first example of genetic Fig. 3 Histogram of population of the best individual
algorithm is to find a simple 1D list of integers of n- The graphical representation of genetic
size with zero in all positions.
algorithms consists of different plots representing
The evaluation function we have defined, returns different colors and lines in the axis, all shown for
a raw score of 3.0 if the list passed as a parameter 20 generations.
contains the values 1, 2, 3, 8, 0, 2, 0, 4, 1 and 0. The error bars (raw scores) graph has green
The plots shown after evolving the algorithm are vertical lines (showing maximum and the minimum
raw scores of the current population at generation
indicated in the x-axis) and blue lines (representing
average raw score of the population) (e.g. Fig. 4).