SlideShare a Scribd company logo
Genetic
Algorithm
by
Mrs Shimi S.L
Assistant Professor , EE
NITTTR, Chandigarh
Maxima and Minima from Calculus
•Great powers of calculus is in the determination of the
maximum or minimum value of a function.
•Take f(x) to be a function of x. Then the value of x for
which the derivative of f(x) with respect to x is equal
to zero corresponds to a maximum, a minimum or an
inflexion point of the function f(x).
• The height of a projectile that is fired straight up is given by the
motion equations
Classes of Search Techniques
Finonacci Newton
Direct methods Indirect methods
Calculus-based techniques
Evolutionarystrategies
Centralized Distributed
Parallel
Steady-state Generational
Sequential
Genetic algorithms
Evolutionary algorithms Simulated annealing
Guided random search techniques
Dynamic programming
Enumerative techniques
Search techniques
Genetic Algorithms is the most
commonly used prominent
computational algorithm introduced by
I. Rechenberg in 1960’s and developed
by John Holland in 1975. This
evolutionary algorithm mimics the
Darwin’s theory of evolution by natural
selection for problem solving.
Structure of a Cell
Simple Genetic Algorithm
{
initialize population;
evaluate population;
while Termination Criteria Not Satisfied
{
select parents for reproduction;
perform crossover and mutation;
evaluate population;
}
}
The GA Cycle of Reproduction
reproduction
population evaluation
modification
discard
deleted
members
parents
children
modified
children
evaluated children
Population
Chromosomes could be:
• Bit strings (0101 ... 1100)
• Real numbers (43.2 -33.1 ... 0.0 89.2)
• Permutations of element (E11 E3 E7 ... E1 E15)
• Lists of rules (R1 R2 R3 ... R22 R23)
• Program elements (genetic programming)
• ... any data structure ...
population
Population Size
Population size depicts the number of
chromosomes in one generation. If the population
size is very small, then only a small part of the
search space is explored. Whereas, if the
population size is too large then a very large part of
the search space is explored and due to obvious
reasons the algorithm slows down.
Selection
• Best chromosomes are selected from the population to form the
parents for next generation
• The different selection methods for choosing the best chromosomes
are
(i) Roulette Wheel Selection,
(ii) Tournament Selection,
(iii) Rank Selection,
(iv) Boltzman Selection,
(v) Steady-State Selection, etc.
Roulette Wheel Selection
Better chromosomes have high probability to be selected as new
parents. The probability of each individual chromosome getting
selected is given by the equation.
𝑃𝑖 =
𝑓 𝑖
𝑗=1
𝑁 𝑓 𝑖
where,
fi is the fitness of the individual i in the population
N is the number of individuals in the population
Reproduction
reproduction
population
parents
children
Parents are selected at random with selection chances biased
in relation to chromosome evaluations.
Chromosome Modification
modification
children
• Modifications are stochastically triggered
• Operator types are:
• Crossover (recombination)
• Mutation
modified children
Crossover
Crossover: Recombination
Single point crossover
Two points crossover
Arithmetic Crossover
Crossover is a critical feature of genetic algorithms:
•It greatly accelerates search early in evolution of a
population
•It leads to effective combination of schemata
(subsolutions on different chromosomes)
Mutation
Mutation: Local Modification
Before: (1 0 1 1 0 1 1 0)
After: (0 1 1 0 0 1 1 0)
Before: (1.38 -69.4 326.44 0.1)
After: (1.38 -67.5 326.44 0.1)
• Causes movement in the search space
(local or global)
• Restores lost information to the population
Exploration: Discovering promising areas in the search space, i.e.
gaining information on the problem
Exploitation: Optimising within a promising area, i.e. using
information
There is co-operation and competition between them
• Crossover is explorative, it makes a big jump to an area
somewhere “in between” two (parent) areas
• Mutation is exploitative, it creates random small diversions,
thereby staying near (in the area of ) the parent
Crossover OR mutation?
• Only crossover can combine information from two parents
• Only mutation can introduce new information (alleles)
• Crossover does not change the allele frequencies of the
population
• To hit the optimum you often need a ‘lucky’ mutation
Crossover OR mutation?
Evaluation
• The evaluator decodes a chromosome and assigns it a fitness
measure
• The evaluator is the only link between a classical GA and the problem
it is solving
evaluation
evaluated
children
modified
children
Deletion
• Generational GA:
entire populations replaced with each iteration
• Steady-state GA:
a few members replaced each generation
population
discard
discarded members
Termination
This evolutionary process is continued until the
termination condition is satisfied. The termination
conditions may be:
• Reaching the maximum number of generations
• Successive iteration does not provide proper results
• An optimal fitness value of the population is reached.
TSP Example: 30 Cities
0
20
40
60
80
100
120
0 10 20 30 40 50 60 70 80 90 100
y
x
Solution i (Distance = 941)
0
20
40
60
80
100
120
0 10 20 30 40 50 60 70 80 90 100
y
x
TSP30 (Performance = 941)
Solution j(Distance = 800)
TSP30 (Performance = 800)
0
10
20
30
40
50
60
70
80
90
100
0 10 20 30 40 50 60 70 80 90 100
x
y
Solution k(Distance = 652)
0
20
40
60
80
100
120
0 10 20 30 40 50 60 70 80 90 100
y
x
TSP30 (Performance = 652)
Best Solution (Distance = 420)
42
38
35
26
21
35
32
7
38
46
44
58
60
69
76
78
71
69
67
62
84
94
0
20
40
60
80
100
120
0 10 20 30 40 50 60 70 80 90 100
y
x
TSP30 Solution (Performance = 420)
Overview of Performance
0
200
400
600
800
1000
1200
1400
1600
1800
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31
D
is
ta
n
c
e
Generations (1000)
TSP30 - Overview of Performance
Best
Worst
Average
Consider the problem of maximizing the function,
f(x) = x2
Where x is permitted to vary between 0 to 31.
(i) 0(00000) and 31(11111) code x into finite
length string
(ii) Select initial population at random (size 4)
(iii) Calculate fitness value for all strings
(iv) probability of selection by:
𝑃𝑟𝑜𝑏𝑖=
𝑓(𝑥) 𝑖
𝑖=1
𝑛
𝑓(𝑥) 𝑖
,
Table 1. Selection
String
No.
Initial
population
X
Value
Fitness
value
Prob. %age
Prob.
Expected
Count
Actual
Count
1. 01100 12 144 0.1247 12.47% 0.4987 1
2. 11001 25 625 0.5411 54.11% 2.1645 2
3. 00101 5 25 0.0216 2.16% 0.0866 0
4. 10011 19 361 0.3126 31.26% 1.2502 1
Sum
Avg.
Max.
1155
288.75
625
1.0000
0.2500
0.5411
100%
25%
54.11%
4.0000
1.0000
2.1645
Table 2. Crossover
String
No.
Mating
Pool
Crossover
point
Offspring
after
crossover
X value Fitness
value
1. 01100 4 01101 13 169
2. 11001 4 11000 24 576
3. 11001 3 11011 27 729
4. 10011 3 10001 17 289
Sum
Avg.
Max.
1763
440.75
729
Table 3. Mutation
String
No.
Offspring
After
crossover
Mutation
chromosomes
Offspring
after
mutation
X value Fitness
value
1. 01101 10000 11101 29 841
2. 11000 00000 11000 24 576
3. 11011 00000 11011 27 729
4. 10001 00100 10101 20 400
Sum
Avg.
Max.
2546
636.5
841
Minimize the following fitness function
including 2 variables:
𝒎𝒊𝒏 𝒙 𝒇 𝒙 = 𝟏𝟎𝟎(𝒙 𝟏
𝟐
− 𝒙 𝟐) 𝟐
+ (𝟏 − 𝒙 𝟏) 𝟐
Subject to the following linear constraints and
bounds:
𝑥1 𝑥2 + 𝑥1 − 𝑥2 + 1.5 ≤ 0
10 − 𝑥1 𝑥2 ≤ 0
0 ≤ 𝑥1 ≤ 1 and 0 ≤ 𝑥2 ≤ 13
The function has one output ‘y’ and two input
variables ‘x1’ and ‘x2’.
We use the vector ‘x’ to include both ‘x1’ and ‘x2’.
>> gatool
Advantages of Genetic Algorithm
 Parallelism, robustness and liability
 Solution space is wider
 Handles large, poorly understood search spaces easily
 Easily modified for different problems
 Easy to discover global optimum
 Handles noisy functions as well
 Only uses function evaluations
 They require no information about the response surface
 Perform very well for large-scale optimization problems
 Can be employed for a wide variety of optimization problems
 The problem has multi objective function
 Very robust to difficulties in the evaluation of the objective function
