SlideShare a Scribd company logo
1 of 51
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 (20)

Metaheuristics
MetaheuristicsMetaheuristics
Metaheuristics
 
Greedy algorithm
Greedy algorithmGreedy algorithm
Greedy algorithm
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
 
Fuzzy Genetic Algorithm
Fuzzy Genetic AlgorithmFuzzy Genetic Algorithm
Fuzzy Genetic Algorithm
 
Evolutionary Algorithms
Evolutionary AlgorithmsEvolutionary Algorithms
Evolutionary Algorithms
 
Genetic algorithm raktim
Genetic algorithm raktimGenetic algorithm raktim
Genetic algorithm raktim
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Ga
GaGa
Ga
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Genetic algorithm
Genetic algorithm Genetic algorithm
Genetic algorithm
 
Hyperparameter Tuning
Hyperparameter TuningHyperparameter Tuning
Hyperparameter Tuning
 
Support vector machine
Support vector machineSupport vector machine
Support vector machine
 
Introduction to genetic algorithms
Introduction to genetic algorithmsIntroduction to genetic algorithms
Introduction to genetic algorithms
 
Hill climbing
Hill climbingHill climbing
Hill climbing
 

Viewers also liked

Genetic Algorithm by Example
Genetic Algorithm by ExampleGenetic Algorithm by Example
Genetic Algorithm by ExampleNobal Niraula
 
Genetic Algorithms Made Easy
Genetic Algorithms Made EasyGenetic Algorithms Made Easy
Genetic Algorithms Made EasyPrakash Pimpale
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic AlgorithmsAhmed Othman
 
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 algorithmHarshana 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 NetworkSHIMI S L
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithmsanas_elf
 
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 WekaMa Pii
 
Advance control theory
Advance control theoryAdvance control theory
Advance control theorySHIMI 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
 
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 Tuningkknsastry
 
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
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithmsadil raja
 

Viewers also liked (18)

Genetic Algorithm by Example
Genetic Algorithm by ExampleGenetic Algorithm by Example
Genetic Algorithm by Example
 
Genetic Algorithms Made Easy
Genetic Algorithms Made EasyGenetic Algorithms Made Easy
Genetic Algorithms Made Easy
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
 
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
 
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...
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 

Similar to Genetic Algorithm

Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Genetic algorithm_raktim_IITKGP
Genetic algorithm_raktim_IITKGP Raktim Halder
 
Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02Amna 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 algorithmritambharaaatre
 
evolutionary algo's.ppt
evolutionary algo's.pptevolutionary algo's.ppt
evolutionary algo's.pptSherazAhmed103
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic AlgorithmsVanessa Camilleri
 
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 algorithmLahiru Dilshan
 
Genetic Algorithms - GAs
Genetic Algorithms - GAsGenetic Algorithms - GAs
Genetic Algorithms - GAsMohamed Talaat
 
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 SemwalIIIT Allahabad
 
Advanced Optimization Techniques
Advanced Optimization TechniquesAdvanced Optimization Techniques
Advanced Optimization TechniquesValerie Felton
 
GA of a Paper 2012.pptx
GA of a Paper 2012.pptxGA of a Paper 2012.pptx
GA of a Paper 2012.pptxwaqasjavaid26
 
Genetic Algorithm (1).pdf
Genetic Algorithm (1).pdfGenetic Algorithm (1).pdf
Genetic Algorithm (1).pdfAzmiNizar1
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMPuneet Kulyana
 

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
 
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
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHM
 

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 PlatformSHIMI S L
 
Preparation for NBA
Preparation for  NBAPreparation for  NBA
Preparation for NBASHIMI S L
 
NBA - laboratories
NBA -  laboratoriesNBA -  laboratories
NBA - laboratoriesSHIMI S L
 
Nba co attainment
Nba co attainmentNba co attainment
Nba co attainmentSHIMI 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 inverterSHIMI S L
 
MPPT of a solar system
MPPT of a solar systemMPPT of a solar system
MPPT of a solar systemSHIMI 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 generationSHIMI S L
 
Solid State Control of Electric Drive
Solid State Control of Electric DriveSolid State Control of Electric Drive
Solid State Control of Electric DriveSHIMI S L
 
Choppers and cycloconverters
Choppers and cycloconvertersChoppers and cycloconverters
Choppers and cycloconvertersSHIMI S L
 
Thyristor technology
Thyristor technologyThyristor technology
Thyristor technologySHIMI 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

Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniquesugginaramesh
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 

Recently uploaded (20)

Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniques
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 

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