The following two Flash(c) animations illustrate the processes of Selection and Crossover.
Selection
This is where the a number of individuals of size probability P(s) are chosen in proportion
to their fitness in relation to the fitness of the whole population.
Crossover
A number of these selected individuals of size probability P(c) are taken two at a time, a
random point is chosen on their genotype sequence and they exchange genotype bits from that point.
Two new individuals are therefore produced.
The individuals not selected for crossover have in effect undergone asexual reproduction from
their parent and are just copied to the new generation along with the newly created ones;
the parents of all the individuals are not copied.
Fitness Objective
The objective of the fitness function used on the GA below, is to maximize the number of 1's in the
genotype of the individual.
|