Limitations of Genetic Algorithm
 The problem of identifying fitness function
 Requires large number of fitness function evaluations
 The problem of choosing the various parameters like
the size of the population, mutation rate, crossover
rate, the selection method and its strength.
 Definition of representation of the problem
 No effective terminator
 Needs to be coupled with a local search technique
 Have trouble finding the exact global optimum

More Related Content

What's hot

Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
garima931
 
Genetic algorithm ppt
Genetic algorithm pptGenetic algorithm ppt
Genetic algorithm ppt
Mayank Jain
 
GENETIC ALGORITHM
GENETIC ALGORITHMGENETIC ALGORITHM
GENETIC ALGORITHM
Harsh Sinha
 
Flowchart of GA
Flowchart of GAFlowchart of GA
Flowchart of GA
Ishucs
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
Premsankar Chakkingal
 
Genetic algorithm raktim
Genetic algorithm raktimGenetic algorithm raktim
Genetic algorithm raktim
Raktim Halder
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial Intelligence
Sahil Kumar
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
Designage Solutions
 
Genetic Algorithm by Example
Genetic Algorithm by ExampleGenetic Algorithm by Example
Genetic Algorithm by Example
Nobal Niraula
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
Shruti Railkar
 
Data Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsData Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic Algorithms
Derek Kane
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
Jari Abbas
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
Fatemeh Karimi
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
Ahmed Othman
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
adil raja
 
Ga ppt (1)
Ga ppt (1)Ga ppt (1)
Ga ppt (1)
RAHUL SOLANKI
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
DurgeshPratapSIngh8
 
Introduction to Genetic algorithms
Introduction to Genetic algorithmsIntroduction to Genetic algorithms
Introduction to Genetic algorithms
Akhil Kaushik
 
Ga
GaGa
Genetic algorithms in Data Mining
Genetic algorithms in Data MiningGenetic algorithms in Data Mining
Genetic algorithms in Data Mining
Atul Khanna
 

What's hot (20)

Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Genetic algorithm ppt
Genetic algorithm pptGenetic algorithm ppt
Genetic algorithm ppt
 
GENETIC ALGORITHM
GENETIC ALGORITHMGENETIC ALGORITHM
GENETIC ALGORITHM
 
Flowchart of GA
Flowchart of GAFlowchart of GA
Flowchart of GA
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
 
Genetic algorithm raktim
Genetic algorithm raktimGenetic algorithm raktim
Genetic algorithm raktim
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial Intelligence
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Genetic Algorithm by Example
Genetic Algorithm by ExampleGenetic Algorithm by Example
Genetic Algorithm by Example
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Data Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsData Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic Algorithms
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Ga ppt (1)
Ga ppt (1)Ga ppt (1)
Ga ppt (1)
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Introduction to Genetic algorithms
Introduction to Genetic algorithmsIntroduction to Genetic algorithms
Introduction to Genetic algorithms
 
Ga
GaGa
Ga
 
Genetic algorithms in Data Mining
Genetic algorithms in Data MiningGenetic algorithms in Data Mining
Genetic algorithms in Data Mining
 

Viewers also liked

Genetic Algorithms Made Easy
Genetic Algorithms Made EasyGenetic Algorithms Made Easy
Genetic Algorithms Made Easy
Prakash Pimpale
 
Genetic algorithm
Genetic algorithm Genetic algorithm
Genetic algorithm
Rabiya Khalid
 
Advance operator and technique in genetic algorithm
Advance operator and technique in genetic algorithmAdvance operator and technique in genetic algorithm
Advance operator and technique in genetic algorithm
Harshana Madusanka Jayamaha
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithmsguest9938738
 
Fuzzy Logic and Neural Network
Fuzzy Logic and Neural NetworkFuzzy Logic and Neural Network
Fuzzy Logic and Neural Network
SHIMI S L
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithmsanas_elf
 
Fuzzy Genetic Algorithm
Fuzzy Genetic AlgorithmFuzzy Genetic Algorithm
Fuzzy Genetic Algorithm
Pintu Khan
 
Flexible AC Transmission (FACTS)
Flexible AC Transmission (FACTS)Flexible AC Transmission (FACTS)
Flexible AC Transmission (FACTS)
SHIMI S L
 
genetic algorithms-artificial intelligence
 genetic algorithms-artificial intelligence genetic algorithms-artificial intelligence
genetic algorithms-artificial intelligenceKarunakar Singh Thakur
 
Project Weka
Project WekaProject Weka
Project Weka
Ma Pii
 
Genetic Algorithm
Genetic Algorithm Genetic Algorithm
Genetic Algorithm
Thushan Ganegedara
 
Advance control theory
Advance control theoryAdvance control theory
Advance control theory
SHIMI S L
 
Arduino
ArduinoArduino
Arduino
SHIMI S L
 
Application of genetic algorithm to the optimization of resonant frequency of...
Application of genetic algorithm to the optimization of resonant frequency of...Application of genetic algorithm to the optimization of resonant frequency of...
Application of genetic algorithm to the optimization of resonant frequency of...
IOSR Journals
 
PNRG & MT by Rio
PNRG & MT by RioPNRG & MT by Rio
PNRG & MT by Rio
Agate Studio
 
A Practical Schema Theorem for Genetic Algorithm Design and Tuning
A Practical Schema Theorem for Genetic Algorithm Design and TuningA Practical Schema Theorem for Genetic Algorithm Design and Tuning
A Practical Schema Theorem for Genetic Algorithm Design and Tuning
kknsastry
 
Effects of population initialization on differential evolution for large scal...
Effects of population initialization on differential evolution for large scal...Effects of population initialization on differential evolution for large scal...
Effects of population initialization on differential evolution for large scal...
Borhan Kazimipour
 

Viewers also liked (17)

Genetic Algorithms Made Easy
Genetic Algorithms Made EasyGenetic Algorithms Made Easy
Genetic Algorithms Made Easy
 
Genetic algorithm
Genetic algorithm Genetic algorithm
Genetic algorithm
 
Advance operator and technique in genetic algorithm
Advance operator and technique in genetic algorithmAdvance operator and technique in genetic algorithm
Advance operator and technique in genetic algorithm
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
Fuzzy Logic and Neural Network
Fuzzy Logic and Neural NetworkFuzzy Logic and Neural Network
Fuzzy Logic and Neural Network
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Fuzzy Genetic Algorithm
Fuzzy Genetic AlgorithmFuzzy Genetic Algorithm
Fuzzy Genetic Algorithm
 
Flexible AC Transmission (FACTS)
Flexible AC Transmission (FACTS)Flexible AC Transmission (FACTS)
Flexible AC Transmission (FACTS)
 
genetic algorithms-artificial intelligence
 genetic algorithms-artificial intelligence genetic algorithms-artificial intelligence
genetic algorithms-artificial intelligence
 
Project Weka
Project WekaProject Weka
Project Weka
 
Genetic Algorithm
Genetic Algorithm Genetic Algorithm
Genetic Algorithm
 
Advance control theory
Advance control theoryAdvance control theory
Advance control theory
 
Arduino
ArduinoArduino
Arduino
 
Application of genetic algorithm to the optimization of resonant frequency of...
Application of genetic algorithm to the optimization of resonant frequency of...Application of genetic algorithm to the optimization of resonant frequency of...
Application of genetic algorithm to the optimization of resonant frequency of...
 
PNRG & MT by Rio
PNRG & MT by RioPNRG & MT by Rio
PNRG & MT by Rio
 
A Practical Schema Theorem for Genetic Algorithm Design and Tuning
A Practical Schema Theorem for Genetic Algorithm Design and TuningA Practical Schema Theorem for Genetic Algorithm Design and Tuning
A Practical Schema Theorem for Genetic Algorithm Design and Tuning
 
Effects of population initialization on differential evolution for large scal...
Effects of population initialization on differential evolution for large scal...Effects of population initialization on differential evolution for large scal...
Effects of population initialization on differential evolution for large scal...
 

Similar to Genetic Algorithm

Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
Jagadish Mohanty
 
GA.pptx
GA.pptxGA.pptx
Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Raktim Halder
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
Syed Muhammad Zeejah Hashmi
 
Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02
Amna Saeed
 
Diversity mechanisms for evolutionary populations in Search-Based Software En...
Diversity mechanisms for evolutionary populations in Search-Based Software En...Diversity mechanisms for evolutionary populations in Search-Based Software En...
Diversity mechanisms for evolutionary populations in Search-Based Software En...
Annibale Panichella
 
introduction of genetic algorithm
introduction of genetic algorithmintroduction of genetic algorithm
introduction of genetic algorithm
ritambharaaatre
 
CI_L02_Optimization_ag2_eng.pdf
CI_L02_Optimization_ag2_eng.pdfCI_L02_Optimization_ag2_eng.pdf
CI_L02_Optimization_ag2_eng.pdf
SantiagoGarridoBulln
 
evolutionary algo's.ppt
evolutionary algo's.pptevolutionary algo's.ppt
evolutionary algo's.ppt
SherazAhmed103
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
Vanessa Camilleri
 
genetic computing
genetic computinggenetic computing
genetic computing
KRISH na TimeTraveller
 
Solving non linear programming minimization problem using genetic algorithm
Solving non linear programming minimization problem using genetic algorithmSolving non linear programming minimization problem using genetic algorithm
Solving non linear programming minimization problem using genetic algorithm
Lahiru Dilshan
 
Genetic Algorithms - GAs
Genetic Algorithms - GAsGenetic Algorithms - GAs
Genetic Algorithms - GAs
Mohamed Talaat
 
Extensive Survey on Datamining Algoritms for Pattern Extraction
Extensive Survey on Datamining Algoritms for Pattern ExtractionExtensive Survey on Datamining Algoritms for Pattern Extraction
Extensive Survey on Datamining Algoritms for Pattern Extraction
Association of Scientists, Developers and Faculties
 
1582997627872.pdf
1582997627872.pdf1582997627872.pdf
1582997627872.pdf
AbhilashJain25
 
Genetic algorithm (ga) binary and real Vijay Bhaskar Semwal
Genetic algorithm (ga) binary and real  Vijay Bhaskar SemwalGenetic algorithm (ga) binary and real  Vijay Bhaskar Semwal
Genetic algorithm (ga) binary and real Vijay Bhaskar Semwal
IIIT Allahabad
 
Advanced Optimization Techniques
Advanced Optimization TechniquesAdvanced Optimization Techniques
Advanced Optimization Techniques
Valerie Felton
 
GA of a Paper 2012.pptx
GA of a Paper 2012.pptxGA of a Paper 2012.pptx
GA of a Paper 2012.pptx
waqasjavaid26
 
CI_L11_Optimization_ag2_eng.pptx
CI_L11_Optimization_ag2_eng.pptxCI_L11_Optimization_ag2_eng.pptx
CI_L11_Optimization_ag2_eng.pptx
SantiagoGarridoBulln
 
Genetic Algorithm (1).pdf
Genetic Algorithm (1).pdfGenetic Algorithm (1).pdf
Genetic Algorithm (1).pdf
AzmiNizar1
 

Similar to Genetic Algorithm (20)

Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
GA.pptx
GA.pptxGA.pptx
GA.pptx
 
Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02
 
Diversity mechanisms for evolutionary populations in Search-Based Software En...
Diversity mechanisms for evolutionary populations in Search-Based Software En...Diversity mechanisms for evolutionary populations in Search-Based Software En...
Diversity mechanisms for evolutionary populations in Search-Based Software En...
 
introduction of genetic algorithm
introduction of genetic algorithmintroduction of genetic algorithm
introduction of genetic algorithm
 
CI_L02_Optimization_ag2_eng.pdf
CI_L02_Optimization_ag2_eng.pdfCI_L02_Optimization_ag2_eng.pdf
CI_L02_Optimization_ag2_eng.pdf
 
evolutionary algo's.ppt
evolutionary algo's.pptevolutionary algo's.ppt
evolutionary algo's.ppt
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
 
genetic computing
genetic computinggenetic computing
genetic computing
 
Solving non linear programming minimization problem using genetic algorithm
Solving non linear programming minimization problem using genetic algorithmSolving non linear programming minimization problem using genetic algorithm
Solving non linear programming minimization problem using genetic algorithm
 
Genetic Algorithms - GAs
Genetic Algorithms - GAsGenetic Algorithms - GAs
Genetic Algorithms - GAs
 
Extensive Survey on Datamining Algoritms for Pattern Extraction
Extensive Survey on Datamining Algoritms for Pattern ExtractionExtensive Survey on Datamining Algoritms for Pattern Extraction
Extensive Survey on Datamining Algoritms for Pattern Extraction
 
1582997627872.pdf
1582997627872.pdf1582997627872.pdf
1582997627872.pdf
 
Genetic algorithm (ga) binary and real Vijay Bhaskar Semwal
Genetic algorithm (ga) binary and real  Vijay Bhaskar SemwalGenetic algorithm (ga) binary and real  Vijay Bhaskar Semwal
Genetic algorithm (ga) binary and real Vijay Bhaskar Semwal
 
Advanced Optimization Techniques
Advanced Optimization TechniquesAdvanced Optimization Techniques
Advanced Optimization Techniques
 
