3.4.2 Genetic Algorithms

- Adaptation of species to external conditions: optimization

- Adaptation strategy itself has evolved over time: sexual reproduction

More sex:

Consider some oscillatory function of a single variable, having one global minimum within the range of definition, . Find with .

- Start with a
*population*of randomly chosen numbers (*individuals*), . ( is kept constant.)

- ``Gene'':*bit string*of

- ``Fitness'': low = high fitness and vice versa

- Relative fitness (probability of reproduction): . This is a probability density, and is its cumulative distribution function. - Draw individuals in accordance with their reproduction
probability (Transformation method!).

The new population is fitter than the original one. However, thus far we have remained at the level of primitive selective reproduction without mutation or sexual crossover. - Pick pairs of individuals at random and submit their genetic strings
are to crossover:

() Draw a position within the bit strings; () swap the bits following between the two strings. The number of such pairings, the ``crossover rate'', should be around . The resulting set is called the*offspring*population. - Finally,
*mutation*comes into play: within each string every single bit is reversed with a probability .The resulting population is regarded as the next generation, , and we are back at step 2.

See also: