4.5 Optimization with Genetic Algorithms
4.5.2 The Genetic Algorithm operation concept
A genetic algorithm is a kind of artificial evolution. What evolves is a population of solutions to a problem; each solution is an individual in the population. Individuals are born, mate, reproduce, are mutated and die as in natural systems. Furthermore, advantage is given to the more fit individual to live longer and produce more children. A very clear description of the method that these operations are accomplished is given by Falkenauer [12, pp. 29–30]:
GAs are applied to a problem as follows:
1. The search space of all possible solutions of the problem is mapped onto a set of finite strings over a finite (usually very small) alphabet. That is, an encoding is chosen, such that each point in the search space is represented by a string called chromosome. The GA will work with these representations of solutions, rather than with the solutions themselves.
2. An initial population of solutions is selected. This first generation is usually selected at random. Unlike standard optimization tech- niques, a GA performs a parallel search over a set of points in the search space, thus lessening the probability of being stuck in a local optimum.
3. A fitness is computed for each of the individuals in the population, reflecting the way each individual is, in comparison to the others,
nearer to the optimum. This value expresses the observed quality of the solution each individual represents.
4. The more fit individuals are selected according to a noisy selec- tion, i.e. individuals are selected randomly, but with probability increasing with fitness. The GAs are thus essentially a stochastic (randomized) optimization technique.
5. The selected individuals form the parent set—they are crossed over (by pairs) to produce their progeny. A crossover consists in joining together non-corresponding bits of each parent in order to constitute two new individuals.
6. Another noisy selection is performed, this time biased towards the less fit individuals. These are replaced by the progeny obtained in the previous step. Unlike standard optimization techniques, the GAs proceed by replacing the weak part of a population with new individuals, rather than replacing the current best solution with a new candidate.
7. A small part of the resulting population is mutated, i.e. small ran- dom changes are made in a few randomly selected individuals. In some GA applications, a small randomly chosen portion of the pop- ulation is also subject to another genetic operator, the inversion— genes, while retaining their meaning, change their position on the chromosome.
8. At this point a new population has been constituted, and the op- timization process starting at point (3) can be repeated. GAs are thus iterative algorithms.
The above description is illustrated schematically in Figure 4.5.2. The outcome of a GA is not a series of generations of random solutions. Instead, generations of solutions gradually improve and better children are produced; the procedure, albeit randomized, is consistently directed towards better solutions, until the optimum solution is reached. This process is based on two fundamental concepts of GA operation: Selection and recombination.
Specifically, the GA evolves a population of solutions by recombining parts of the solutions (called building blocks) that are present in the population, in order to build new, improved solutions. The idea of recombination of genetic material is fundamental in every GA and implies that each one of the individuals may contain useful features, i.e. building blocks of the optimum solution. A genetic algorithm’s power depends very much on the ability to effectively recombine the building blocks that are contained in the population to build new, improved solutions.
To provoke evolution, the GA assumes that the building blocks of an improved solution are most likely to be found among the best individuals of the population. Therefore, selective pressure is imposed on the population. All individuals mate and reproduce but more fit individuals are given advantage over less fit individuals: they reproduce with higher probability and the their features are given more chances to propagate in the population and be combined with features from other individuals. From this viewpoint, population diversity is important. Highly fit individuals are promoted but less fit individuals are not useless and are also given some probability to survive, albeit small. If we impose very strong selective pressure, that is, if
Sec. 4.5 Optimization with Genetic Algorithms 111
1. Choose a population of points θ1= £ 3 5 8 17¤T θ2= £ 9 21 140¤T .. . θ100= £ 13 6 17 4¤T ↓ 2. Encode the population
I1=101101110110 . . . 10100100101111 I2=110010101000 . . . 00101011010101 .. . I100=001101000101 . . . 01001100010011 ↓
3. Compute fitnesses and choose individuals F (I1)=23 Tournament! F (I2)=3 F (I3)=37 I17—vs.—I82 .. . −→ F (I99)=55 I94—vs.—I62 F (I100)=49 ↓
4. Mate individuals (winners of tournaments)
. . . 1010100 | 1101011 . . . . . . 0000101 | 1101011. . .
−→
. . . 0000101 | 1100111. . . . . . 1010100 | 1100111. . .
↓
5. Replace parents or less fit individuals ↓
6. Mutate
. . . 00001010 1 101011. . . −→ . . . 00001010 0 101011. . . . . . 101 0 1001100111 . . . −→ . . . 101 1 1001100111. . .
↓
7. Return to step 3 to compute fitnesses of new individuals
we give too much advantage to the very fit individuals from the beginning of the evolution, we run the risk that a few, initially more fit individuals, reproduce and mate in excessive rates compared to the rest of the population. Then, the GA population loses its diversity quickly and converges to a population that is dominated by the offsprings of these few individuals. This phenomenon is called premature convergence.∗
Even when selective pressure is carefully adjusted, the GA will not work properly if it cannot recombine parts of the individual solutions effectively so that improved solutions are generated. This implies that the recombination process should be able to recombine building blocks not in an arbitrary way, but in a way that is meaningful to the problem that is being solved. For this reason, there is a strong connection between the encoding of the GA and its recombination operator [12, 15].
Of course, the algorithm described above and illustrated in Figure 4.5.2 is just a prototype, which corresponds to the ‘classic’ GA concept. This prototype is adopted to the target problem usually by modifying the choice of encoding, selection scheme, deletion scheme, and recombination operator and mutation operators. Our choices in conjuction with the catalytic converter model tuning are presented in the rest of this chapter.
Finally, we note that this GA concept has several limitations and more drastic changes to it have been proposed by Goldberg [15]. The resulting genetic algorithms bear little resemblanse with the classic GA above; the concept remains the same, though: they are always population-based algorithms that recombine the building blocks of solutions with a bias towards the superior ones.