You are on page 1of 8

A Mathematical Analysis of Tournament Selection

In L. Eshelman, ed., Genetic Algorithms: Proceedings of the 6th International Conference (ICGA95), Morgan Kaufmann, San Francisco, CA.

Tobias Blickle and Lothar Thiele


blickle@tik.ethz.ch thiele@tik.ethz.ch
Computer Engineering and Communication Networks Lab (TIK)
Swiss Federal Institute of Technology Zurich (ETHZ)
Gloriastrasse 35
CH-8092 Zurich, Switzerland
Abstract material in the population by crossover or by mutation
in order to exploit new points in the search space.
Genetic Algorithms are a common probabilis- The balance between exploitation and exploration can
tic optimization method based on the model be adjusted either by the selection pressure of the se-
of natural evolution. One important opera- lection operator or by the recombination operator, e.g.
tor in these algorithms is the selection scheme by the probability of crossover. As this balance is crit-
used to prefer better individuals. In this ical for the behaviour of the GA it is of great interest
paper a new description model for selection to know the properties of the selection and recombi-
schemes is introduced that operates on the nation operators to understand their in uence on the
tness distribution of the population. With convergence speed.
this method an extensive mathematical anal- Some work has been done to classify the di erent se-
ysis of the tournament selection scheme is lection schemes such as proportionate selection, rank-
carried out that allows an exact prediction
of the tness values after selection. Further- ing selection, tournament selection. To do so, Gold-
more several new properties of tournament berg [Goldberg and Deb, 1991] introduced the term
selection are derived. of takeover time . The takeover time is the number of
generations that is needed for a single best individ-
ual to ll up the whole population if no recombination
1 INTRODUCTION is used at all. Recently Back [Back, 1994] has an-
alyzed the most prominent selection schemes used in
Genetic Algorithms (GA) are probabilistic search al- time. Evolutionary Algorithms with respect to their takeover
gorithms characterized by the fact that a number N the selection In [Muhlenbein and Schlierkamp-Voosen, 1993]
of potential solutions (called individuals Ji 2 J where netic Algorithm intensity I in the so called Breeder Ge-
J represents the space of all possible individuals) of in the population.(BGA) is used to measure the progress
The selection
the optimization problem simultaneously sample the proportional selection and truncation intensity is derived for
search space. This population P = fJ1; J2; :::; JN g 2 Maza and Tidor [de la Maza and Tidor,selection. 1993 ]
De la
analyzed
JN is modi ed according to the natural evolutionary several selection methods according to their scale and
process: after initialization, selection and recombina- translation invariance.
tion are executed in a loop until some termination cri-
terion is reached. Each run of the loop is called a gen- An analysis based on the behaviour of the best individ-
eration and P ( ) denotes the population at generation ual (as done by Goldberg and Back) or on the average
. population tness (as done by Muhlenbein) only de-
The selection operator is intended to improve the av- scribespaper a
a small aspect of a selection method. In this
selection scheme is described by its interaction
erage quality of the population by giving individuals on the distribution
of higher quality a higher probability to be copied into is introduced in the of tness values. This description
next section. In Section 3 an anal-
the next generation. Thereby selection focusses the ysis of the tournament selection is carried out and the
search on promising regions in the search space. The properties of the tournament selection are derived in
quality of an individual is measured by a tness func- Section 4. Section 5 compares tournament selection
tion f : J 7! R. Recombination changes the genetic
with other selection methods, namely truncation se- As the selection methods are probabilistic we will often
lection. Finally some conclusions are given. make use of the expected tness distribution.
2 DESCRIPTION OF SELECTION De nition 2.4 (Expected tness distribution)
SCHEMES
 denotes the expected tness distribution after ap-
plying the selection method
to the tness distribution
s, i.e.
In general the behaviour of a selection scheme de-
pends only on the tness values of the individuals in
 (s; par list) := E (
(s; par list)) (3)
the population. In this paper we describe a selec-
tion scheme using the tness distribution before and s =
 (s; par list) is used as an abbreviation.
