Professional Documents
Culture Documents
Department of Computer Science University of Peshawar: Introduction To Genetic Algorithms (III)
Department of Computer Science University of Peshawar: Introduction To Genetic Algorithms (III)
University of Peshawar
Introduction to Genetic Algorithms
(III)
Advanced Algorithms
Adv Algo: Spring 2008
x value
f(x) = x2
011012
13
169
110002
24
576
010002
64
100112
19
361
30.9%
5.5%
14.4%
49.2%
pselect
fi/f
Expected count
fi/avg
Actual count
(Roulette wheel)
1 13
169
0.14
0.58
2 24
576
0.49
1.97
3 08
64
0.06
0.22
4 19
361
0.31
1.23
Sum
1170
1.00
4.00
4.0
Avg
293
0.25
1.00
1.0
Max
576
0.49
1.97
2.0
mate
Mate coded
1 13
0110|1
1100|0
2 24
1100|0
0110|1
2 24
11|000
10|011
4 19
10|011
11|000
Mate coded
New population
x value
f(x) x2
1 13
0110|1
2 24
1100|0
01100
12
144
2 24
1100|0
1 13
0110|1
11001
25
625
2 24
11|000
4 19
10|011
11011
27
729
10|011
3 08
01|000
10000
16
256
4 19
10
11