698 Modern Methods of Optimization
Roulette wheel
Fitness
values
3
2
1
6
5
4 Pointer
16%
8% 36%
24%
4% 12%
String
numbers
Figure 13.1 Roulette-wheel selection scheme.
In Fig. 13.1, the population size is assumed to be 6 with fitness values of the strings
1, 2, 3, 4, 5, and 6 given by 12, 4, 16, 8, 36, and 24, respectively. Since the fifth
string (individual) has the highest value, it is expected to be selected most of the time
(36% of the time, probabilistically) when the roulette wheel is spunntimes (n=6 in
Fig. 13.1). The selection scheme, based on the spinning of the roulette wheel, can be
implemented numerically during computations as follows.
The probabilities of selecting different strings based on their fitness values are
calculated using Eq. (13.11). These probabilities are used to determine the cumulative
probability of stringibeing copied to the mating pool,Pi, by adding the individual
probabilities of strings 1 throughias
Pi=
∑i
j= 1
pj (13.13)
Thus the roulette-wheel selection process can be implemented by associating the cumu-
lative probability range(Pi− 1 −Pi) o thet ith string. To generate the mating pool of
Table 13.1 Roulette-Wheel Selection Process for Obtaining the Mating Pool
Probability of Cumulative Range of
selecting stringi probability value cumulative
for the mating of stringi, probability of
String numberi Fitness valueFi pool,pi Pi=
∑i
j= 1
pj stringi, (Pi− 1 , Pi)
1 12 0.12 0.12 0.00–0.12
2 4 0.04 0.16 0.12–0.16
3 16 0.16 0.32 0.16–0.32
4 8 0.08 0.40 0.32–0.40
5 36 0.36 0.76 0.40–0.76
6 24 0.24 1.00 0.76–1.00