after selection. It thereby is assumed that selection
and recombination are done sequentially: rst a se- With this notation not only the behaviour of the best
lection phase creates an intermediate population and individual in the population or of the average tness
then recombination is performed with a certain prob- value can be described but all the aspects of a selection
ability on the individuals of this intermediate pop- scheme. Our aim is to predict s (f ) out of the given
ulation to get the population for the next genera- tness distribution s(f ). In the next section we want
tion. This kind of description di ers from the com- to derive this prediction for tournament selection.
mon paradigms where selection is made to obtain
the individuals for recombination ([Goldberg, 1989;
Koza, 1992]). But it is mathematically equivalent and 3 TOURNAMENT SELECTION
allows to analyze the selection method separately.
Tournament selection works as follows: Choose some
De nition 2.1 (Fitness distribution) The func- number t of individuals randomly from the population
tion s : R 7! Z0+ assigns to each tness value f 2 R the and copy the best individual from this group into the
number of individuals in a population P 2 JN carrying intermediate population, and repeat N times. Often
this tness value. s is called the tness distribution of tournaments are held only between two individuals (bi-
a population P . nary tournament) but a generalization is possible to an
arbitrary group size t called tournament size.
De nition 2.2 (Cumulative tness distri- For the following calculations we assume that tourna-
bution) Let n be the number of unique tness values ment selection is done with replacement.
and f1 < ::: < fn?1 < fn (n  N ) the ordering of the
tness values with f1 denoting the worst tness occur-
ing in the population and fn denoting the best tness Theorem 3.1 The expected tness distri-
in the population. bution
T (s; t) after performing tournament selection
with tournament size t on the distribution s is
S (fi ) denotes the number of individuals with tness
value fi or worse and is called cumulative tness dis-  S(fi ) t  S(fi?1 ) t!
tribution, i.e. s (fi ) =
 (s; t)(fi ) = N
T ?
N N
8 (4)
< Pj=i 0 : i < 1
S (fi ) =
: j=1 s(fNj ) :: 0i > ni  n (1) Proof: We rst calculate the expected number of
individuals with tness fi or worse, i.e. S  (fi ). An
individual with tness fi or worse can only win the
With these de nitions a selection method can be de- tournament if all other individuals in the tournament
scribed as a function that transforms a tness distri- have a tness of fi or worse. This means we have to
bution into another tness distribution. calculate the probability that all t individuals have a
De nition 2.3 (Selection method) A selection tness of fi or worse. As the probability to choose an
method
is a function that transforms a tness dis- individual with tness fi or worse is given by S (Nfi ) we
tribution s into an new tness distribution s0 : get
 S(fi ) t

S (fi ) = N (5)
s0 =
(s; par list) (2) N
par list is an optional parameter list of the selection Using this equation and the relation s (fi ) = S  (fi ) ?
method. S  (fi?1 ) (see De nition 2.2) we obtain (4). 2
(4) shows the strong in uence of the tournament s(f)

size t on the behavior of the selection scheme. Ob-


viously for t = 1 we obtain (in average) the un- 100

changed
 S(fi) initial distribution
 as s (fi ) =
T (s; 1)(fi ) =
N N ? N S (fi? )1
= S (fi ) ? S (fi?1 ) = s(fi ). 75

As an example of a discrete tness distribution we use


the initial tness distribution of the \wall-following- 50

robot" problem from Koza [Koza, 1992]. This distri-


bution is typical of problems solved by genetic pro- 25

gramming: many bad ( tness value 1) and only very


few good ( tness value 17) individuals exist. Figure
1 shows the initial tness distribution and the result-
0 f
5 10 15

ing tness distributions for di erent tournament sizes.


The high agreement between the theoretical derived Figure 2: Comparison between Theoretical derived
results and a simulation is veri ed in Figure 2. Here Distribution (|) and Simulation (- - -) (Tournament
the distributions accoring to (4) and the average of 20 Size t = 10).
simulations are shown.
3.1 DESCRIPTION USING CONTINUOUS
s(f)
600 DISTRIBUTION
500 We will now describe the distribution s(f ) as a con-
tinuous distribution s(f ) allowing the following prop-
400
erties to be easily derived. To do so, we assume con-
tinuously distributed tness values. The range of the
300
function s(f ) is f0 < f  fn , using the same notation
200
as in the discrete case.
We denote all functions in the continuous case with a
100
bar, e.g. we write s(f ) instead of s(f ). Similar sums
are replaced by integrals, hence
Zf
0 f
5 10 15

