2.4 Selection
121
Algorithm 2.5
:
v
←−
assignFitnessTournament
q,r
(
Pop
,
cmp
F
)
Input
:
q
: the number of tournaments per individuals
Input
:
r
: the number of other contestants per tournament, normally 1
Input
:
Pop
: the population to assign fitness values to
Input
: cmp
F
: the comparator function providing the prevalence relation
Data
:
i,j,k,z
: counter variables
Data
:
b
: a Boolean variable being
true
as long as a tournament isn’t lost
Data
:
p
: the individual currently examined
Output
:
v
: the fitness function
begin
1
for
i
←−
len(
Pop
)
−
1
down to
0
do
2
z
←−
q
3
p
←−
Pop
[
i
]
4
for
j
←−
q
down to
1
do
5
b
←−
true
6
k
←−
r
7
while
(
k>
0)
∧
b
do
8
b
←−
Pop
[
⌊
random
u
(0
,
len(
Pop
))
⌋
]
.
x
≻
p
.
x
9
k
←−
k
−
1
10
if
b
then
z
←−
z
−
1
11
v
(
p
.
x
)
←−
z
12
return
v
13
end
14
2.4 Selection
2.4.1 Introduction
Definition 2.8 (Selection).
In evolutionary algorithms, the selection
20
operation
Mate
=
select(
Pop
,v,ms
) chooses
ms
individuals according to their fitness values
v
from the popu-
lation
Pop
and places them into the mating pool
Mate
[99, 1242, 232, 1431].
Mate
= select(
Pop
,v,ms
)
⇒∀
p
∈
Mate
⇒
p
∈
Pop
∀
p
∈
Pop
⇒
p
∈
G
×
X
v
(
p
.
x
)
∈
R
+
∀
p
∈
Pop
(len(
Mate
)
≥
min
{
len(
Pop
)
,ms
}
)
∧
(len(
Mate
)
≤
ms
)
(2.12)
On the mating pool, the reproduction operations discussed in
Section 2.5 on page 137
will subsequently be applied. Selection may behave in a deterministic or in a randomized
manner, depending on the algorithm chosen and its application-dependant implementation.
Furthermore, elitist evolutionary algorithms may incorporate an archive
Arc
in the selection
process, as sketched in
Algorithm 2.2
.
Generally, there are two classes of selection algorithms: such
with replacement
(anno-
tated with a subscript
r
) and such
without replacement
(annotated with a subscript
w
, see
Equation 2.13
) [1809]. In a selection algorithm
without
replacement, each individual from
the population
Pop
is taken into consideration for reproduction at most once and therefore
20
http://en.wikipedia.org/wiki/Selection_%28genetic_algorithm%29
[accessed 2007-07-03]