GA of a Paper 2012.pptx
GA of a Paper 2012.pptxGA of a Paper 2012.pptx
GA of a Paper 2012.pptx
 
CI_L11_Optimization_ag2_eng.pptx
CI_L11_Optimization_ag2_eng.pptxCI_L11_Optimization_ag2_eng.pptx
CI_L11_Optimization_ag2_eng.pptx
 
Genetic Algorithm (1).pdf
Genetic Algorithm (1).pdfGenetic Algorithm (1).pdf
Genetic Algorithm (1).pdf
 

More from SHIMI S L

Real Time System Validation using Hardware in Loop (HIL) Digital Platform
Real Time System Validation using Hardware in Loop (HIL) Digital PlatformReal Time System Validation using Hardware in Loop (HIL) Digital Platform
Real Time System Validation using Hardware in Loop (HIL) Digital Platform
SHIMI S L
 
Preparation for NBA
Preparation for  NBAPreparation for  NBA
Preparation for NBA
SHIMI S L
 
NBA - laboratories
NBA -  laboratoriesNBA -  laboratories
NBA - laboratories
SHIMI S L
 
NBA
NBANBA
Nba co attainment
Nba co attainmentNba co attainment
Nba co attainment
SHIMI S L
 
Selective harmonic elimination in a solar powered multilevel inverter
Selective harmonic elimination in a solar powered multilevel inverterSelective harmonic elimination in a solar powered multilevel inverter
Selective harmonic elimination in a solar powered multilevel inverter
SHIMI S L
 
MPPT of a solar system
MPPT of a solar systemMPPT of a solar system
MPPT of a solar system
SHIMI S L
 
Solar energy application for electric power generation
Solar energy application for electric power generationSolar energy application for electric power generation
Solar energy application for electric power generation
SHIMI S L
 
Solid State Control of Electric Drive
Solid State Control of Electric DriveSolid State Control of Electric Drive
Solid State Control of Electric Drive
SHIMI S L
 
Choppers and cycloconverters
Choppers and cycloconvertersChoppers and cycloconverters
Choppers and cycloconverters
SHIMI S L
 
Thyristor technology
Thyristor technologyThyristor technology
Thyristor technology
SHIMI S L
 

More from SHIMI S L (11)

Real Time System Validation using Hardware in Loop (HIL) Digital Platform
Real Time System Validation using Hardware in Loop (HIL) Digital PlatformReal Time System Validation using Hardware in Loop (HIL) Digital Platform
Real Time System Validation using Hardware in Loop (HIL) Digital Platform
 
Preparation for NBA
Preparation for  NBAPreparation for  NBA
Preparation for NBA
 
NBA - laboratories
NBA -  laboratoriesNBA -  laboratories
NBA - laboratories
 
NBA
NBANBA
NBA
 
Nba co attainment
Nba co attainmentNba co attainment
Nba co attainment
 
Selective harmonic elimination in a solar powered multilevel inverter
Selective harmonic elimination in a solar powered multilevel inverterSelective harmonic elimination in a solar powered multilevel inverter
Selective harmonic elimination in a solar powered multilevel inverter
 
MPPT of a solar system
MPPT of a solar systemMPPT of a solar system
MPPT of a solar system
 
Solar energy application for electric power generation
Solar energy application for electric power generationSolar energy application for electric power generation
Solar energy application for electric power generation
 
Solid State Control of Electric Drive
Solid State Control of Electric DriveSolid State Control of Electric Drive
Solid State Control of Electric Drive
 
Choppers and cycloconverters
Choppers and cycloconvertersChoppers and cycloconverters
Choppers and cycloconverters
 
Thyristor technology
Thyristor technologyThyristor technology
Thyristor technology
 

Recently uploaded

Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
ChristineTorrepenida1
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
ssuser7dcef0
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
top1002
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
aqil azizi
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
veerababupersonal22
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 

Recently uploaded (20)

Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Unbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptxUnbalanced Three Phase Systems and circuits.pptx
Unbalanced Three Phase Systems and circuits.pptx
 
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
NUMERICAL SIMULATIONS OF HEAT AND MASS TRANSFER IN CONDENSING HEAT EXCHANGERS...
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdfTutorial for 16S rRNA Gene Analysis with QIIME2.pdf
Tutorial for 16S rRNA Gene Analysis with QIIME2.pdf
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 

