So the chromosome strands undergo a crossover of genetic material, which leads to a unique new individual. As if this were not enough, genetic material can undergo mutations, resulting from imperfect crossovers or other external stimuli. Although mutation is rare, it does lead to an even greater diversification in the population. It must be noted however that a significant number of mutations are harmful and can destroy good genetic code, so the rate of mutation must be low in order to prevent severe degradation of the genetic code. Genetic Algorithms Genetic algorithms are modeled closely on the ideas presented above.
GAs maintain string structures that are analogous to chromosomes.
The gene idea maps to the elements within the string and the values stored in these string elements are analogous to alleles. The strings are rated by a fitness function . Strings are then selected for mating based on their ratings. When the strings are mated, crossover may occur, with a new child string being formed from parts of both parent strings. Mutation may also occur within the child string, based on a low mutation probability.