SlideShare a Scribd company logo
R.K. Bhattacharjya/CE/IITG
Introduction To Genetic Algorithms
Dr. Rajib Kumar Bhattacharjya
Department of Civil Engineering
IIT Guwahati
Email: rkbc@iitg.ernet.in
7 November 2013
1
R.K. Bhattacharjya/CE/IITG
References
7 November 2013
2
 D. E. Goldberg, ‘Genetic Algorithm In Search,
Optimization And Machine Learning’, New York:
Addison – Wesley (1989)
 John H. Holland ‘Genetic Algorithms’, Scientific
American Journal, July 1992.
 Kalyanmoy Deb, ‘An Introduction To Genetic
Algorithms’, Sadhana, Vol. 24 Parts 4 And 5.
R.K. Bhattacharjya/CE/IITG
Introduction to optimization
7 November 2013
3
Global optima
Local optima
Local optima
Local optima
Local optima
f
X
R.K. Bhattacharjya/CE/IITG
Introduction to optimization
7 November 2013
4
Multiple optimal solutions
R.K. Bhattacharjya/CE/IITG
Genetic Algorithms
7 November 2013
5
Genetic Algorithms are the heuristic search
and optimization techniques that mimic the
process of natural evolution.
R.K. Bhattacharjya/CE/IITG
Principle Of Natural Selection
7 November 2013
6
“Select The
Best, Discard
The Rest”
R.K. Bhattacharjya/CE/IITG
An Example….
7 November 2013
7
Giraffes have long necks
 Giraffes with slightly longer necks could feed on
leaves of higher branches when all lower ones had
been eaten off.
 They had a better chance of survival.
 Favorable characteristic
propagated through generations
of giraffes.
 Now, evolved species has long necks.
R.K. Bhattacharjya/CE/IITG
7 November 2013
8
This longer necks may have due to the effect of mutation
initially. However as it was favorable, this was propagated over
the generations.
An Example….
R.K. Bhattacharjya/CE/IITG
Evolution of species
7 November 2013
9
Initial Population of
animals
Struggle For Existence
Survival Of the Fittest
Surviving Individuals Reproduce,
Propagate Favorable Characteristics
Millions
Of
Years
Evolved Species
R.K. Bhattacharjya/CE/IITG
7 November 2013
10
Thus genetic algorithms implement
the optimization strategies by
simulating evolution of species
through natural selection
R.K. Bhattacharjya/CE/IITG
Simple Genetic Algorithms
7 November 2013
11
Start
population
Initialize
population
Solution?
Optimum
Solution?
Evaluate Solutions
YES
Stop
T = 0
T=T+1
Selection
Crossover
Crossover
Mutation
Mutation
NO
R.K. Bhattacharjya/CE/IITG
Simple Genetic Algorithm
7 November 2013
12
function sga ()
{
Initialize population;
Calculate fitness function;
While(fitness value != termination criteria)
{
Selection;
Crossover;
Mutation;
Calculate fitness function;
}
}
R.K. Bhattacharjya/CE/IITG
GA Operators and Parameters
7 November 2013
13
 Selection
 Crossover
 Mutation
 Now we will discuss about genetic operators
R.K. Bhattacharjya/CE/IITG
Selection
7 November 2013
14
The process that determines which solutions are
to be preserved and allowed to reproduce and
which ones deserve to die out.
The primary objective of the selection operator is
to emphasize the good solutions and eliminate
the bad solutions in a population while keeping
the population size constant.
“Selects the best, discards the rest”
R.K. Bhattacharjya/CE/IITG
Functions of Selection operator
7 November 2013
15
Identify the good solutions in a population
Make multiple copies of the good solutions
Eliminate bad solutions from the population so that
multiple copies of good solutions can be placed in the
population
Now how to identify the good solutions?
R.K. Bhattacharjya/CE/IITG
Fitness function
7 November 2013
16
A fitness function value quantifies the optimality of a solution.
The value is used to rank a particular solution against all the
other solutions
A fitness value is assigned to each solution depending on how
close it is actually to the optimal solution of the problem
A fitness value can be assigned to evaluate the solutions
R.K. Bhattacharjya/CE/IITG
Assigning a fitness value
7 November 2013
17
Considering c = 0.0654
23
d
h
R.K. Bhattacharjya/CE/IITG
Selection operator
7 November 2013
18
 There are different techniques to implement
selection in Genetic Algorithms.
 They are:
 Tournament selection
 Roulette wheel selection
 Proportionate selection
 Rank selection
 Steady state selection, etc
R.K. Bhattacharjya/CE/IITG
Tournament selection
7 November 2013
19
 In tournament selection several tournaments
are played among a few individuals. The
individuals are chosen at random from the
population.
 The winner of each tournament is selected
for next generation.
 Selection pressure can be adjusted by changing
the tournament size.
 Weak individuals have a smaller chance to be
selected if tournament size is large.
R.K. Bhattacharjya/CE/IITG
Tournament selection
7 November 2013
20
22
13 +30
22
40
32
32
25
7 +45
25
25
32
25
22
40
22
13 +30
7 +45
13 +30
22
32
25 13 +30
22
25
Selected
Best solution will have two copies
Worse solution will have no copies
Other solutions will have two, one
or zero copies
R.K. Bhattacharjya/CE/IITG
Roulette wheel and proportionate
selection
7 November 2013
21
Chrom # Fitness
1 50
2 6
3 36
4 30
5 36
6 28
186
% of RW
26.88
3.47
20.81
17.34
20.81
16.18
100.00
EC
1.61
0.19
1.16
0.97
1.16
0.90
6
AC
2
0
1
1
1
1
6
1
21%
2
3%
3
21%
4
18%
5
21%
6
16%
Roulet wheel
Parents are selected
according to their
fitness values
The better
chromosomes have
more chances to be
selected
R.K. Bhattacharjya/CE/IITG
Rank selection
7 November 2013
22
Chrom # Fitness
1 37
2 6
3 36
4 30
5 36
6 28
Chrom # Fitness
1 37
3 36
5 36
4 30
6 28
2 6
Sort
according
to fitness
Assign
raking
Rank
6
5
4
3
2
1
Chrom #
1
3
5
4
6
2
% of RW
29
24
19
14
10
5
Chrom #
1
3
5
4
6
2
Roulette wheel
6 5 4 3 2 1
EC AC
1.714 2
1.429 1
1.143 1
0.857 1
0.571 1
0.286 0
Chrom #
1
3
5
4
6
2
R.K. Bhattacharjya/CE/IITG
Steady state selection
7 November 2013
23
In this method, a
few good
chromosomes are
used for creating
new offspring in
every iteration.
The rest of
population migrates
to the next
generation without
going through the
selection process.
Then some bad
chromosomes are
removed and the
new offspring is
placed in their
places
Good
Bad
New
offspring
Good
New
offspring
R.K. Bhattacharjya/CE/IITG
How to implement crossover
7 November 2013
24
Source: http://www.biologycorner.com/bio1/celldivision-chromosomes.html
The crossover operator is used to create new solutions from the existing solutions
available in the mating pool after applying selection operator.
This operator exchanges the gene information between the solutions in the
mating pool.
0 1 0 0 1 1 0 1 1 0
Encoding of solution is necessary so that our
solutions look like a chromosome
R.K. Bhattacharjya/CE/IITG
Encoding
7 November 2013
25
The process of representing a solution in the
form of a string that conveys the necessary
information.
Just as in a chromosome, each gene controls a
particular characteristic of the individual,
similarly, each bit in the string represents a
characteristic of the solution.
R.K. Bhattacharjya/CE/IITG
Encoding Methods
7 November 2013
26
 Most common method of encoding is binary coded.
Chromosomes are strings of 1 and 0 and each position
in the chromosome represents a particular characteristic
of the problem
Decoded value 52 26
Mapping between decimal
and binary value
R.K. Bhattacharjya/CE/IITG
Encoding Methods
7 November 2013
27
d
h (d,h) = (8,10) cm
Chromosome = [0100001010]
Defining a string [0100001010]
d h
R.K. Bhattacharjya/CE/IITG
Crossover operator
7 November 2013
28
The most popular
crossover selects any two
solutions strings randomly
from the mating pool and
some portion of the strings
is exchanged between the
strings.
The selection
point is
selected
randomly.
A probability of crossover is
also introduced in order to
give freedom to an individual
solution string to determine
whether the solution would go
for crossover or not.
Solution 1
Solution 2
Child 1
Child 2
R.K. Bhattacharjya/CE/IITG
Binary Crossover
7 November 2013
29
Source: Deb 1999
R.K. Bhattacharjya/CE/IITG
Mutation operator
7 November 2013
30
Though crossover has the main responsibility to search for the
optimal solution, mutation is also used for this purpose.
Mutation is the occasional introduction of new features in to the
solution strings of the population pool to maintain diversity in the
population.
Before mutation After mutation
R.K. Bhattacharjya/CE/IITG
Binary Mutation
7 November 2013
31
 Mutation operator changes a 1 to 0 or vise versa, with a mutation