Genetic Algorithm

  • 1. Genetic Algorithm by Mrs Shimi S.L Assistant Professor , EE NITTTR, Chandigarh
  • 2. Maxima and Minima from Calculus •Great powers of calculus is in the determination of the maximum or minimum value of a function. •Take f(x) to be a function of x. Then the value of x for which the derivative of f(x) with respect to x is equal to zero corresponds to a maximum, a minimum or an inflexion point of the function f(x).
  • 3. • The height of a projectile that is fired straight up is given by the motion equations
  • 4.
  • 5.
  • 6.
  • 7. Classes of Search Techniques Finonacci Newton Direct methods Indirect methods Calculus-based techniques Evolutionarystrategies Centralized Distributed Parallel Steady-state Generational Sequential Genetic algorithms Evolutionary algorithms Simulated annealing Guided random search techniques Dynamic programming Enumerative techniques Search techniques
  • 8. Genetic Algorithms is the most commonly used prominent computational algorithm introduced by I. Rechenberg in 1960’s and developed by John Holland in 1975. This evolutionary algorithm mimics the Darwin’s theory of evolution by natural selection for problem solving.
  • 10. Simple Genetic Algorithm { initialize population; evaluate population; while Termination Criteria Not Satisfied { select parents for reproduction; perform crossover and mutation; evaluate population; } }
  • 11. The GA Cycle of Reproduction reproduction population evaluation modification discard deleted members parents children modified children evaluated children
  • 12. Population Chromosomes could be: • Bit strings (0101 ... 1100) • Real numbers (43.2 -33.1 ... 0.0 89.2) • Permutations of element (E11 E3 E7 ... E1 E15) • Lists of rules (R1 R2 R3 ... R22 R23) • Program elements (genetic programming) • ... any data structure ... population
  • 13. Population Size Population size depicts the number of chromosomes in one generation. If the population size is very small, then only a small part of the search space is explored. Whereas, if the population size is too large then a very large part of the search space is explored and due to obvious reasons the algorithm slows down.
  • 14. Selection • Best chromosomes are selected from the population to form the parents for next generation • The different selection methods for choosing the best chromosomes are (i) Roulette Wheel Selection, (ii) Tournament Selection, (iii) Rank Selection, (iv) Boltzman Selection, (v) Steady-State Selection, etc.
  • 15. Roulette Wheel Selection Better chromosomes have high probability to be selected as new parents. The probability of each individual chromosome getting selected is given by the equation. 𝑃𝑖 = 𝑓 𝑖 𝑗=1 𝑁 𝑓 𝑖 where, fi is the fitness of the individual i in the population N is the number of individuals in the population
  • 16. Reproduction reproduction population parents children Parents are selected at random with selection chances biased in relation to chromosome evaluations.
  • 17. Chromosome Modification modification children • Modifications are stochastically triggered • Operator types are: • Crossover (recombination) • Mutation modified children
  • 19.
  • 20.
  • 23. Arithmetic Crossover Crossover is a critical feature of genetic algorithms: •It greatly accelerates search early in evolution of a population •It leads to effective combination of schemata (subsolutions on different chromosomes)
  • 25.
  • 26. Mutation: Local Modification Before: (1 0 1 1 0 1 1 0) After: (0 1 1 0 0 1 1 0) Before: (1.38 -69.4 326.44 0.1) After: (1.38 -67.5 326.44 0.1) • Causes movement in the search space (local or global) • Restores lost information to the population
  • 27.
  • 28. Exploration: Discovering promising areas in the search space, i.e. gaining information on the problem Exploitation: Optimising within a promising area, i.e. using information There is co-operation and competition between them • Crossover is explorative, it makes a big jump to an area somewhere “in between” two (parent) areas • Mutation is exploitative, it creates random small diversions, thereby staying near (in the area of ) the parent Crossover OR mutation?
  • 29. • Only crossover can combine information from two parents • Only mutation can introduce new information (alleles) • Crossover does not change the allele frequencies of the population • To hit the optimum you often need a ‘lucky’ mutation Crossover OR mutation?
  • 30. Evaluation • The evaluator decodes a chromosome and assigns it a fitness measure • The evaluator is the only link between a classical GA and the problem it is solving evaluation evaluated children modified children
  • 31.
  • 32.
  • 33. Deletion • Generational GA: entire populations replaced with each iteration • Steady-state GA: a few members replaced each generation population discard discarded members
  • 34.
  • 35. Termination This evolutionary process is continued until the termination condition is satisfied. The termination conditions may be: • Reaching the maximum number of generations • Successive iteration does not provide proper results • An optimal fitness value of the population is reached.
  • 36. TSP Example: 30 Cities 0 20 40 60 80 100 120 0 10 20 30 40 50 60 70 80 90 100 y x
  • 37. Solution i (Distance = 941) 0 20 40 60 80 100 120 0 10 20 30 40 50 60 70 80 90 100 y x TSP30 (Performance = 941)
  • 38. Solution j(Distance = 800) TSP30 (Performance = 800) 0 10 20 30 40 50 60 70 80 90 100 0 10 20 30 40 50 60 70 80 90 100 x y
  • 39. Solution k(Distance = 652) 0 20 40 60 80 100 120 0 10 20 30 40 50 60 70 80 90 100 y x TSP30 (Performance = 652)
  • 40. Best Solution (Distance = 420) 42 38 35 26 21 35 32 7 38 46 44 58 60 69 76 78 71 69 67 62 84 94 0 20 40 60 80 100 120 0 10 20 30 40 50 60 70 80 90 100 y x TSP30 Solution (Performance = 420)
  • 41. Overview of Performance 0 200 400 600 800 1000 1200 1400 1600 1800 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 D is ta n c e Generations (1000) TSP30 - Overview of Performance Best Worst Average
  • 42. Consider the problem of maximizing the function, f(x) = x2 Where x is permitted to vary between 0 to 31. (i) 0(00000) and 31(11111) code x into finite length string (ii) Select initial population at random (size 4) (iii) Calculate fitness value for all strings (iv) probability of selection by: 𝑃𝑟𝑜𝑏𝑖= 𝑓(𝑥) 𝑖 𝑖=1 𝑛 𝑓(𝑥) 𝑖 ,
  • 43. Table 1. Selection String No. Initial population X Value Fitness value Prob. %age Prob. Expected Count Actual Count 1. 01100 12 144 0.1247 12.47% 0.4987 1 2. 11001 25 625 0.5411 54.11% 2.1645 2 3. 00101 5 25 0.0216 2.16% 0.0866 0 4. 10011 19 361 0.3126 31.26% 1.2502 1 Sum Avg. Max. 1155 288.75 625 1.0000 0.2500 0.5411 100% 25% 54.11% 4.0000 1.0000 2.1645
  • 44. Table 2. Crossover String No. Mating Pool Crossover point Offspring after crossover X value Fitness value 1. 01100 4 01101 13 169 2. 11001 4 11000 24 576 3. 11001 3 11011 27 729 4. 10011 3 10001 17 289 Sum Avg. Max. 1763 440.75 729
  • 45. Table 3. Mutation String No. Offspring After crossover Mutation chromosomes Offspring after mutation X value Fitness value 1. 01101 10000 11101 29 841 2. 11000 00000 11000 24 576 3. 11011 00000 11011 27 729 4. 10001 00100 10101 20 400 Sum Avg. Max. 2546 636.5 841
  • 46. Minimize the following fitness function including 2 variables: 𝒎𝒊𝒏 𝒙 𝒇 𝒙 = 𝟏𝟎𝟎(𝒙 𝟏 𝟐 − 𝒙 𝟐) 𝟐 + (𝟏 − 𝒙 𝟏) 𝟐 Subject to the following linear constraints and bounds: 𝑥1 𝑥2 + 𝑥1 − 𝑥2 + 1.5 ≤ 0 10 − 𝑥1 𝑥2 ≤ 0 0 ≤ 𝑥1 ≤ 1 and 0 ≤ 𝑥2 ≤ 13
  • 47. The function has one output ‘y’ and two input variables ‘x1’ and ‘x2’. We use the vector ‘x’ to include both ‘x1’ and ‘x2’.
  • 48.
  • 50. Advantages of Genetic Algorithm  Parallelism, robustness and liability  Solution space is wider  Handles large, poorly understood search spaces easily  Easily modified for different problems  Easy to discover global optimum  Handles noisy functions as well  Only uses function evaluations  They require no information about the response surface  Perform very well for large-scale optimization problems  Can be employed for a wide variety of optimization problems  The problem has multi objective function  Very robust to difficulties in the evaluation of the objective function
  • 51. Limitations of Genetic Algorithm  The problem of identifying fitness function  Requires large number of fitness function evaluations  The problem of choosing the various parameters like the size of the population, mutation rate, crossover rate, the selection method and its strength.  Definition of representation of the problem  No effective terminator  Needs to be coupled with a local search technique  Have trouble finding the exact global optimum