S(f ) = s(x) dx (7)


Figure 1: Fitness Distribution before (|) and after f0
Tournament Selection with Tournament Size t = 2 (- - denotes the continuous cumulative tness distribution.
-), and t = 10 ({ {). The Population Size is N = 1000.
Theorem 3.2 Let s be the continuous tness distribu-
In [Back, 1994] the probability for the individual with tion of the population. Then the expected tness distri-
rank i to be selected by tournament selection is given bution
T (s; t) after performing tournament selection
as pi = N ?t((N ? i + 1)t ? (N ? i)t ), under the as- with tournament size t is
sumption that the individuals are ordered according to 
 S(f ) t?1
their tness value f (J1 )  f (J2 )  :::  f (JN ). Note s (f ) =
T (
s; t)(f ) = ts(f ) (8)
N
that Back uses an \reversed" tness function where
the best individual has the lowest index. For compar- Proof: Analogous to the proof of the discrete case
ison with our results we transform the task into an the probability of an individual with tness f or worse
maximization task using j = N ? i + 1: to win the tournament is given by
 t
pj = N ?t(j t ? (j ? 1)t ) 1  j  N (6) S  (f ) = N S(f ) (9)
N
This formula is as a special case of (4) with all individ- dS (f )
uals having a di erent tness value. Then s(fi ) = 1 As s (f ) = df , we obtain (8). 2
for all i 2 [1; N ] and S (fi ) = i and pi = s N(fi ) yields
the same equation as given by Back. Note that this Figure 3 shows the resulting distributions after tour-
formula is not valid if some individuals have the same nament if the initial distribution is a Gaussian
x?
distri-
tness value. bution G(; ) with G(; )(x) = 2 e
p 1 ?  . The
(
2 2
)2
!t ?1
distribution sG (f ) = N G(; )(f ) with  = 30;  =
t2 t1s(f )
1 Z f s(x) dx 1

100; N = 1000 and f0 = ?1; fn = +1 and the result- N f0


ing distributions after tournament with tournament
size 2, 5, and 10 are shown in the interesting region 1Zf
1 Z x t ?1 !t ?1
1
2

f 2 [0; 200].  t s(x)


N f0 1 N f0
s(y) dy dx

s(f)
30
As Zf 1 Z x t ?1
1
25
t1s(x) s(y) dy dx
N f0
f0
Zf !t
1 1
20

15
=N N f0
s(x) dx

10
we can write


T (
T (s; t1; f ); t2 ; f ) =
5

Zf !t ?1
1
0
50 100 150 200 250
f 1

t t s(f )
2 1 s(x) dx
N f0
Figure 3: Gaussian Fitness Distribution approxi- 0 Z
mately leads again to Gaussian Distributions after !t 1t ?1 2

 @ N1 s(x) dx A =
f 1

Tournament (from left to right: initial Distribution,


Distribution after Tournament Selection with Tourna- f 0

ment Size t = 2, t = 5, t = 10). Zf !t t ?1


1
1 2

t2 t1s(f )
N
s(x) dx =
T (s; t1 t2 )(f )
4 PROPERTIES OF f0

TOURNAMENT SELECTION 2
4.1 CONCATENATION OF In [Goldberg and Deb, 1991] the proportion P of best-
TOURNAMENT SELECTION PHASES t individuals after  selections with tournament size
t (without recombination) is given to
An interesting property of tournament selection is the P = 1 ? (1 ? P0)t

(11)
concatenation of several selection phases. Assume an
arbitrary population with the tness distribution s. This can be obtained as a special case from Theorem
We apply rst tournament selection with tournament 4.1.
size t1 to this population and then on the resulting
population again tournament selection with tourna- Corollary 4.1 Let s(f ) be a tness distribution rep-
ment size t2 (with no recombination in between). The resentable as
obtained tness distribution is the same as if only one 0Rf 1 ?1
g (x) dx
tournament selection with the tournament size t1t2 is s(f ) = g(f ) @ f A 0
(12)
applied to the initial distribution s. N

Theorem 4.1 Let s be a tness distribution and R


with  1 and ffn g(x) dx = N . Then the expected
t1 ; t2  1 two tournament sizes. Then the following distribution after tournament with tournament size t
0

equation holds is 0 1 t?1 R f g(x) dx



T (
T (s; t1); t2 ) =
T (s; t1 t2) (10) s (f ) = t g(f ) @ f0 A (13)
N
Proof:

T (
T (s; t1); t2)(f ) = Proof: If we assume that s(f ) is the result of apply-
Zf  !t ?1 ing tournament selection with tournament size on
 1
2
the distribution g(f ), (13) is directly obtained using
t2
T (
s; t1)(f )
T (s; t1)(x) dx = Theorem 4.1. 2
N f0
4.2 REPRODUCTION RATE From the demand that R (fz ) = 1 it follows that
S(fz ) = N t? t? and hence pd = t? t? ? t? t?
t
1
2 1

De nition 4.1 (Reproduction rate) The repro-


1 1 1

duction rate R (f ) denotes the ratio of the number of It is interesting to note that the loss of diversity is
individuals with a certain tness value f after and be- independent of the initial tness distribution. It turns
fore selection out that the number of individuals lost increases with
( s (f ) the tournament size (see Figure 4). About the half of
 (f ) =
R s(f ): s(f ) > 0 (14) the population is lost at tournament size t = 5.
0 : s(f ) = 0
p (t)

A reasonable selection method should favor good indi-


d
1

viduals by assigning them a reproduction rate R (f ) >


1 and punish bad individuals by a ratio R (f ) < 1. The 0.8

reproduction rate of tournament selection is


 S(f ) t?1 0.6

R (f ) = t (15)
N 0.4

This means that the individuals with the lowest tness


have the lowest reproduction rate and the individuals 0.2

with the highest tness have a reproduction rate of


t. In between the reproduction rate is monotonically 0

increasing.
5 10 15 20 25 30
tournament size t

4.3 LOSS OF DIVERSITY Figure 4: The Loss of Diversity pd of Tournament Se-


During every selection phase bad individuals will be lection
lost and be replaced by copies of better one. Thereby
a certain amount of \genetic material" is lost that was 4.4 SELECTION INTENSITY
contained in the bad individuals. The number of indi- The term \selection intensity" or \selection pressure"
viduals that are replaced corresponds to the strength is often used in di erent contexts and for di erent
of the \loss of diversity". This leads to the following properties of a selection method. Goldberg and Deb
new de nition. [Goldberg and Deb, 1991] and Back [Back, 1994] use
De nition 4.2 (Loss of diversity) The loss of di- the \takeover time" to de ne the selection pressure.
versity pd is the proportion of individuals of a popula- We use the term \selection intensity" in the same
tion that is not selected during the selection phase. way it is used in population genetics [Bulmer, 1980].
Muhlenbein has adopted the de nition and applied it
Theorem 4.2 The loss of diversity of tournament se- to genetic algorithms [Muhlenbein and Schlierkamp-
lection is Voosen, 1993].
pd = t? t? ? t? t?
t
1
1 1 (16)
The change of the average tness of the population is
Proof: Let fz denote the tness value such that a reasonable measure for selection intensity, but this
R (fz ) = 1. For all tness values f 2]f0; fz ] the re- depends on the initial tness distribution. Using the
production rate is less than one. Hence the number of normalized Gaussian distribution G(0; 1) as initial t-
individuals Rthat are not the selected during selection ness distribution leads to the following de nition.
is given by ffz (s(x) ? s (x)) dx. It follows that
0 De nition 4.3 (Selection intensity) The selection
Z fz intensity I is the expected average tness value of
pd = N1 (s(x) ? s (x)) dx the population after applying the selection method

f0
Z fz Z fz ! to the normalized Gaussian distribution G(0; 1)(f ) :=
= N1 p12 e? f2 :
2

s(x) dx ? s (x) dx


f0 f0 Z1
?
= N1 S(fz ) ? S (fz )
 I = f
 (G(0; 1))(f ) df (17)
?1
The \e ective" average tness value M  of a Gaussian The calculations lead to the following recursion equa-
distribution with mean  and variance 2 can easily be tion: q
derived as M  = I + . Note that this de nition of IT (t)k  ck (ln(t) ? ln(IT (t)k?1)) (19)
the selection intensity can only be applied if the selec-
tion method is scale and translation invariant. This is with IT (t)0 = 1 and k the recursion depth. The calcu-
the case for tournament selection as shown for example lation of the constants ck is dicult. Taking a rough
in [de la Maza and Tidor, 1993]. approximation with k = 2 the following equation is
obtained that approximates (18) with an relative er-
To calculate the selection intensity of tournament se- ror of less than 2.4% for t 2 [2; 5], for tournament sizes
lection the integral equation t > 5 the relative error is less than 1%:
q p
Z1 1 x
Z x 1 t?1 IT (t)  2(ln(t) ? ln( 4:14 ln(t))) (20)
t x p e? e? dy
y
p
2 2
IT (t) = 2 2 dx
?1 2 ?1 2 4.5 SELECTION VARIANCE
(18)
has to be evaluated. This can be done analytically for In addition to the selection intensity we introduce the
the cases t = 2 and t = 3: term of \selection variance".
I (2) = p
1
T
 De nition 4.4 (Selection variance) The selection
variance V is the expected variance of the tness dis-
IT (3) = 2p3  tribution of the population after applying the selec-
tion method
to the normalized Gaussian distribution
G(0; 1).
For larger tournament sizes (18) can be accurately Z1
evaluated by numerical integration. The result is V = (f ? I )2
 (G(0; 1))(f ) df (21)
shown in Figure 5 for a tournament size from 1 to ?1
30.
Note that there is a di erence between the selection
I(t)
variance and the loss of diversity. The loss of diversity
gives the proportion of individuals that are not se-
2.5

lected, regardless of their tness value. As a result it


is possible to determine the loss of diversity indepen-
2

dent of the initial tness distribution. The selection


1.5
variance is de ned as the new variance of the tness
distribution assuming a Gaussian initial tness distri-
1
bution. By specifying the tness values speci c state-
ments about the selection variance (as well as about
0.5
the selection intensity) can be made.
To determine the selection variance we need to solve
the equation
0 t
5 10 15 20 25 30

Figure 5: Dependence of the Selection Intensity I on


Z1 1 x
t (x ? IT (t))2 p e?
2
VT (t) =
the Tournament Size t.
2

Z?1x 1 y t2?1
Thierens and Goldberg derive for a tournament size of p e? dy
2
 2 dx (22)
two the same average tness value [Thierens and Gold- ?1 2
berg, 1994] in a completely di erent manner. But their For a binary tournament we have
formulation can not be extended to other tournament
sizes. V (2) = 1 ?
1
T

An explicit expression of (18) may not exist. By means
of the steepest descent method (see e.g. [Henrici, Here again only numerical computations give the se-
1977]) an approximation for large tournament sizes lection variance for larger tournament sizes. Figure 6
can be given. But even for small tournament sizes shows the dependence of the selection variance on the
this approximation gives acceptable results. tournament size.
Table 1: Some Parameter Settings for Truncation Se-
lection (T ) and Tournament Selection t that lead to the
V(t)

1
same Selection Intensity I (from [Blickle and Thiele,
0.8
1995]).
I 0.56 0.84 1.03 1.16 1.54 2.16
0.6
T :t 2 3 4 5 10 40

?:T 0.66 0.47 0.36 0.30 0.15 0.04
0.4

0.2
6 CONCLUSION
0 t

Based on a mathematical description using the tness


5 10 15 20 25 30

Figure 6: The Dependence of the Selection Variance distribution of a population, several new properties of
V on the Tournament Size t.
the tournament selection scheme have been derived in
this paper. Often the behaviour of tournament de-
pends on the initial tness distribution and no general
5 COMPARISON WITH OTHER behaviour can be given without knowledge of the t-
SELECTION SCHEMES ness distribution. But some properties are indepen-
dent of the distribution namely the concatenation of
The selection intensity is a important measure for the tournament runs (Theorem 4.1) and the loss of diver-
classi cation of selection schemes, because it allows a sity (Theorem 4.2). By this several independently de-
prediction of the behaviour of a simple genetic algo- rived aspects of the tournament selection scheme could
rithm if the tness values are normally distributed. In be uni ed as special cases of Theorem 3.1. The calcu-
[Muhlenbein and Schlierkamp-Voosen, 1993] a predic- lation of the selection intensity allowed the prediction
tion is made for a genetic algorithm optimizing the of the convergence time for a simple GA using tour-
ONEMAX (or bit-counting) function using truncation nament selection with arbitrary tournament size t and
selection and uniform crossover. In truncation selec- uniform crossover.
tion
? with threshold T the fraction T best individ- The described properties give a better insight into the
uals survive and have the same selection probability behaviour of the tournament selection scheme and the
T . It is calculated that the number of generations un-
1
pn in uence of the tournament size parameter.
til convergence is determined by c = 2 I , where n

is the problem size (string length) and I is the selec- Acknowledgements
tion intensity. Form this formula the convergence time
can be obtained for an arbitrary selection method by
substituting I with the selection intensity of the corre- The authors thank J. Waldvogel who derived the ap-
sponding selection method. For tournament selection proximation formula (19) for the selection intensity.
we have

s n
References
c 2 p
2(ln(t) ? ln 4:14 ln(t)
(23)
[Back, 1994] Thomas Back. Selective pressure in evo-
lutionary algorithms: A characterization of selection
In Table 1 some parameter settings for tournament mechanisms. In Proceedings of the First IEEE Con-
selection and truncation selection are given that lead ference on Evolutionary Computation. IEEE World
to the same selection intensity. Congress on Computational Intelligence (WCCI),
pages 57{62, 1994.
A more detailed comparison of the selection methods
tournament selection, truncation selection and ranking [Blickle and Thiele, 1995] Tobias Blickle and Lothar
selection can be found in [Blickle and Thiele, 1995]. It Thiele. A comparison of selection schemes used
is shown that for the same selection intensity tourna- in genetic algorithms. Technical Report 11, Com-
ment selection has the smallest loss of diversity and the puter Engineering and Communication Networks
highest selection variance. It is concluded that tour- Lab (TIK), Swiss Federal Institute of Technology
nament selection is in some sense the best selection (ETH) Zurich, Gloriastrasse 35, CH-8092 Zurich,
method among the three. 1995.
[Bulmer, 1980] M.G. Bulmer. The Mathematical The-
ory of Quantitative Genetics. Clarendon Press, Ox-
ford, 1980.
[de la Maza and Tidor, 1993] Michael de la Maza and
Bruce Tidor. An analysis of selection procedures
with particular attention paid to proportional and
bolzmann selection. In Stefanie Forrest, editor, Pro-
ceedings of the Fifth International Conference on
Genetic Algorithms, pages 124{131, San Mateo, CA,
1993. Morgan Kaufmann Publishers.
[Goldberg and Deb, 1991] David E. Goldberg and
KalyanmoyDeb. A comparative analysis of selection
schemes used in genetic algorithms. In G. Rawlins,
editor, Foundations of Genetic Algorithms, pages
69{93, San Mateo, 1991. Morgan Kaufmann.
[Goldberg, 1989] David E. Goldberg. Genetic Algo-
rithms in Search, Optimization and Machine Learn-
ing. Addison-Wesley Publishing Company, Inc.,
Reading, Massachusetts, 1989.
[Henrici, 1977] P. Henrici. Applied and Computational
Complex Analysis, volume 2. A Wiley-Interscience
Series of Texts, Monographs, and Tracts, 1977.
[Koza, 1992] John R. Koza. Genetic programming:
on the programming of computers by means of nat-
ural selection. The MIT Press, Cambridge, Mas-
sachusetts, 1992.
[Muhlenbein and Schlierkamp-Voosen, 1993] Heinz
Muhlenbein and Dirk Schlierkamp-Voosen. Predic-
tive models for the breeder genetic algorithm. Evo-
lutionary Computation, 1(1), 1993.
[Thierens and Goldberg, 1994] D. Thierens and
D. Goldberg. Convergence models of genetic algo-
rithm selection schemes. In Yuval Davidor, Hans-
Paul Schwefel, and Reinhard Manner, editors, Par-
allel Problem Solving from Nature - PPSN III, pages
119 { 129, Berlin, 1994. Lecture Notes in Computer
Science 866 Springer-Verlag.

You might also like