Professional Documents
Culture Documents
A Simple GA Example Problem
A Simple GA Example Problem
Sum=5.083
Calculate the fitness. Then reproduction.
Reproduction consists of forming a new population with the same total
number of individuals by selecting from members of the current
population with a stochastic process that is weighted by each of their
fitness values. We spin the roulette wheel by generating eight random
numbers between 0 and 1. If a random number is between 0 and
0.144, the first individual in the existing population is selected for the
next population. If the number is between 0.144 and (0.144 + 0.093)
= 0.237, the second individual is selected, and so on. Finally, if the
random number is between (1 . 0.128) = 0.872 and 1.0, the last
individual is selected.
Individual 1
Individual 2
Individual 3
Individual 4
Individual 5
Individual 6
Individual 7
Individual 8
The eight random numbers generated are 0.293,
0.971, 0.160, 0.469, 0.664, 0.568, 0.371, and
0.109. This results in initial population member
numbers 3, 8, 2, 5, 6, 5, 3, and 1 being chosen
to make up the population after reproduction, as
shown
The next operation is crossover. Crossover is the process of
exchanging portions of the strings of two “parent” individuals.
An overall probability is assigned to the crossover process,
which is the probability that, given two parents, the crossover
process will occur. This crossover rate is often in the range of
0.65 to 0.80; we select a value of 0.75 for the sample problem.
• The best criteria is to check the algorithm has ‘converged’ or not, i.e, whether
many candidate solutions in the current population are so similar to one
another that no further progress is likely to occur in the next few generations.
This you can implement by examining the variance of the population fitness.