Professional Documents
Culture Documents
Ga PDF
Ga PDF
Bhattacharjya/CE/IITG
References
R.K. Bhattacharjya/CE/IITG
Introduction to optimization
R.K. Bhattacharjya/CE/IITG
Global optima
Local optima
Local optima
Local optima
Local optima
19 October 2012
Introduction to optimization
R.K. Bhattacharjya/CE/IITG
19 October 2012
Genetic Algorithms
5
R.K. Bhattacharjya/CE/IITG
19 October 2012
R.K. Bhattacharjya/CE/IITG
Select The
Best,
Discard The
Rest
19 October 2012
An Example.
R.K. Bhattacharjya/CE/IITG
19 October 2012
An Example.
8
R.K. Bhattacharjya/CE/IITG
Evolution of species
R.K. Bhattacharjya/CE/IITG
Initial Population of
animals
Millions Of
Years
Surviving Individuals
Reproduce, Propagate Favorable
Characteristics
Evolved Species
19 October 2012
10
R.K. Bhattacharjya/CE/IITG
19 October 2012
11
Start
Initialize
population
Evaluate Solutions
T =0
Optimum
Solution?
Selection
Y
T=T+1
Stop
Crossover
Mutation
19 October 2012
12
function sga()
{
Initialize population;
Calculate fitness function;
While(fitness value != termination criteria)
{
Selection;
Crossover;
Mutation;
Calculate fitness function;
}
}
19 October 2012
13
Nature
Computer
Population
Individual
Fitness
Chromosome
Gene
Reproduction
Set of solutions
Solution to a problem
Quality of a solution
Encoding for a solution
Part of the encoding solution
Crossover
19 October 2012
14
Selection
Crossover
Mutation
Elitism
19 October 2012
Encoding
15
R.K. Bhattacharjya/CE/IITG
Encoding Methods
R.K. Bhattacharjya/CE/IITG
16
Decoded value
52
26
Encoding Methods
R.K. Bhattacharjya/CE/IITG
17
Defining a string
[0100001010]
d
h
(d,h) = (8,10) cm
Chromosome = [0100001010]
19 October 2012
Fitness function
18
R.K. Bhattacharjya/CE/IITG
19 October 2012
19
Considering c = 0.0654
23
19 October 2012
Selection
20
R.K. Bhattacharjya/CE/IITG
Selection
R.K. Bhattacharjya/CE/IITG
21
19 October 2012
Selection
R.K. Bhattacharjya/CE/IITG
22
selection
Roulette wheel selection
Rank selection
Steady state selection, etc
19 October 2012
Tournament selection
R.K. Bhattacharjya/CE/IITG
23
Tournament selection
R.K. Bhattacharjya/CE/IITG
24
32
22
22
25
25
13 +30
32
40
22
32
40
32
25
22
22
25
7 +45
7 +45
25
25
22
13 +30
13 +30
19 October 2012
13 +30
25
Chromosome #
Parents are
selected
according to their
fitness values.
The better
chromosomes
have more
chances to be
selected.
Chromosome 1
Chromosome 2
Chromosome 3
Chromosome 4
Chromosome 5
Chromosome 6
Fitness
% of Roulette wheel
127.50
50.00
25.00
20.00
15.00
12.50
5%
51
20
10
8
6
5
Roulette Wheel
6%
8%
Chromosome 1
Chromosome 2
10%
51%
Chromosome 3
Chromosome 4
Chromosome 5
Chromosome 6
20%
19 October 2012
Rank selection
26
Chromosome # Fitness
Chromosome 1 127.50
Chromosome 2 50.00
Chromosome 3 25.00
Chromosome 4 20.00
Chromosome 5 15.00
Chromosome 6 12.50
5%
R.K. Bhattacharjya/CE/IITG
% of
Rank
% of
Roulette
Roulette
wheel
wheel
51
6
28
20
5
24
10
4
19
8
3
14
6
2
10
5
1
5
Rank Selection
10%
28%
Chromosome 1
14%
Chromosome 2
Chromosome 3
Chromosome 4
Chromosome 5
19%
Chromosome 6
24%
19 October 2012
27
19 October 2012
Binary Crossover
R.K. Bhattacharjya/CE/IITG
28
Binary Crossover
29
R.K. Bhattacharjya/CE/IITG
Binary Mutation
R.K. Bhattacharjya/CE/IITG
30
19 October 2012
Elitism
R.K. Bhattacharjya/CE/IITG
31
19 October 2012
An example problem
R.K. Bhattacharjya/CE/IITG
32
19 October 2012
An example problem
33
R.K. Bhattacharjya/CE/IITG
34
computation
lower accuracy
longer computing time
solution space discontinuity
hamming cliff
19 October 2012
35
36
P1=[8 6 3 7 6]
P2=[2 9 4 8 9]
C1=[8 6 4 8 9]
C2=[2 9 3 7 6]
19 October 2012
37
Linear Crossover
From the three children, best two are selected for the
next generation
19 October 2012
38
( x1 , ..., xk , yk + (1 ) xk , ..., xn )
39
( x , ..., x , y
+ (1 ) x
, ..., y + (1 ) x )
1
k
k +1
k +1
n
n
40
x + (1 ) y
41
Where,
a random number
is a parameter that controls the crossover process. A high value
of the parameter will create near-parent solution
19 October 2012
Random mutation
R.K. Bhattacharjya/CE/IITG
42
Where
Where,
is the user defined maximum
perturbation
19 October 2012
43
Where
19 October 2012
Polynomial mutation
44
R.K. Bhattacharjya/CE/IITG
19 October 2012
Multi-modal optimization
45
R.K. Bhattacharjya/CE/IITG
19 October 2012
R.K. Bhattacharjya/CE/IITG
19 October 2012
Multi-modal optimization
R.K. Bhattacharjya/CE/IITG
47
Sharing function
Niche count
Modified fitness
19 October 2012
Hand calculation
R.K. Bhattacharjya/CE/IITG
48
Maximize
Sol
String
Decoded
value
110100
52
1.651
0.890
101100
44
1.397
0.942
011101
29
0.921
0.246
001011
11
0.349
0.890
110000
48
1.524
0.997
101110
46
1.460
0.992
19 October 2012
Distance table
R.K. Bhattacharjya/CE/IITG
49
dij
0.254
0.73
1.302
0.127
0.191
0.254
0.476
1.048
0.127
0.063
0.73
0.476
0.572
0.603
0.539
1.302
1.048
0.572
1.175
1.111
0.127
0.127
0.603
1.175
0.064
0.191
0.063
0.539
1.111
0.064
19 October 2012
50
sh(dij)
nc
0.492
0.746
0.618
2.856
0.492
0.048
0.746
0.874
3.16
0.048
1.048
0.746
0.746
0.872
3.364
0.618
0.874
0.872
3.364
19 October 2012
51
Sol
String
Decoded
value
110100
52
1.651
0.890
101100
44
1.397
0.942
011101
29
0.921
0.246
001011
11
0.349
0.890
110000
48
1.524
0.997
101110
46
1.460
0.992
nc
f
2.856 0.312
3.160 0.300
1.048 0.235
1.000 0.890
3.364 0.296
3.364 0.295
19 October 2012
52
19 October 2012
Evolutionary Strategies
R.K. Bhattacharjya/CE/IITG
53
19 October 2012
54
19 October 2012
55
Step 3: If
, replace
with
Step4: If termination criteria is satisfied, stop, else
go to step 2
19 October 2012
56
Rechenberg postulate
The
19 October 2012
57
19 October 2012
Matlab code
58
R.K. Bhattacharjya/CE/IITG
19 October 2012
59
19 October 2012
60
5
0
10
20 0
4.5
4
50
10 0
Optimal Solution is
X*= [3.00
1.99]
50
10 0
3.5
20
5
0
10
1.5
10
20
2
10
20
50
20
10 0
10 0
20 0
0.5
1.5
50
20
0
0.5
50
20
10
2.5
20 0
2.5
X
3.5
4.5
20 0
19 October 2012
Multimember ES
R.K. Bhattacharjya/CE/IITG
61
ES
Step1: Choose an initial population of
and mutation strength
Step2: Create mutated solution
solutions
Step3: Combine
and , and choose the best
solutions
Step4: Terminate? Else go to step 2
19 October 2012
Multimember ES
R.K. Bhattacharjya/CE/IITG
62
ES
Through selection
Through mutation
19 October 2012
Multimember ES
R.K. Bhattacharjya/CE/IITG
63
Offspring
ES
Through selection
Through mutation
19 October 2012
Multi-objective optimization
R.K. Bhattacharjya/CE/IITG
Comfort
64
Price
19 October 2012
Multi-objective optimization
R.K. Bhattacharjya/CE/IITG
65
19 October 2012
Multi-objective optimization
R.K. Bhattacharjya/CE/IITG
66
Multi-objective optimization
67
R.K. Bhattacharjya/CE/IITG
19 October 2012
NSGA II
R.K. Bhattacharjya/CE/IITG
68
19 October 2012
Non-dominated sorting
R.K. Bhattacharjya/CE/IITG
69
1
Feasible Region
5
4
6
2
3
Objective 1 (Minimize)
Objective 2 (Minimize)
Objective 2 (Minimize)
1
2
Infeasible Region
Objective 1 (Minimize)
19 October 2012
70
Selection
No
Crossover
Termination
Criteria?
Yes
Mutation
Calculate objective function of the
new population
Pareto-optimal solution
19 October 2012
R.K. Bhattacharjya/CE/IITG
19 October 2012
72
Non-dominating sorting
Pt
Pt+1
F1
F2
F3
Crowding distance
sorting
Qt
Rejected
19 October 2012
R.K. Bhattacharjya/CE/IITG
73
THANKS
19 October 2012