probability of .
 The mutation probability is generally kept low for steady convergence.
 A high value of mutation probability would search here and there like a
random search technique.
Source: Deb 1999
R.K. Bhattacharjya/CE/IITG
Elitism
7 November 2013
32
 Crossover and mutation may destroy the best
solution of the population pool
 Elitism is the preservation of few best
solutions of the population pool
 Elitism is defined in percentage or in number
R.K. Bhattacharjya/CE/IITG
Nature to Computer Mapping
7 November 2013
33
Nature Computer
Population
Individual
Fitness
Chromosome
Gene
Set of solutions
Solution to a problem
Quality of a solution
Encoding for a solution
Part of the encoding solution
R.K. Bhattacharjya/CE/IITG
An example problem
7 November 2013
34
Consider 6 bit string to represent the solution, then
000000 = 0 and 111111 =
Assume population size of 4
Let us solve this problem by hand calculation
R.K. Bhattacharjya/CE/IITG
An example problem
7 November 2013
35
Actual
count
2
1
0
1
Sol No Binary
String
1 100101
2 001100
3 111010
4 101110
DV
37
12
58
46
x
value
0.587
0.19
0.921
0.73
f
0.96
0.56
0.25
0.75
Avg
Max
F
0.96
0.56
0.25
0.75
0.563
0.96
Relative
Fitness
0.38
0.22
0.10
0.30
Expected
count
1.53
0.89
0.39
1.19
Initialize
population
Calculate decoded
value
Calculate real
value
Calculate objective
function value
Calculate fitness
value
Calculate relative
fitness value
Calculate
expected count
Calculate actual
count
Selection: Proportionate selection
Initial population
Fitness
calculation
Decoding
R.K. Bhattacharjya/CE/IITG
An example problem: Crossover
7 November 2013
36
Sol No Matting
pool
1 100101
2 001100
3 100101
4 101110
f F
0.97 0.97
0.60 0.60
0.75 0.75
0.96 0.96
Avg 0.8223
Max 0.97
CS
3
3
2
2
New Binary
String
100100
001101
101110
100101
DV
36
13
46
37
x
value
0.57
0.21
0.73
0.59
Matting pool
Random generation of
crossover site
New population
Crossover: Single point
R.K. Bhattacharjya/CE/IITG
An example problem: Mutation
7 November 2013
37
Sol No
1
2
3
4
Population
after crossover
100100
001101
101110
100101
Population
after mutation
100000
101101
100110
101101
f F
1.00 1.00
0.78 0.78
0.95 0.95
0.78 0.78
Avg 0.878
Max 1.00
DV
32
45
38
45
x
value
0.51
0.71
0.60
0.71
Mutation
R.K. Bhattacharjya/CE/IITG
Real coded Genetic Algorithms
7 November 2013
38
 Disadvantage of binary coded GA
 more computation
 lower accuracy
 longer computing time
 solution space discontinuity
 hamming cliff
R.K. Bhattacharjya/CE/IITG
Real coded Genetic Algorithms
7 November 2013
39
 The standard genetic algorithms has the following steps
1. Choose initial population
2. Assign a fitness function
3. Perform elitism
4. Perform selection
5. Perform crossover
6. Perform mutation
 In case of standard Genetic Algorithms, steps 5 and
