GA Demystified: Workshop On Soft and Evolutionary Computing
GA Demystified: Workshop On Soft and Evolutionary Computing
Workshop on Soft and Evolutionary Computing Indian Institute of Space Science and Technology 19-21 December 2011
Genetic Algorithm
Genetic Algorithm
Step 1 : Initialization (Population Size : 10) 1
0 1
.. 1
2
0 1
.. 0
3
1 0
.. 0
4
1 1
.. 1
5
0 1
.. 1
6
1 1
.. 0
7
0 1
.. 1
8
1 0
.. 0
10
11
Genetic Algorithm
Step 2 : Function Evaluation 1
0 1
.. 1
2
0 1
.. 0
3
1 0
.. 0
4
1 1
.. 1
5
0 1
.. 1
6
1 1
.. 0
7
0 1
.. 1
8
1 0
.. 0
9
53 222
.. 154
10
11
.. population=hardlim(population); population(:,9)=bin2dec(num2str(population(:,1:8))); ..
Genetic Algorithm
Step 2 : Function Evaluation 1
0 1
.. 1
2
0 1
.. 0
3
1 0
.. 0
4
1 1
.. 1
5
0 1
.. 1
6
1 1
.. 0
7
0 1
.. 1
8
1 0
.. 0
9
53 222
.. 154
10
-1.84 2.33
.. 0.65
11
-0.96 0.73
.. 0.61
Genetic Algorithm
Step 3 : Selection (Tournament Selection) 1
0 1
.. 1
2
0 1
.. 0
3
1 0
.. 0
4
1 1
.. 1
5
0 1
.. 1
6
1 1
.. 0
7
0 1
.. 1
8
1 0
.. 0
9
53 222
.. 154
10
-1.84 2.33
.. 0.65
11
-0.96 0.73
.. 0.61
Genetic Algorithm
Step 3 : Selection (Tournament Selection) 1
0 1
.. 1
2
0 1
.. 0
3
1 0
.. 0
4
1 1
.. 1
5
0 1
.. 1
6
1 1
.. 0
7
0 1
.. 1
8
1 0
.. 0
9
53 222
.. 154
10
-1.84 2.33
.. 0.65
11
-0.96 0.73
.. 0.61
Genetic Algorithm
Step 4 : Crossover (Single point) 1
1
2
0
3
0
4
1
5
1
6
0
7
1
8
0
10
11
.. parent2=population(pop2,:); cross_loc=ceil(rand*8); ..
Genetic Algorithm
Step 4 : Crossover (Single point) 1
1
2
0
3
0
4
1
5
1
6
1
7
0
8
1
10
11
Genetic Algorithm
Step 4 : Crossover (Single point) 1
1
2
0
3
0
4
1
5
1
6
1
7
0
8
1
10
11