Next: II. Differential Equations Everywhere Up: 3.4 Stochastic Optimization Previous: 3.4.1 Simulated Annealing

## 3.4.2 Genetic Algorithms

Evolution of biological systems:
- 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 .
1. 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.
2. 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.
3. 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.
4. 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.

EXERCISE: Apply the simple genetic algorithm to find the minimum of the function within the interval .

Next: II. Differential Equations Everywhere Up: 3.4 Stochastic Optimization Previous: 3.4.1 Simulated Annealing
Franz J. Vesely Oct 2005