6 require bitwise manipulation.
R.K. Bhattacharjya/CE/IITG
Real coded Genetic Algorithms
7 November 2013
40
8 6 3 7 6
2 9 4 8 9
8 6 4 8 9
2 9 3 7 6
Simple crossover: similar to binary crossover
P1
P2
C1
C2
R.K. Bhattacharjya/CE/IITG
Real coded Genetic Algorithms
7 November 2013
41
Linear Crossover
• Parents: (x1,…,xn ) and (y1,…,yn )
• Select a single gene (k) at random
• Three children are created as,
)
...,
,
5
.
0
5
.
0
,
...,
,
( 1 n
k
k
k x
x
y
x
x ⋅
+
⋅
)
...,
,
5
.
0
5
.
1
,
...,
,
( 1 n
k
k
k x
x
y
x
x ⋅
−
⋅
)
...,
,
5
.
1
5
.
0
-
,
...,
,
( 1 n
k
k
k x
x
y
x
x ⋅
+
⋅
• From the three children, best two are selected for the
next generation
R.K. Bhattacharjya/CE/IITG
Real coded Genetic Algorithms
7 November 2013
42
Single arithmetic crossover
• Parents: (x1,…,xn ) and (y1,…,yn )
• Select a single gene (k) at random
• child1 is created as,
• reverse for other child. e.g. with α = 0.5
)
...,
,
)
1
(
,
...,
,
( 1 n
k
k
k x
x
y
x
x ⋅
−
+
⋅ α
α
0.1 0.3 0.1 0.3 0.7 0.2 0.5 0.1 0.2
0.5 0.7 0.7 0.5 0.2 0.8 0.3 0.9 0.4
0.1 0.3 0.1 0.3 0.7 0.5 0.5 0.1 0.2
0.5 0.7 0.7 0.5 0.2 0.5 0.3 0.9 0.4
R.K. Bhattacharjya/CE/IITG
Real coded Genetic Algorithms
7 November 2013
43
Simple arithmetic crossover
• Parents: (x1,…,xn ) and (y1,…,yn )
• Pick random gene (k) after this point mix values
• child1 is created as:
• reverse for other child. e.g. with α = 0.5
)
)
1
(
n
y
...,
,
1
)
1
(
1
,
...,
,
1
(
n
x
k
x
k
y
k
x
x ⋅
−
+
⋅
+
⋅
−
+
+
⋅ α
α
α
α
0.1 0.3 0.1 0.3 0.7 0.2 0.5 0.1 0.2
0.5 0.7 0.7 0.5 0.2 0.8 0.3 0.9 0.4
0.1 0.3 0.1 0.3 0.7 0.5 0.4 0.5 0.3
0.5 0.7 0.7 0.5 0.2 0.5 0.4 0.5 0.3
R.K. Bhattacharjya/CE/IITG
Real coded Genetic Algorithms
7 November 2013
44
Whole arithmetic crossover
• Most commonly used
• Parents: (x1,…,xn ) and (y1,…,yn )
• child1 is:
• reverse for other child. e.g. with α = 0.5
y
x ⋅
−
+
⋅ )
1
( α
α
0.1 0.3 0.1 0.3 0.6 0.2 0.5 0.1 0.2
0.5 0.7 0.7 0.5 0.2 0.8 0.3 0.9 0.4
0.3 0.5 0.4 0.4 0.4 0.5 0.4 0.5 0.3
0.3 0.5 0.4 0.4 0.4 0.5 0.4 0.5 0.3
R.K. Bhattacharjya/CE/IITG
Simulated binary crossover
7 November 2013
45
 Developed by Deb and Agrawal, 1995)
Where, a random number
is a parameter that controls the crossover process. A high value
of the parameter will create near-parent solution
R.K. Bhattacharjya/CE/IITG
Random mutation
7 November 2013
46
Where is a random number between [0,1]
Where, is the user defined maximum
perturbation
R.K. Bhattacharjya/CE/IITG
Normally distributed mutation
7 November 2013
47
A simple and popular method
Where is the Gaussian probability
distribution with zero mean
R.K. Bhattacharjya/CE/IITG
Polynomial mutation
7 November 2013
48
‫ݕ‬௜
ଵ,௧ାଵ
= ‫ݔ‬௜
ଵ,௧ାଵ
+ ‫ݔ‬௜
௨
− ‫ݔ‬௜
௟
ߜ௜
ߜ௜ = ቎
2‫ݑ‬௜
ଵ/ ఎ೘ାଵ − 1
1 − 2 1 − ‫ݑ‬௜
ଵ/ ఎ೘ାଵ
If ‫ݑ‬௜  0.5
If ‫ݑ‬௜ ≥ 0.5
Deb and Goyal,1996 proposed
R.K. Bhattacharjya/CE/IITG
Multi-modal optimization
7 November 2013
49
Solve this problem using
simple Genetic Algorithms
R.K. Bhattacharjya/CE/IITG
After Generation 200
7 November 2013
50
The population are in and around
the global optimal solution
R.K. Bhattacharjya/CE/IITG
Multi-modal optimization
7 November 2013
51
Niche count
Modified fitness
Sharing function
Simple modification of Simple Genetic Algorithms can capture all the optimal
solution of the problem including global optimal solutions
Basic idea is that reduce the fitness of crowded solution, which can be
implemented using following three steps.
R.K. Bhattacharjya/CE/IITG
Hand calculation
7 November 2013
52
Maximize
Sol String Decoded
value
x f
1 110100 52 1.651 0.890
2 101100 44 1.397 0.942
3 011101 29 0.921 0.246
4 001011 11 0.349 0.890
5 110000 48 1.524 0.997
6 101110 46 1.460 0.992
R.K. Bhattacharjya/CE/IITG
Distance table
7 November 2013
53
dij 1 2 3 4 5 6
1 0 0.254 0.73 1.302 0.127 0.191
2 0.254 0 0.476 1.048 0.127 0.063
3 0.73 0.476 0 0.572 0.603 0.539
4 1.302 1.048 0.572 0 1.175 1.111
5 0.127 0.127 0.603 1.175 0 0.064
6 0.191 0.063 0.539 1.111 0.064 0
R.K. Bhattacharjya/CE/IITG
Sharing function values
7 November 2013
54
sh(dij) 1 2 3 4 5 6 nc
1 1 0.492 0 0 0.746 0.618 2.856
2 0.492 1 0.048 0 0.746 0.874 3.16
3 0 0.048 1 0 0 0 1.048
4 0 0 0 1 0 0 1
5 0.746 0.746 0 0 1 0.872 3.364
6 0.618 0.874 0 0 0.872 1 3.364
R.K. Bhattacharjya/CE/IITG
Sharing fitness value
7 November 2013
55
Sol String Decoded
value
x f nc f’
1 110100 52 1.651 0.890 2.856 0.312
2 101100 44 1.397 0.942 3.160 0.300
3 011101 29 0.921 0.246 1.048 0.235
4 001011 11 0.349 0.890 1.000 0.890
5 110000 48 1.524 0.997 3.364 0.296
6 101110 46 1.460 0.992 3.364 0.295
R.K. Bhattacharjya/CE/IITG
Solutions obtained using modified
fitness value
7 November 2013
56
R.K. Bhattacharjya/CE/IITG
Evolutionary Strategies
7 November 2013
57
 ES use real parameter value
 ES does not use crossover operator
 It is just like a real coded genetic algorithms with
selection and mutation operators only
R.K. Bhattacharjya/CE/IITG
Two members ES: (1+1) ES
7 November 2013
58
 In each iteration one parent is used to create
one offspring by using Gaussian mutation
operator
R.K. Bhattacharjya/CE/IITG
Two members ES: (1+1) ES
7 November 2013
59
 Step1: Choose a initial solution and a mutation
strength
 Step2: Create a mutate solution
 Step 3: If , replace with
 Step4: If termination criteria is satisfied, stop, else
go to step 2
R.K. Bhattacharjya/CE/IITG
Two members ES: (1+1) ES
7 November 2013
60
 Strength of the algorithm is the proper value of
 Rechenberg postulate
 The ratio of successful mutations to all the mutations
should be 1/5. If this ratio is greater than 1/5, increase
mutation strength. If it is less than 1/5, decrease the
mutation strength.
R.K. Bhattacharjya/CE/IITG
Two members ES: (1+1) ES
7 November 2013
61
 A mutation is defined as successful if the mutated
offspring is better than the parent solution.
 If is the ratio of successful mutation over n trial,
Schwefel (1981) suggested a factor in
the following update rule
R.K. Bhattacharjya/CE/IITG
Matlab code
7 November 2013
62
7 November 2013
63
R.K. Bhattacharjya/CE/IITG
Some results of 1+1 ES
7 November 2013
64
Optimal Solution is
X*= [3.00 1.99]
Objective function value f
= 0.0031007
1
2
2
5
5
10
10
10
20
20
20
20
20
50
50
5
0
50
50
1
0
0
1
0
0
100
100
1
0
0
100
20
0
2
0
0
200
200
200
X
Y
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
R.K. Bhattacharjya/CE/IITG
Multimember ES
7 November 2013
65
ES
Step1: Choose an initial population of solutions
and mutation strength
Step2: Create mutated solution
Step3: Combine and , and choose the best
solutions
Step4: Terminate? Else go to step 2
R.K. Bhattacharjya/CE/IITG
Multimember ES
7 November 2013
66
ES
Through mutation
Through selection
R.K. Bhattacharjya/CE/IITG
Multimember ES
7 November 2013
67
ES
Offspring
Through mutation
Through selection
R.K. Bhattacharjya/CE/IITG
Multi-objective optimization
7 November 2013
68
Price
Comfort
R.K. Bhattacharjya/CE/IITG
Multi-objective optimization
7 November 2013
69
Two objectives are
• Minimize weight
• Minimize deflection
R.K. Bhattacharjya/CE/IITG
Multi-objective optimization
7 November 2013
70
 More than one objectives
 Objectives are conflicting in nature
 Dealing with two search space
 Decision variable space
 Objective space
 Unique mapping between the objectives and often the
mapping is non-linear
 Properties of the two search space are not similar
 Proximity of two solutions in one search space does not
mean a proximity in other search space
R.K. Bhattacharjya/CE/IITG
Multi-objective optimization
7 November 2013
71
R.K. Bhattacharjya/CE/IITG
Vector Evaluated Genetic Algorithm (VEGA)
7 November 2013
72
f1
f2
f3
f4
…
fn
P1
P2
P3
P4
Pn
…
Crossover
and
Mutation
Old population Mating pool New population
Propose by Schaffer (1984)
R.K. Bhattacharjya/CE/IITG
Non-dominated selection heuristic
7 November 2013
73
Give more emphasize on the non-dominated solutions of the population
This can be implemented by subtracting ∈ from the dominated solution fitness value
Suppose ܰᇱ is the number of sub-population and ݊ᇱ is the non-dominated
solutions. Then total reduction is ܰᇱ − ݊ᇱ ∈.
The total reduction is then redistributed among the non-dominated solution
by adding an amount ܰᇱ − ݊ᇱ ∈/݊ᇱ
This method has two main implications
Non-dominated solutions are given more importance
Additional equal emphasis has been given to all the non-dominated solution
R.K. Bhattacharjya/CE/IITG
Weighted based genetic algorithm (WBGA)
7 November 2013
74
 The fitness is calculated
 The spread is maintained using the sharing function
approach
Niche count Modified fitness
Sharing function
R.K. Bhattacharjya/CE/IITG
Multiple objective genetic algorithm (MOGA)
7 November 2013
75
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
x1
x2
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
10
20
30
40
50
60
f1
f2
Solution space Objective space
R.K. Bhattacharjya/CE/IITG
Maximize f1
Maximize
f2Multiple objective genetic algorithm (MOGA)
R.K. Bhattacharjya/CE/IITG
Multiple objective genetic algorithm (MOGA)
7 November 2013
77
Fonseca and Fleming (1993) first
introduced multiple objective
genetic algorithm (MOGA)
The assigned fitness value based on
the non-dominated ranking.
The rank is assigned as ‫ݎ‬௜ = 1 + ݊௜
where ‫ݎ‬௜ is the ranking of the ݅௧௛
solution and ݊௜ is the number of
solutions that dominate the solution.
1
1
1
1
4
4
6
R.K. Bhattacharjya/CE/IITG
7 November 2013
78
 Fonseca and Fleming (1993) maintain the diversity
among the non-dominated solution using niching
among the solution of same rank.
 The normalize distance was calculated as,
 The niche count was calculated as,
Multiple objective genetic algorithm (MOGA)
R.K. Bhattacharjya/CE/IITG
NSGA
7 November 2013
79
 Srinivas and Deb (1994) proposed NSGA
 The algorithm is based on the non-dominated
sorting.
 The spread on the Pareto optimal front is
maintained using sharing function
R.K. Bhattacharjya/CE/IITG
NSGA II
7 November 2013
80
 Non-dominated Sorting Genetic Algorithms
 NSGA II is an elitist non-dominated sorting Genetic
Algorithm to solve multi-objective optimization problem
developed by Prof. K. Deb and his student at IIT
Kanpur.
 It has been reported that NSGA II can converge to the
global Pareto-optimal front and can maintain the
diversity of population on the Pareto-optimal front
R.K. Bhattacharjya/CE/IITG
Non-dominated sorting
7 November 2013
81
Objective 1 (Minimize)
Objective
2
(Minimize)
1
2
3
4
5
6
Objective 1 (Minimize)
Objective
2
(Minimize)
1
2
3
4
5
Infeasible Region
Feasible Region
R.K. Bhattacharjya/CE/IITG
Calculation crowding distance
7 November 2013
82
Cd, the crowded distance is the
perimeter of the rectangle
constituted by the two
neighboring solutions
Cd value more means that the
solution is less crowded
Cd value less means that the
solution is more crowded
݅
݅ − 1
݅ + 1
Objective 1
Objective
2
R.K. Bhattacharjya/CE/IITG
Crowded tournament operator
7 November 2013
83
 A solution ݅ wins a tournament with another solution
݆,
 If the solution ݅ has better rank than ݆, i.e. ‫ݎ‬௜  ‫ݎ‬௝
 If they have the same rank, but ݅ has a better crowding
distance than ݆, i.e. ‫ݎ‬௜ = ‫ݎ‬௝ and ݀௜  ݀௝.
R.K. Bhattacharjya/CE/IITG
Replacement scheme of NSGA II
7 November 2013
84
P
Q
‫ݎ‬ଵ
‫ݎ‬ଶ
‫ݎ‬ଷ
‫ݎ‬ସ
‫ݎ‬ହ
‫ݎ‬ଵ
‫ݎ‬ଶ
‫ݎ‬ଷ
Selected
Rejected
Rejected based on crowding
distance
Non dominated sorting
Initialize population of size N
Calculate all the objective functions
Rank the population according to non-
dominating criteria
Selection
Crossover
Mutation
Calculate objective function of the
new population
Combine old and new population
Non-dominating ranking on the
combined population
Replace parent population by the better
members of the combined population
Calculate crowding distance of all
the solutions
Get the N member from the
combined population on the basis
of rank and crowding distance
Termination
Criteria?
Pareto-optimal solution
Yes
No
7 November 2013
85
R.K. Bhattacharjya/CE/IITG
Constraints handling in GA
7 November 2013
86
-5
5
15
25
35
45
55
0 2 4 6 8 10 12
f(X)
X
݂(‫)ݔ‬
R.K. Bhattacharjya/CE/IITG
Constraints handling in GA
7 November 2013
87
-5
5
15
25
35
45
55
0 2 4 6 8 10 12
f(X)
X
݂(‫)ݔ‬
݂ ‫ݔ‬ + ܴ ݃ ‫ݔ‬
R.K. Bhattacharjya/CE/IITG
Constraints handling in GA
7 November 2013
88
-5
5
15
25
35
45
55
0 2 4 6 8 10 12
f(X)
X
݂(‫)ݔ‬
݂ ‫ݔ‬ + ܴ ݃ ‫ݔ‬
݂௠௔௫ + ݃ ‫ݔ‬
R.K. Bhattacharjya/CE/IITG
Constrain handling in GA
7 November 2013
89
‫ܨ‬ = ݂ ܺ
Minimize ݂ ܺ
Subject to
݃௝ ‫ݔ‬ ≤ 0
ℎ௞ ‫ݔ‬ = 0
݆ = 1,2,3, … , ‫ܬ‬
݇ = 1,2,3, … , ‫ܭ‬
= ݂௠௔௫ + ෍ ݃௝ ‫ݔ‬ + ෍ ℎ௞ ‫ݔ‬
௄
௞ୀଵ
௃
௝ୀଵ
If ܺ is feasible
Otherwise
Deb’s approach
R.K. Bhattacharjya/CE/IITG
THANKS
7 November 2013
90

More Related Content

Similar to Genetic Algorithms.pdf

Comparative study of different algorithms
Comparative study of different algorithmsComparative study of different algorithms
Comparative study of different algorithms
ijfcstjournal
 
Genetic algorithm fitness function
Genetic algorithm fitness functionGenetic algorithm fitness function
Genetic algorithm fitness function
Prof Ansari
 
Selecting Best Tractor Ranking Wise by Software using MADM(Multiple –Attribut...
Selecting Best Tractor Ranking Wise by Software using MADM(Multiple –Attribut...Selecting Best Tractor Ranking Wise by Software using MADM(Multiple –Attribut...
Selecting Best Tractor Ranking Wise by Software using MADM(Multiple –Attribut...
IRJET Journal
 
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
IOSR Journals
 
M017127578
M017127578M017127578
M017127578
IOSR Journals
 
IRJET- Optimization of Riser through Genetic Alorithm
IRJET- Optimization of Riser through Genetic AlorithmIRJET- Optimization of Riser through Genetic Alorithm
IRJET- Optimization of Riser through Genetic Alorithm
IRJET Journal
 
IRJET- Optimization of Riser through Genetic Alorithm
IRJET- Optimization of Riser through Genetic AlorithmIRJET- Optimization of Riser through Genetic Alorithm
IRJET- Optimization of Riser through Genetic Alorithm
IRJET Journal
 
COMPARATIVE STUDY OF DIFFERENT ALGORITHMS TO SOLVE N QUEENS PROBLEM
COMPARATIVE STUDY OF DIFFERENT ALGORITHMS TO SOLVE N QUEENS PROBLEMCOMPARATIVE STUDY OF DIFFERENT ALGORITHMS TO SOLVE N QUEENS PROBLEM
COMPARATIVE STUDY OF DIFFERENT ALGORITHMS TO SOLVE N QUEENS PROBLEM
ijfcstjournal
 
Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02
Amna Saeed
 
Biology-Derived Algorithms in Engineering Optimization
Biology-Derived Algorithms in Engineering OptimizationBiology-Derived Algorithms in Engineering Optimization
Biology-Derived Algorithms in Engineering Optimization
Xin-She Yang
 
Lecture29
Lecture29Lecture29
Adaptive Selection in Evolutionary Algorithm thesis
Adaptive Selection in Evolutionary Algorithm thesisAdaptive Selection in Evolutionary Algorithm thesis
Adaptive Selection in Evolutionary Algorithm thesis
Riyad Parvez
 
Synergetic Approach for the Selection of a Furnace Fuel in Production of Ferr...
Synergetic Approach for the Selection of a Furnace Fuel in Production of Ferr...Synergetic Approach for the Selection of a Furnace Fuel in Production of Ferr...
Synergetic Approach for the Selection of a Furnace Fuel in Production of Ferr...
Waqas Tariq
 
A Framework For Automatic Question Answering in Indian Languages
A Framework For Automatic Question Answering in Indian LanguagesA Framework For Automatic Question Answering in Indian Languages
A Framework For Automatic Question Answering in Indian Languages
IIIT Hyderabad
 
Da35573574
Da35573574Da35573574
Da35573574
IJERA Editor
 
Kaggle kenneth
Kaggle kennethKaggle kenneth
Kaggle kenneth
kenluck2001
 
Software testing using genetic algorithms
Software testing using genetic algorithmsSoftware testing using genetic algorithms
Software testing using genetic algorithms
Nurhussen Menza
 
Bx34452461
Bx34452461Bx34452461
Bx34452461
IJERA Editor
 
Clustered Genetic Algorithm to solve Multidimensional Knapsack Problem
Clustered Genetic Algorithm to solve Multidimensional Knapsack ProblemClustered Genetic Algorithm to solve Multidimensional Knapsack Problem
Clustered Genetic Algorithm to solve Multidimensional Knapsack Problem
ijtsrd
 
A Survey On Genetic Algorithms
A Survey On Genetic AlgorithmsA Survey On Genetic Algorithms
A Survey On Genetic Algorithms
Valerie Felton
 

Similar to Genetic Algorithms.pdf (20)

Comparative study of different algorithms
Comparative study of different algorithmsComparative study of different algorithms
Comparative study of different algorithms
 
Genetic algorithm fitness function
Genetic algorithm fitness functionGenetic algorithm fitness function
Genetic algorithm fitness function
 
Selecting Best Tractor Ranking Wise by Software using MADM(Multiple –Attribut...
Selecting Best Tractor Ranking Wise by Software using MADM(Multiple –Attribut...Selecting Best Tractor Ranking Wise by Software using MADM(Multiple –Attribut...
Selecting Best Tractor Ranking Wise by Software using MADM(Multiple –Attribut...
 
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
 
M017127578
M017127578M017127578
M017127578
 
IRJET- Optimization of Riser through Genetic Alorithm
IRJET- Optimization of Riser through Genetic AlorithmIRJET- Optimization of Riser through Genetic Alorithm
IRJET- Optimization of Riser through Genetic Alorithm
 
IRJET- Optimization of Riser through Genetic Alorithm
IRJET- Optimization of Riser through Genetic AlorithmIRJET- Optimization of Riser through Genetic Alorithm
IRJET- Optimization of Riser through Genetic Alorithm
 
COMPARATIVE STUDY OF DIFFERENT ALGORITHMS TO SOLVE N QUEENS PROBLEM
COMPARATIVE STUDY OF DIFFERENT ALGORITHMS TO SOLVE N QUEENS PROBLEMCOMPARATIVE STUDY OF DIFFERENT ALGORITHMS TO SOLVE N QUEENS PROBLEM
COMPARATIVE STUDY OF DIFFERENT ALGORITHMS TO SOLVE N QUEENS PROBLEM
 
Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02
 
Biology-Derived Algorithms in Engineering Optimization
Biology-Derived Algorithms in Engineering OptimizationBiology-Derived Algorithms in Engineering Optimization
Biology-Derived Algorithms in Engineering Optimization
 
Lecture29
Lecture29Lecture29
Lecture29
 
Adaptive Selection in Evolutionary Algorithm thesis
Adaptive Selection in Evolutionary Algorithm thesisAdaptive Selection in Evolutionary Algorithm thesis
Adaptive Selection in Evolutionary Algorithm thesis
 
Synergetic Approach for the Selection of a Furnace Fuel in Production of Ferr...
Synergetic Approach for the Selection of a Furnace Fuel in Production of Ferr...Synergetic Approach for the Selection of a Furnace Fuel in Production of Ferr...
Synergetic Approach for the Selection of a Furnace Fuel in Production of Ferr...
 
A Framework For Automatic Question Answering in Indian Languages
A Framework For Automatic Question Answering in Indian LanguagesA Framework For Automatic Question Answering in Indian Languages
A Framework For Automatic Question Answering in Indian Languages
 
Da35573574
Da35573574Da35573574
Da35573574
 
Kaggle kenneth
Kaggle kennethKaggle kenneth
Kaggle kenneth
 
Software testing using genetic algorithms
Software testing using genetic algorithmsSoftware testing using genetic algorithms
Software testing using genetic algorithms
 
Bx34452461
Bx34452461Bx34452461
Bx34452461
 
Clustered Genetic Algorithm to solve Multidimensional Knapsack Problem
Clustered Genetic Algorithm to solve Multidimensional Knapsack ProblemClustered Genetic Algorithm to solve Multidimensional Knapsack Problem
Clustered Genetic Algorithm to solve Multidimensional Knapsack Problem
 
A Survey On Genetic Algorithms
A Survey On Genetic AlgorithmsA Survey On Genetic Algorithms
A Survey On Genetic Algorithms
 

Recently uploaded

GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdfGUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
ProexportColombia1
 
PMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOCPMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOC
itssurajthakur06
 
Jet Propulsion and its working principle.pdf
Jet Propulsion and its working principle.pdfJet Propulsion and its working principle.pdf
Jet Propulsion and its working principle.pdf
KIET Group of Institutions
 
NEC 2023 NATIONAL ELECTRICAL DODE 2023 NEC
NEC 2023 NATIONAL ELECTRICAL DODE 2023 NECNEC 2023 NATIONAL ELECTRICAL DODE 2023 NEC
NEC 2023 NATIONAL ELECTRICAL DODE 2023 NEC
PANIQUEPOMAJAELYOSSE
 
Social media management system project report.pdf
Social media management system project report.pdfSocial media management system project report.pdf
Social media management system project report.pdf
Kamal Acharya
 
Vernier Caliper and How to use Vernier Caliper.ppsx
Vernier Caliper and How to use Vernier Caliper.ppsxVernier Caliper and How to use Vernier Caliper.ppsx
Vernier Caliper and How to use Vernier Caliper.ppsx
Tool and Die Tech
 
Stiffness Method for structure analysis - Truss
Stiffness Method  for structure analysis - TrussStiffness Method  for structure analysis - Truss
Stiffness Method for structure analysis - Truss
adninhaerul
 
Synthetic Test Collections for Retrieval Evaluation (Poster)
Synthetic Test Collections for Retrieval Evaluation (Poster)Synthetic Test Collections for Retrieval Evaluation (Poster)
Synthetic Test Collections for Retrieval Evaluation (Poster)
Hossein A. (Saeed) Rahmani
 
Benefits of Studying Artificial Intelligence - KRCE.pptx
Benefits of Studying Artificial Intelligence - KRCE.pptxBenefits of Studying Artificial Intelligence - KRCE.pptx
Benefits of Studying Artificial Intelligence - KRCE.pptx
krceseo
 
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
sanabts249
 
Unit 1 Information Storage and Retrieval
Unit 1 Information Storage and RetrievalUnit 1 Information Storage and Retrieval
Unit 1 Information Storage and Retrieval
KishorMahale5
 
Introduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer NetworkingIntroduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer Networking
Md.Shohel Rana ( M.Sc in CSE Khulna University of Engineering & Technology (KUET))
 
Quadcopter Dynamics, Stability and Control
Quadcopter Dynamics, Stability and ControlQuadcopter Dynamics, Stability and Control
Quadcopter Dynamics, Stability and Control
Blesson Easo Varghese
 
IWISS Catalog 2024
IWISS Catalog 2024IWISS Catalog 2024
IWISS Catalog 2024
Iwiss Tools Co.,Ltd
 
Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.
Tool and Die Tech
 
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
YanKing2
 
Ludo system project report management .pdf
Ludo  system project report management .pdfLudo  system project report management .pdf
Ludo system project report management .pdf
Kamal Acharya
 
IS Code SP 23: Handbook on concrete mixes
IS Code SP 23: Handbook  on concrete mixesIS Code SP 23: Handbook  on concrete mixes
IS Code SP 23: Handbook on concrete mixes
Mani Krishna Sarkar
 
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
Jim Mimlitz, P.E.
 
Exploring Deep Learning Models for Image Recognition: A Comparative Review
Exploring Deep Learning Models for Image Recognition: A Comparative ReviewExploring Deep Learning Models for Image Recognition: A Comparative Review
Exploring Deep Learning Models for Image Recognition: A Comparative Review
sipij
 

Recently uploaded (20)

GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdfGUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
GUIA_LEGAL_CHAPTER-9_COLOMBIAN ELECTRICITY (1).pdf
 
PMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOCPMSM-Motor-Control : A research about FOC
PMSM-Motor-Control : A research about FOC
 
Jet Propulsion and its working principle.pdf
Jet Propulsion and its working principle.pdfJet Propulsion and its working principle.pdf
Jet Propulsion and its working principle.pdf
 
NEC 2023 NATIONAL ELECTRICAL DODE 2023 NEC
NEC 2023 NATIONAL ELECTRICAL DODE 2023 NECNEC 2023 NATIONAL ELECTRICAL DODE 2023 NEC
NEC 2023 NATIONAL ELECTRICAL DODE 2023 NEC
 
Social media management system project report.pdf
Social media management system project report.pdfSocial media management system project report.pdf
Social media management system project report.pdf
 
Vernier Caliper and How to use Vernier Caliper.ppsx
Vernier Caliper and How to use Vernier Caliper.ppsxVernier Caliper and How to use Vernier Caliper.ppsx
Vernier Caliper and How to use Vernier Caliper.ppsx
 
Stiffness Method for structure analysis - Truss
Stiffness Method  for structure analysis - TrussStiffness Method  for structure analysis - Truss
Stiffness Method for structure analysis - Truss
 
Synthetic Test Collections for Retrieval Evaluation (Poster)
Synthetic Test Collections for Retrieval Evaluation (Poster)Synthetic Test Collections for Retrieval Evaluation (Poster)
Synthetic Test Collections for Retrieval Evaluation (Poster)
 
Benefits of Studying Artificial Intelligence - KRCE.pptx
Benefits of Studying Artificial Intelligence - KRCE.pptxBenefits of Studying Artificial Intelligence - KRCE.pptx
Benefits of Studying Artificial Intelligence - KRCE.pptx
 
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
 
Unit 1 Information Storage and Retrieval
Unit 1 Information Storage and RetrievalUnit 1 Information Storage and Retrieval
Unit 1 Information Storage and Retrieval
 
Introduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer NetworkingIntroduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer Networking
 
Quadcopter Dynamics, Stability and Control
Quadcopter Dynamics, Stability and ControlQuadcopter Dynamics, Stability and Control
Quadcopter Dynamics, Stability and Control
 
IWISS Catalog 2024
IWISS Catalog 2024IWISS Catalog 2024
IWISS Catalog 2024
 
Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.
 
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
Natural Is The Best: Model-Agnostic Code Simplification for Pre-trained Large...
 
Ludo system project report management .pdf
Ludo  system project report management .pdfLudo  system project report management .pdf
Ludo system project report management .pdf
 
IS Code SP 23: Handbook on concrete mixes
IS Code SP 23: Handbook  on concrete mixesIS Code SP 23: Handbook  on concrete mixes
IS Code SP 23: Handbook on concrete mixes
 
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
 
Exploring Deep Learning Models for Image Recognition: A Comparative Review
Exploring Deep Learning Models for Image Recognition: A Comparative ReviewExploring Deep Learning Models for Image Recognition: A Comparative Review
Exploring Deep Learning Models for Image Recognition: A Comparative Review
 

Genetic Algorithms.pdf

  • 1. R.K. Bhattacharjya/CE/IITG Introduction To Genetic Algorithms Dr. Rajib Kumar Bhattacharjya Department of Civil Engineering IIT Guwahati Email: rkbc@iitg.ernet.in 7 November 2013 1
  • 2. R.K. Bhattacharjya/CE/IITG References 7 November 2013 2 D. E. Goldberg, ‘Genetic Algorithm In Search, Optimization And Machine Learning’, New York: Addison – Wesley (1989) John H. Holland ‘Genetic Algorithms’, Scientific American Journal, July 1992. Kalyanmoy Deb, ‘An Introduction To Genetic Algorithms’, Sadhana, Vol. 24 Parts 4 And 5.
  • 3. R.K. Bhattacharjya/CE/IITG Introduction to optimization 7 November 2013 3 Global optima Local optima Local optima Local optima Local optima f X
  • 4. R.K. Bhattacharjya/CE/IITG Introduction to optimization 7 November 2013 4 Multiple optimal solutions
  • 5. R.K. Bhattacharjya/CE/IITG Genetic Algorithms 7 November 2013 5 Genetic Algorithms are the heuristic search and optimization techniques that mimic the process of natural evolution.
  • 6. R.K. Bhattacharjya/CE/IITG Principle Of Natural Selection 7 November 2013 6 “Select The Best, Discard The Rest”
  • 7. R.K. Bhattacharjya/CE/IITG An Example…. 7 November 2013 7 Giraffes have long necks Giraffes with slightly longer necks could feed on leaves of higher branches when all lower ones had been eaten off. They had a better chance of survival. Favorable characteristic propagated through generations of giraffes. Now, evolved species has long necks.
  • 8. R.K. Bhattacharjya/CE/IITG 7 November 2013 8 This longer necks may have due to the effect of mutation initially. However as it was favorable, this was propagated over the generations. An Example….
  • 9. R.K. Bhattacharjya/CE/IITG Evolution of species 7 November 2013 9 Initial Population of animals Struggle For Existence Survival Of the Fittest Surviving Individuals Reproduce, Propagate Favorable Characteristics Millions Of Years Evolved Species
  • 10. R.K. Bhattacharjya/CE/IITG 7 November 2013 10 Thus genetic algorithms implement the optimization strategies by simulating evolution of species through natural selection
  • 11. R.K. Bhattacharjya/CE/IITG Simple Genetic Algorithms 7 November 2013 11 Start population Initialize population Solution? Optimum Solution? Evaluate Solutions YES Stop T = 0 T=T+1 Selection Crossover Crossover Mutation Mutation NO
  • 12. R.K. Bhattacharjya/CE/IITG Simple Genetic Algorithm 7 November 2013 12 function sga () { Initialize population; Calculate fitness function; While(fitness value != termination criteria) { Selection; Crossover; Mutation; Calculate fitness function; } }
  • 13. R.K. Bhattacharjya/CE/IITG GA Operators and Parameters 7 November 2013 13 Selection Crossover Mutation Now we will discuss about genetic operators
  • 14. R.K. Bhattacharjya/CE/IITG Selection 7 November 2013 14 The process that determines which solutions are to be preserved and allowed to reproduce and which ones deserve to die out. The primary objective of the selection operator is to emphasize the good solutions and eliminate the bad solutions in a population while keeping the population size constant. “Selects the best, discards the rest”
  • 15. R.K. Bhattacharjya/CE/IITG Functions of Selection operator 7 November 2013 15 Identify the good solutions in a population Make multiple copies of the good solutions Eliminate bad solutions from the population so that multiple copies of good solutions can be placed in the population Now how to identify the good solutions?
  • 16. R.K. Bhattacharjya/CE/IITG Fitness function 7 November 2013 16 A fitness function value quantifies the optimality of a solution. The value is used to rank a particular solution against all the other solutions A fitness value is assigned to each solution depending on how close it is actually to the optimal solution of the problem A fitness value can be assigned to evaluate the solutions
  • 17. R.K. Bhattacharjya/CE/IITG Assigning a fitness value 7 November 2013 17 Considering c = 0.0654 23 d h
  • 18. R.K. Bhattacharjya/CE/IITG Selection operator 7 November 2013 18 There are different techniques to implement selection in Genetic Algorithms. They are: Tournament selection Roulette wheel selection Proportionate selection Rank selection Steady state selection, etc
  • 19. R.K. Bhattacharjya/CE/IITG Tournament selection 7 November 2013 19 In tournament selection several tournaments are played among a few individuals. The individuals are chosen at random from the population. The winner of each tournament is selected for next generation. Selection pressure can be adjusted by changing the tournament size. Weak individuals have a smaller chance to be selected if tournament size is large.
  • 20. R.K. Bhattacharjya/CE/IITG Tournament selection 7 November 2013 20 22 13 +30 22 40 32 32 25 7 +45 25 25 32 25 22 40 22 13 +30 7 +45 13 +30 22 32 25 13 +30 22 25 Selected Best solution will have two copies Worse solution will have no copies Other solutions will have two, one or zero copies
  • 21. R.K. Bhattacharjya/CE/IITG Roulette wheel and proportionate selection 7 November 2013 21 Chrom # Fitness 1 50 2 6 3 36 4 30 5 36 6 28 186 % of RW 26.88 3.47 20.81 17.34 20.81 16.18 100.00 EC 1.61 0.19 1.16 0.97 1.16 0.90 6 AC 2 0 1 1 1 1 6 1 21% 2 3% 3 21% 4 18% 5 21% 6 16% Roulet wheel Parents are selected according to their fitness values The better chromosomes have more chances to be selected
  • 22. R.K. Bhattacharjya/CE/IITG Rank selection 7 November 2013 22 Chrom # Fitness 1 37 2 6 3 36 4 30 5 36 6 28 Chrom # Fitness 1 37 3 36 5 36 4 30 6 28 2 6 Sort according to fitness Assign raking Rank 6 5 4 3 2 1 Chrom # 1 3 5 4 6 2 % of RW 29 24 19 14 10 5 Chrom # 1 3 5 4 6 2 Roulette wheel 6 5 4 3 2 1 EC AC 1.714 2 1.429 1 1.143 1 0.857 1 0.571 1 0.286 0 Chrom # 1 3 5 4 6 2
  • 23. R.K. Bhattacharjya/CE/IITG Steady state selection 7 November 2013 23 In this method, a few good chromosomes are used for creating new offspring in every iteration. The rest of population migrates to the next generation without going through the selection process. Then some bad chromosomes are removed and the new offspring is placed in their places Good Bad New offspring Good New offspring
  • 24. R.K. Bhattacharjya/CE/IITG How to implement crossover 7 November 2013 24 Source: http://www.biologycorner.com/bio1/celldivision-chromosomes.html The crossover operator is used to create new solutions from the existing solutions available in the mating pool after applying selection operator. This operator exchanges the gene information between the solutions in the mating pool. 0 1 0 0 1 1 0 1 1 0 Encoding of solution is necessary so that our solutions look like a chromosome
  • 25. R.K. Bhattacharjya/CE/IITG Encoding 7 November 2013 25 The process of representing a solution in the form of a string that conveys the necessary information. Just as in a chromosome, each gene controls a particular characteristic of the individual, similarly, each bit in the string represents a characteristic of the solution.
  • 26. R.K. Bhattacharjya/CE/IITG Encoding Methods 7 November 2013 26 Most common method of encoding is binary coded. Chromosomes are strings of 1 and 0 and each position in the chromosome represents a particular characteristic of the problem Decoded value 52 26 Mapping between decimal and binary value
  • 27. R.K. Bhattacharjya/CE/IITG Encoding Methods 7 November 2013 27 d h (d,h) = (8,10) cm Chromosome = [0100001010] Defining a string [0100001010] d h
  • 28. R.K. Bhattacharjya/CE/IITG Crossover operator 7 November 2013 28 The most popular crossover selects any two solutions strings randomly from the mating pool and some portion of the strings is exchanged between the strings. The selection point is selected randomly. A probability of crossover is also introduced in order to give freedom to an individual solution string to determine whether the solution would go for crossover or not. Solution 1 Solution 2 Child 1 Child 2
  • 29. R.K. Bhattacharjya/CE/IITG Binary Crossover 7 November 2013 29 Source: Deb 1999
  • 30. R.K. Bhattacharjya/CE/IITG Mutation operator 7 November 2013 30 Though crossover has the main responsibility to search for the optimal solution, mutation is also used for this purpose. Mutation is the occasional introduction of new features in to the solution strings of the population pool to maintain diversity in the population. Before mutation After mutation
  • 31. R.K. Bhattacharjya/CE/IITG Binary Mutation 7 November 2013 31 Mutation operator changes a 1 to 0 or vise versa, with a mutation probability of . The mutation probability is generally kept low for steady convergence. A high value of mutation probability would search here and there like a random search technique. Source: Deb 1999
  • 32. R.K. Bhattacharjya/CE/IITG Elitism 7 November 2013 32 Crossover and mutation may destroy the best solution of the population pool Elitism is the preservation of few best solutions of the population pool Elitism is defined in percentage or in number
  • 33. R.K. Bhattacharjya/CE/IITG Nature to Computer Mapping 7 November 2013 33 Nature Computer Population Individual Fitness Chromosome Gene Set of solutions Solution to a problem Quality of a solution Encoding for a solution Part of the encoding solution
  • 34. R.K. Bhattacharjya/CE/IITG An example problem 7 November 2013 34 Consider 6 bit string to represent the solution, then 000000 = 0 and 111111 = Assume population size of 4 Let us solve this problem by hand calculation
  • 35. R.K. Bhattacharjya/CE/IITG An example problem 7 November 2013 35 Actual count 2 1 0 1 Sol No Binary String 1 100101 2 001100 3 111010 4 101110 DV 37 12 58 46 x value 0.587 0.19 0.921 0.73 f 0.96 0.56 0.25 0.75 Avg Max F 0.96 0.56 0.25 0.75 0.563 0.96 Relative Fitness 0.38 0.22 0.10 0.30 Expected count 1.53 0.89 0.39 1.19 Initialize population Calculate decoded value Calculate real value Calculate objective function value Calculate fitness value Calculate relative fitness value Calculate expected count Calculate actual count Selection: Proportionate selection Initial population Fitness calculation Decoding
  • 36. R.K. Bhattacharjya/CE/IITG An example problem: Crossover 7 November 2013 36 Sol No Matting pool 1 100101 2 001100 3 100101 4 101110 f F 0.97 0.97 0.60 0.60 0.75 0.75 0.96 0.96 Avg 0.8223 Max 0.97 CS 3 3 2 2 New Binary String 100100 001101 101110 100101 DV 36 13 46 37 x value 0.57 0.21 0.73 0.59 Matting pool Random generation of crossover site New population Crossover: Single point
  • 37. R.K. Bhattacharjya/CE/IITG An example problem: Mutation 7 November 2013 37 Sol No 1 2 3 4 Population after crossover 100100 001101 101110 100101 Population after mutation 100000 101101 100110 101101 f F 1.00 1.00 0.78 0.78 0.95 0.95 0.78 0.78 Avg 0.878 Max 1.00 DV 32 45 38 45 x value 0.51 0.71 0.60 0.71 Mutation
  • 38. R.K. Bhattacharjya/CE/IITG Real coded Genetic Algorithms 7 November 2013 38 Disadvantage of binary coded GA more computation lower accuracy longer computing time solution space discontinuity hamming cliff
  • 39. R.K. Bhattacharjya/CE/IITG Real coded Genetic Algorithms 7 November 2013 39 The standard genetic algorithms has the following steps 1. Choose initial population 2. Assign a fitness function 3. Perform elitism 4. Perform selection 5. Perform crossover 6. Perform mutation In case of standard Genetic Algorithms, steps 5 and 6 require bitwise manipulation.
  • 40. R.K. Bhattacharjya/CE/IITG Real coded Genetic Algorithms 7 November 2013 40 8 6 3 7 6 2 9 4 8 9 8 6 4 8 9 2 9 3 7 6 Simple crossover: similar to binary crossover P1 P2 C1 C2
  • 41. R.K. Bhattacharjya/CE/IITG Real coded Genetic Algorithms 7 November 2013 41 Linear Crossover • Parents: (x1,…,xn ) and (y1,…,yn ) • Select a single gene (k) at random • Three children are created as, ) ..., , 5 . 0 5 . 0 , ..., , ( 1 n k k k x x y x x ⋅ + ⋅ ) ..., , 5 . 0 5 . 1 , ..., , ( 1 n k k k x x y x x ⋅ − ⋅ ) ..., , 5 . 1 5 . 0 - , ..., , ( 1 n k k k x x y x x ⋅ + ⋅ • From the three children, best two are selected for the next generation
  • 42. R.K. Bhattacharjya/CE/IITG Real coded Genetic Algorithms 7 November 2013 42 Single arithmetic crossover • Parents: (x1,…,xn ) and (y1,…,yn ) • Select a single gene (k) at random • child1 is created as, • reverse for other child. e.g. with α = 0.5 ) ..., , ) 1 ( , ..., , ( 1 n k k k x x y x x ⋅ − + ⋅ α α 0.1 0.3 0.1 0.3 0.7 0.2 0.5 0.1 0.2 0.5 0.7 0.7 0.5 0.2 0.8 0.3 0.9 0.4 0.1 0.3 0.1 0.3 0.7 0.5 0.5 0.1 0.2 0.5 0.7 0.7 0.5 0.2 0.5 0.3 0.9 0.4
  • 43. R.K. Bhattacharjya/CE/IITG Real coded Genetic Algorithms 7 November 2013 43 Simple arithmetic crossover • Parents: (x1,…,xn ) and (y1,…,yn ) • Pick random gene (k) after this point mix values • child1 is created as: • reverse for other child. e.g. with α = 0.5 ) ) 1 ( n y ..., , 1 ) 1 ( 1 , ..., , 1 ( n x k x k y k x x ⋅ − + ⋅ + ⋅ − + + ⋅ α α α α 0.1 0.3 0.1 0.3 0.7 0.2 0.5 0.1 0.2 0.5 0.7 0.7 0.5 0.2 0.8 0.3 0.9 0.4 0.1 0.3 0.1 0.3 0.7 0.5 0.4 0.5 0.3 0.5 0.7 0.7 0.5 0.2 0.5 0.4 0.5 0.3
  • 44. R.K. Bhattacharjya/CE/IITG Real coded Genetic Algorithms 7 November 2013 44 Whole arithmetic crossover • Most commonly used • Parents: (x1,…,xn ) and (y1,…,yn ) • child1 is: • reverse for other child. e.g. with α = 0.5 y x ⋅ − + ⋅ ) 1 ( α α 0.1 0.3 0.1 0.3 0.6 0.2 0.5 0.1 0.2 0.5 0.7 0.7 0.5 0.2 0.8 0.3 0.9 0.4 0.3 0.5 0.4 0.4 0.4 0.5 0.4 0.5 0.3 0.3 0.5 0.4 0.4 0.4 0.5 0.4 0.5 0.3
  • 45. R.K. Bhattacharjya/CE/IITG Simulated binary crossover 7 November 2013 45 Developed by Deb and Agrawal, 1995) Where, a random number is a parameter that controls the crossover process. A high value of the parameter will create near-parent solution
  • 46. R.K. Bhattacharjya/CE/IITG Random mutation 7 November 2013 46 Where is a random number between [0,1] Where, is the user defined maximum perturbation
  • 47. R.K. Bhattacharjya/CE/IITG Normally distributed mutation 7 November 2013 47 A simple and popular method Where is the Gaussian probability distribution with zero mean
  • 48. R.K. Bhattacharjya/CE/IITG Polynomial mutation 7 November 2013 48 ‫ݕ‬௜ ଵ,௧ାଵ = ‫ݔ‬௜ ଵ,௧ାଵ + ‫ݔ‬௜ ௨ − ‫ݔ‬௜ ௟ ߜ௜ ߜ௜ = ቎ 2‫ݑ‬௜ ଵ/ ఎ೘ାଵ − 1 1 − 2 1 − ‫ݑ‬௜ ଵ/ ఎ೘ାଵ If ‫ݑ‬௜ 0.5 If ‫ݑ‬௜ ≥ 0.5 Deb and Goyal,1996 proposed
  • 49. R.K. Bhattacharjya/CE/IITG Multi-modal optimization 7 November 2013 49 Solve this problem using simple Genetic Algorithms
  • 50. R.K. Bhattacharjya/CE/IITG After Generation 200 7 November 2013 50 The population are in and around the global optimal solution
  • 51. R.K. Bhattacharjya/CE/IITG Multi-modal optimization 7 November 2013 51 Niche count Modified fitness Sharing function Simple modification of Simple Genetic Algorithms can capture all the optimal solution of the problem including global optimal solutions Basic idea is that reduce the fitness of crowded solution, which can be implemented using following three steps.
  • 52. R.K. Bhattacharjya/CE/IITG Hand calculation 7 November 2013 52 Maximize Sol String Decoded value x f 1 110100 52 1.651 0.890 2 101100 44 1.397 0.942 3 011101 29 0.921 0.246 4 001011 11 0.349 0.890 5 110000 48 1.524 0.997 6 101110 46 1.460 0.992
  • 53. R.K. Bhattacharjya/CE/IITG Distance table 7 November 2013 53 dij 1 2 3 4 5 6 1 0 0.254 0.73 1.302 0.127 0.191 2 0.254 0 0.476 1.048 0.127 0.063 3 0.73 0.476 0 0.572 0.603 0.539 4 1.302 1.048 0.572 0 1.175 1.111 5 0.127 0.127 0.603 1.175 0 0.064 6 0.191 0.063 0.539 1.111 0.064 0
  • 54. R.K. Bhattacharjya/CE/IITG Sharing function values 7 November 2013 54 sh(dij) 1 2 3 4 5 6 nc 1 1 0.492 0 0 0.746 0.618 2.856 2 0.492 1 0.048 0 0.746 0.874 3.16 3 0 0.048 1 0 0 0 1.048 4 0 0 0 1 0 0 1 5 0.746 0.746 0 0 1 0.872 3.364 6 0.618 0.874 0 0 0.872 1 3.364
  • 55. R.K. Bhattacharjya/CE/IITG Sharing fitness value 7 November 2013 55 Sol String Decoded value x f nc f’ 1 110100 52 1.651 0.890 2.856 0.312 2 101100 44 1.397 0.942 3.160 0.300 3 011101 29 0.921 0.246 1.048 0.235 4 001011 11 0.349 0.890 1.000 0.890 5 110000 48 1.524 0.997 3.364 0.296 6 101110 46 1.460 0.992 3.364 0.295
  • 56. R.K. Bhattacharjya/CE/IITG Solutions obtained using modified fitness value 7 November 2013 56
  • 57. R.K. Bhattacharjya/CE/IITG Evolutionary Strategies 7 November 2013 57 ES use real parameter value ES does not use crossover operator It is just like a real coded genetic algorithms with selection and mutation operators only
  • 58. R.K. Bhattacharjya/CE/IITG Two members ES: (1+1) ES 7 November 2013 58 In each iteration one parent is used to create one offspring by using Gaussian mutation operator
  • 59. R.K. Bhattacharjya/CE/IITG Two members ES: (1+1) ES 7 November 2013 59 Step1: Choose a initial solution and a mutation strength Step2: Create a mutate solution Step 3: If , replace with Step4: If termination criteria is satisfied, stop, else go to step 2
  • 60. R.K. Bhattacharjya/CE/IITG Two members ES: (1+1) ES 7 November 2013 60 Strength of the algorithm is the proper value of Rechenberg postulate The ratio of successful mutations to all the mutations should be 1/5. If this ratio is greater than 1/5, increase mutation strength. If it is less than 1/5, decrease the mutation strength.
  • 61. R.K. Bhattacharjya/CE/IITG Two members ES: (1+1) ES 7 November 2013 61 A mutation is defined as successful if the mutated offspring is better than the parent solution. If is the ratio of successful mutation over n trial, Schwefel (1981) suggested a factor in the following update rule
  • 64. R.K. Bhattacharjya/CE/IITG Some results of 1+1 ES 7 November 2013 64 Optimal Solution is X*= [3.00 1.99] Objective function value f = 0.0031007 1 2 2 5 5 10 10 10 20 20 20 20 20 50 50 5 0 50 50 1 0 0 1 0 0 100 100 1 0 0 100 20 0 2 0 0 200 200 200 X Y 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
  • 65. R.K. Bhattacharjya/CE/IITG Multimember ES 7 November 2013 65 ES Step1: Choose an initial population of solutions and mutation strength Step2: Create mutated solution Step3: Combine and , and choose the best solutions Step4: Terminate? Else go to step 2
  • 66. R.K. Bhattacharjya/CE/IITG Multimember ES 7 November 2013 66 ES Through mutation Through selection
  • 67. R.K. Bhattacharjya/CE/IITG Multimember ES 7 November 2013 67 ES Offspring Through mutation Through selection
  • 69. R.K. Bhattacharjya/CE/IITG Multi-objective optimization 7 November 2013 69 Two objectives are • Minimize weight • Minimize deflection
  • 70. R.K. Bhattacharjya/CE/IITG Multi-objective optimization 7 November 2013 70 More than one objectives Objectives are conflicting in nature Dealing with two search space Decision variable space Objective space Unique mapping between the objectives and often the mapping is non-linear Properties of the two search space are not similar Proximity of two solutions in one search space does not mean a proximity in other search space
  • 72. R.K. Bhattacharjya/CE/IITG Vector Evaluated Genetic Algorithm (VEGA) 7 November 2013 72 f1 f2 f3 f4 … fn P1 P2 P3 P4 Pn … Crossover and Mutation Old population Mating pool New population Propose by Schaffer (1984)
  • 73. R.K. Bhattacharjya/CE/IITG Non-dominated selection heuristic 7 November 2013 73 Give more emphasize on the non-dominated solutions of the population This can be implemented by subtracting ∈ from the dominated solution fitness value Suppose ܰᇱ is the number of sub-population and ݊ᇱ is the non-dominated solutions. Then total reduction is ܰᇱ − ݊ᇱ ∈. The total reduction is then redistributed among the non-dominated solution by adding an amount ܰᇱ − ݊ᇱ ∈/݊ᇱ This method has two main implications Non-dominated solutions are given more importance Additional equal emphasis has been given to all the non-dominated solution
  • 74. R.K. Bhattacharjya/CE/IITG Weighted based genetic algorithm (WBGA) 7 November 2013 74 The fitness is calculated The spread is maintained using the sharing function approach Niche count Modified fitness Sharing function
  • 75. R.K. Bhattacharjya/CE/IITG Multiple objective genetic algorithm (MOGA) 7 November 2013 75 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 x1 x2 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 10 20 30 40 50 60 f1 f2 Solution space Objective space
  • 77. R.K. Bhattacharjya/CE/IITG Multiple objective genetic algorithm (MOGA) 7 November 2013 77 Fonseca and Fleming (1993) first introduced multiple objective genetic algorithm (MOGA) The assigned fitness value based on the non-dominated ranking. The rank is assigned as ‫ݎ‬௜ = 1 + ݊௜ where ‫ݎ‬௜ is the ranking of the ݅௧௛ solution and ݊௜ is the number of solutions that dominate the solution. 1 1 1 1 4 4 6
  • 78. R.K. Bhattacharjya/CE/IITG 7 November 2013 78 Fonseca and Fleming (1993) maintain the diversity among the non-dominated solution using niching among the solution of same rank. The normalize distance was calculated as, The niche count was calculated as, Multiple objective genetic algorithm (MOGA)
  • 79. R.K. Bhattacharjya/CE/IITG NSGA 7 November 2013 79 Srinivas and Deb (1994) proposed NSGA The algorithm is based on the non-dominated sorting. The spread on the Pareto optimal front is maintained using sharing function
  • 80. R.K. Bhattacharjya/CE/IITG NSGA II 7 November 2013 80 Non-dominated Sorting Genetic Algorithms NSGA II is an elitist non-dominated sorting Genetic Algorithm to solve multi-objective optimization problem developed by Prof. K. Deb and his student at IIT Kanpur. It has been reported that NSGA II can converge to the global Pareto-optimal front and can maintain the diversity of population on the Pareto-optimal front
  • 81. R.K. Bhattacharjya/CE/IITG Non-dominated sorting 7 November 2013 81 Objective 1 (Minimize) Objective 2 (Minimize) 1 2 3 4 5 6 Objective 1 (Minimize) Objective 2 (Minimize) 1 2 3 4 5 Infeasible Region Feasible Region
  • 82. R.K. Bhattacharjya/CE/IITG Calculation crowding distance 7 November 2013 82 Cd, the crowded distance is the perimeter of the rectangle constituted by the two neighboring solutions Cd value more means that the solution is less crowded Cd value less means that the solution is more crowded ݅ ݅ − 1 ݅ + 1 Objective 1 Objective 2
  • 83. R.K. Bhattacharjya/CE/IITG Crowded tournament operator 7 November 2013 83 A solution ݅ wins a tournament with another solution ݆, If the solution ݅ has better rank than ݆, i.e. ‫ݎ‬௜ ‫ݎ‬௝ If they have the same rank, but ݅ has a better crowding distance than ݆, i.e. ‫ݎ‬௜ = ‫ݎ‬௝ and ݀௜ ݀௝.
  • 84. R.K. Bhattacharjya/CE/IITG Replacement scheme of NSGA II 7 November 2013 84 P Q ‫ݎ‬ଵ ‫ݎ‬ଶ ‫ݎ‬ଷ ‫ݎ‬ସ ‫ݎ‬ହ ‫ݎ‬ଵ ‫ݎ‬ଶ ‫ݎ‬ଷ Selected Rejected Rejected based on crowding distance Non dominated sorting
  • 85. Initialize population of size N Calculate all the objective functions Rank the population according to non- dominating criteria Selection Crossover Mutation Calculate objective function of the new population Combine old and new population Non-dominating ranking on the combined population Replace parent population by the better members of the combined population Calculate crowding distance of all the solutions Get the N member from the combined population on the basis of rank and crowding distance Termination Criteria? Pareto-optimal solution Yes No 7 November 2013 85
  • 86. R.K. Bhattacharjya/CE/IITG Constraints handling in GA 7 November 2013 86 -5 5 15 25 35 45 55 0 2 4 6 8 10 12 f(X) X ݂(‫)ݔ‬
  • 87. R.K. Bhattacharjya/CE/IITG Constraints handling in GA 7 November 2013 87 -5 5 15 25 35 45 55 0 2 4 6 8 10 12 f(X) X ݂(‫)ݔ‬ ݂ ‫ݔ‬ + ܴ ݃ ‫ݔ‬
  • 88. R.K. Bhattacharjya/CE/IITG Constraints handling in GA 7 November 2013 88 -5 5 15 25 35 45 55 0 2 4 6 8 10 12 f(X) X ݂(‫)ݔ‬ ݂ ‫ݔ‬ + ܴ ݃ ‫ݔ‬ ݂௠௔௫ + ݃ ‫ݔ‬
  • 89. R.K. Bhattacharjya/CE/IITG Constrain handling in GA 7 November 2013 89 ‫ܨ‬ = ݂ ܺ Minimize ݂ ܺ Subject to ݃௝ ‫ݔ‬ ≤ 0 ℎ௞ ‫ݔ‬ = 0 ݆ = 1,2,3, … , ‫ܬ‬ ݇ = 1,2,3, … , ‫ܭ‬ = ݂௠௔௫ + ෍ ݃௝ ‫ݔ‬ + ෍ ℎ௞ ‫ݔ‬ ௄ ௞ୀଵ ௃ ௝ୀଵ If ܺ is feasible Otherwise Deb’s approach