SlideShare a Scribd company logo
1 of 28
Genetic Algorithms
M S Prasad
2
Introduction to Evolutionary
Computation
• Evolutionary Computation is the field of study devoted to
the design, development, and analysis is problem solvers
based on natural selection (simulated evolution).
• Evolution has proven to be a powerful search process.
• Evolutionary Computation has been successfully applied
to a wide range of problems including:
• Aircraft Design,
• Routing in Communications Networks,
• Tracking Windshear,
3
BRIEF HISTORY
• The idea of using simulated evolution to solve
engineering and design problems have been around
since the 1950’s (Fogel, 2000).
• Bremermann, 1962
• Box, 1957
• Friedberg, 1958
• However, it wasn’t until the early 1960’s that we began
to see three influential forms of EC emerge (Back et al,
1997):
• Evolutionary Programming (Lawrence Fogel, 1962),
• Genetic Algorithms (Holland, 1962)
• Evolution Strategies (Rechenberg, 1965 & Schwefel, 1968),
4
Introduction 1
• Inspired by natural evolution
• Population of individuals
• Individual is feasible solution to problem
• Each individual is characterized by a Fitness function
• Higher fitness is better solution
• Based on their fitness, parents are selected to reproduce
offspring for a new generation
• Fitter individuals have more chance to reproduce
• New generation has same size as old generation; old generation
dies
• Offspring has combination of properties of two parents
• If well designed, population will converge to optimal
solution
5
Algorithm
BEGIN
Generate initial population;
Compute fitness of each individual;
REPEAT /* New generation /*
FOR population_size / 2 DO
Select two parents from old generation;
/* biased to the fitter ones */
Recombine parents for two offspring;
Compute fitness of offspring;
Insert offspring in new generation
END FOR
UNTIL population has converged
END
6
Basic principles 1
• Coding or Representation
• String with all parameters
• Fitness function
• Parent selection
• Reproduction
• Crossover
• Mutation
• Convergence
• When to stop
7
Basic principles 2
• An individual is characterized by a set of parameters:
Genes
• The genes are joined into a string: Chromosome
• The chromosome forms the genotype
• The genotype contains all information to construct an
organism: the phenotype
• Reproduction is a “dumb” process on the chromosome of
the genotype
• Fitness is measured in the real world (‘struggle for life’)
of the phenotype
8
Coding
• Parameters of the solution (genes) are concatenated to
form a string (chromosome)
• All kind of alphabets can be used for a chromosome
(numbers, characters), but generally a binary alphabet is
used
• Order of genes on chromosome can be important
• Generally many different codings for the parameters of a
solution are possible
• Good coding is probably the most important factor for
the performance of a GA
• In many cases many possible chromosomes do not code
for feasible solutions
9
Reproduction
• Crossover
• Two parents produce two offspring
• There is a chance that the chromosomes of the two parents are
copied unmodified as offspring
• There is a chance that the chromosomes of the two parents are
randomly recombined (crossover) to form offspring
• Generally the chance of crossover is between 0.6 and 1.0
• Mutation
• There is a chance that a gene of a child is changed randomly
• Generally the chance of mutation is low (e.g. 0.001)
10
Crossover
• One-point crossover
• Two-point crossover
• Uniform crossover
11
One-point crossover 1
• Randomly one position in the chromosomes is chosen
• Child 1 is head of chromosome of parent 1 with tail of
chromosome of parent 2
• Child 2 is head of 2 with tail of 1
Parents: 1010001110 0011010010
Offspring: 0101010010 0011001110
Randomly chosen position
12
Two-point crossover
Parents: 1010001110 0011010010
Offspring: 0101010010 0011001110
Randomly chosen positions
• Randomly two positions in the chromosomes are chosen
• Avoids that genes at the head and genes at the tail of a
chromosome are always split when recombined
13
Uniform crossover
• A random mask is generated
• The mask determines which bits are copied from one
parent and which from the other parent
• Bit density in mask determines how much material is
taken from the other parent (takeover parameter)
Mask: 0110011000 (Randomly generated)
Parents: 1010001110 0011010010
Offspring: 0011001010 1010010110
14
Problems with crossover
• Depending on coding, simple crossovers can have high
chance to produce illegal offspring
• E.g. in TSP with simple binary or path coding, most offspring will
be illegal because not all cities will be in the offspring and some
cities will be there more than once
• Uniform crossover can often be modified to avoid this
problem
• E.g. in TSP with simple path coding:
Where mask is 1, copy cities from one parent
Where mask is 0, choose the remaining cities in the order of the
other parent
15
Fitness Function
Purpose
• Parent selection
• Measure for convergence
• For Steady state: Selection of individuals to die
• Should reflect the value of the chromosome in some
“real” way
• Next to coding the most critical part of a GA
16
Parent selection
Chance to be selected as parent proportional to fitness
• Roulette wheel
To avoid problems with fitness function
• Tournament
Not a very important parameter
17
Roulette wheel
• Sum the fitness of all chromosomes, call it T
• Generate a random number N between 1 and T
• Return chromosome whose fitness added to the running
total is equal to or larger than N
• Chance to be selected is exactly proportional to fitness
Chromosome: 1 2 3 4 5 6
Fitness: 8 2 17 7 4 11
Running total: 8 10 27 34 38 49
N (1  N  49): 23
Selected: 3
18
Tournament
• Binary tournament
• Two individuals are randomly chosen; the fitter of the two is
selected as a parent
• Probabilistic binary tournament
• Two individuals are randomly chosen; with a chance p,
0.5<p<1, the fitter of the two is selected as a parent
• Larger tournaments
• n individuals are randomly chosen; the fittest one is selected as
a parent
• By changing n and/or p, the GA can be adjusted
dynamically
19
Problems with fitness range
• Premature convergence
• Fitness too large
• Relatively superfit individuals dominate population
• Population converges to a local maximum
• Too much exploitation; too few exploration
• Slow finishing
• Fitness too small
• No selection pressure
• After many generations, average fitness has converged, but no
global maximum is found; not sufficient difference between best
and average fitness
• Too few exploitation; too much exploration
20
Solutions for these problems
• Use tournament selection
• Implicit fitness remapping
• Adjust fitness function for roulette wheel
• Explicit fitness remapping
Fitness scaling
Fitness windowing
Fitness ranking
21
Fitness scaling
• Fitness values are scaled by subtraction and division so
that worst value is close to 0 and the best value is close
to a certain value, typically 2
• Chance for the most fit individual is 2 times the average
• Chance for the least fit individual is close to 0
• Problems when the original maximum is very extreme
(super-fit) or when the original minimum is very extreme
(super-unfit)
• Can be solved by defining a minimum and/or a maximum value
for the fitness
22
Example of Fitness Scaling
23
Fitness windowing
• Same as window scaling, except the amount subtracted
is the minimum observed in the n previous generations,
with n e.g. 10
• Same problems as with scaling
24
Fitness ranking
• Individuals are numbered in order of increasing fitness
• The rank in this order is the adjusted fitness
• Starting number and increment can be chosen in several
ways and influence the results
• No problems with super-fit or super-unfit
• Often superior to scaling and windowing
25
Other parameters of GA 1
• Initialization:
• Population size
• Random
• Dedicated greedy algorithm
• Reproduction:
• Generational: as described before (insects)
• Generational with elitism: fixed number of most fit individuals
are copied unmodified into new generation
• Steady state: two parents are selected to reproduce and two
parents are selected to die; two offspring are immediately
inserted in the pool (mammals)
26
Other parameters of GA 2
• Stop criterion:
• Number of new chromosomes
• Number of new and unique chromosomes
• Number of generations
• Measure:
• Best of population
• Average of population
• Duplicates
• Accept all duplicates
• Avoid too many duplicates, because that degenerates the
population (inteelt)
• No duplicates at all
27
Example run
Maxima and Averages of steady state and generational
replacement
0
5
10
15
20
25
30
35
40
45
0 5 10 15 20
St_max
St_av.
Ge_max
Ge_av.
28
Introduction to Evolutionary Computation:
A Simple Example
Procedure simpleEC{
t = 0;
Initialize Pop(t); /* of P individuals */
Evaluate Pop(t);
while (t <= 4000-P){
Select_Parent(<xmom,ymom>); /* Randomly */
Select_Parent(<xdad,ydad>); /* Randomly */
Create_Offspring(<xkid,ykid>):
xkid = rnd(xmom, xdad) + Nx(0,);
ykid = rnd(ymom, ydad) + Ny(0,);
fitkid = Evaluate(<xkid,ykid>);
Pop(t+1) = Replace(worst,kid);{Pop(t)-{worst}}{kid}
t = t + 1;
}
}

More Related Content

Similar to Evolutionary algorithms

Genetic Algorithms - GAs
Genetic Algorithms - GAsGenetic Algorithms - GAs
Genetic Algorithms - GAsMohamed Talaat
 
Introduction to genetic algorithms
Introduction to genetic algorithmsIntroduction to genetic algorithms
Introduction to genetic algorithmsshadanalam
 
AI.3-Evolutionary Computation [15-18].pdf
AI.3-Evolutionary Computation [15-18].pdfAI.3-Evolutionary Computation [15-18].pdf
AI.3-Evolutionary Computation [15-18].pdfThninh2
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithmsCraig Nicol
 
Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)Kapil Khatiwada
 
introduction of genetic algorithm
introduction of genetic algorithmintroduction of genetic algorithm
introduction of genetic algorithmritambharaaatre
 
GA of a Paper 2012.pptx
GA of a Paper 2012.pptxGA of a Paper 2012.pptx
GA of a Paper 2012.pptxwaqasjavaid26
 
Evolutionary Computing - Genetic Algorithms - An Introduction
Evolutionary Computing - Genetic Algorithms - An IntroductionEvolutionary Computing - Genetic Algorithms - An Introduction
Evolutionary Computing - Genetic Algorithms - An Introductionmartinp
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMPuneet Kulyana
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic AlgorithmsAhmed Othman
 
Aqa unit 2 biology
Aqa unit 2 biologyAqa unit 2 biology
Aqa unit 2 biologyandymartin
 
Genetic Algorithms : A class of Evolutionary Algorithms
Genetic Algorithms : A class of Evolutionary AlgorithmsGenetic Algorithms : A class of Evolutionary Algorithms
Genetic Algorithms : A class of Evolutionary AlgorithmsKavya Barnadhya Hazarika
 
evolutionary algo's.ppt
evolutionary algo's.pptevolutionary algo's.ppt
evolutionary algo's.pptSherazAhmed103
 
Genetic algorithms in Data Mining
Genetic algorithms in Data MiningGenetic algorithms in Data Mining
Genetic algorithms in Data MiningAtul Khanna
 
CSA 3702 machine learning module 4
CSA 3702 machine learning module 4CSA 3702 machine learning module 4
CSA 3702 machine learning module 4Nandhini S
 

Similar to Evolutionary algorithms (20)

Genetic Algorithms - GAs
Genetic Algorithms - GAsGenetic Algorithms - GAs
Genetic Algorithms - GAs
 
Introduction to genetic algorithms
Introduction to genetic algorithmsIntroduction to genetic algorithms
Introduction to genetic algorithms
 
AI.3-Evolutionary Computation [15-18].pdf
AI.3-Evolutionary Computation [15-18].pdfAI.3-Evolutionary Computation [15-18].pdf
AI.3-Evolutionary Computation [15-18].pdf
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)
 
introduction of genetic algorithm
introduction of genetic algorithmintroduction of genetic algorithm
introduction of genetic algorithm
 
GA of a Paper 2012.pptx
GA of a Paper 2012.pptxGA of a Paper 2012.pptx
GA of a Paper 2012.pptx
 
Evolutionary Computing - Genetic Algorithms - An Introduction
Evolutionary Computing - Genetic Algorithms - An IntroductionEvolutionary Computing - Genetic Algorithms - An Introduction
Evolutionary Computing - Genetic Algorithms - An Introduction
 
Ga ppt (1)
Ga ppt (1)Ga ppt (1)
Ga ppt (1)
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHM
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
 
CI_L02_Optimization_ag2_eng.pdf
CI_L02_Optimization_ag2_eng.pdfCI_L02_Optimization_ag2_eng.pdf
CI_L02_Optimization_ag2_eng.pdf
 
Aqa unit 2 biology
Aqa unit 2 biologyAqa unit 2 biology
Aqa unit 2 biology
 
Genetic Algorithms : A class of Evolutionary Algorithms
Genetic Algorithms : A class of Evolutionary AlgorithmsGenetic Algorithms : A class of Evolutionary Algorithms
Genetic Algorithms : A class of Evolutionary Algorithms
 
evolutionary algo's.ppt
evolutionary algo's.pptevolutionary algo's.ppt
evolutionary algo's.ppt
 
Genetic algorithms in Data Mining
Genetic algorithms in Data MiningGenetic algorithms in Data Mining
Genetic algorithms in Data Mining
 
CSA 3702 machine learning module 4
CSA 3702 machine learning module 4CSA 3702 machine learning module 4
CSA 3702 machine learning module 4
 
CI_L11_Optimization_ag2_eng.pptx
CI_L11_Optimization_ag2_eng.pptxCI_L11_Optimization_ag2_eng.pptx
CI_L11_Optimization_ag2_eng.pptx
 

More from M S Prasad

2. avionics architecture da cp
2. avionics architecture  da cp2. avionics architecture  da cp
2. avionics architecture da cpM S Prasad
 
Cyber security ln
Cyber security lnCyber security ln
Cyber security lnM S Prasad
 
3. avionics bus da cp
3. avionics bus  da   cp3. avionics bus  da   cp
3. avionics bus da cpM S Prasad
 
Data analytics space final
Data analytics  space finalData analytics  space final
Data analytics space finalM S Prasad
 
Artificial intelligence intro cp 1
Artificial intelligence  intro  cp  1Artificial intelligence  intro  cp  1
Artificial intelligence intro cp 1M S Prasad
 
Data analytics space
Data analytics  spaceData analytics  space
Data analytics spaceM S Prasad
 
Lp and ip programming cp 9
Lp and ip programming cp 9Lp and ip programming cp 9
Lp and ip programming cp 9M S Prasad
 

More from M S Prasad (7)

2. avionics architecture da cp
2. avionics architecture  da cp2. avionics architecture  da cp
2. avionics architecture da cp
 
Cyber security ln
Cyber security lnCyber security ln
Cyber security ln
 
3. avionics bus da cp
3. avionics bus  da   cp3. avionics bus  da   cp
3. avionics bus da cp
 
Data analytics space final
Data analytics  space finalData analytics  space final
Data analytics space final
 
Artificial intelligence intro cp 1
Artificial intelligence  intro  cp  1Artificial intelligence  intro  cp  1
Artificial intelligence intro cp 1
 
Data analytics space
Data analytics  spaceData analytics  space
Data analytics space
 
Lp and ip programming cp 9
Lp and ip programming cp 9Lp and ip programming cp 9
Lp and ip programming cp 9
 

Recently uploaded

Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 

Recently uploaded (20)

Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 

Evolutionary algorithms

  • 2. 2 Introduction to Evolutionary Computation • Evolutionary Computation is the field of study devoted to the design, development, and analysis is problem solvers based on natural selection (simulated evolution). • Evolution has proven to be a powerful search process. • Evolutionary Computation has been successfully applied to a wide range of problems including: • Aircraft Design, • Routing in Communications Networks, • Tracking Windshear,
  • 3. 3 BRIEF HISTORY • The idea of using simulated evolution to solve engineering and design problems have been around since the 1950’s (Fogel, 2000). • Bremermann, 1962 • Box, 1957 • Friedberg, 1958 • However, it wasn’t until the early 1960’s that we began to see three influential forms of EC emerge (Back et al, 1997): • Evolutionary Programming (Lawrence Fogel, 1962), • Genetic Algorithms (Holland, 1962) • Evolution Strategies (Rechenberg, 1965 & Schwefel, 1968),
  • 4. 4 Introduction 1 • Inspired by natural evolution • Population of individuals • Individual is feasible solution to problem • Each individual is characterized by a Fitness function • Higher fitness is better solution • Based on their fitness, parents are selected to reproduce offspring for a new generation • Fitter individuals have more chance to reproduce • New generation has same size as old generation; old generation dies • Offspring has combination of properties of two parents • If well designed, population will converge to optimal solution
  • 5. 5 Algorithm BEGIN Generate initial population; Compute fitness of each individual; REPEAT /* New generation /* FOR population_size / 2 DO Select two parents from old generation; /* biased to the fitter ones */ Recombine parents for two offspring; Compute fitness of offspring; Insert offspring in new generation END FOR UNTIL population has converged END
  • 6. 6 Basic principles 1 • Coding or Representation • String with all parameters • Fitness function • Parent selection • Reproduction • Crossover • Mutation • Convergence • When to stop
  • 7. 7 Basic principles 2 • An individual is characterized by a set of parameters: Genes • The genes are joined into a string: Chromosome • The chromosome forms the genotype • The genotype contains all information to construct an organism: the phenotype • Reproduction is a “dumb” process on the chromosome of the genotype • Fitness is measured in the real world (‘struggle for life’) of the phenotype
  • 8. 8 Coding • Parameters of the solution (genes) are concatenated to form a string (chromosome) • All kind of alphabets can be used for a chromosome (numbers, characters), but generally a binary alphabet is used • Order of genes on chromosome can be important • Generally many different codings for the parameters of a solution are possible • Good coding is probably the most important factor for the performance of a GA • In many cases many possible chromosomes do not code for feasible solutions
  • 9. 9 Reproduction • Crossover • Two parents produce two offspring • There is a chance that the chromosomes of the two parents are copied unmodified as offspring • There is a chance that the chromosomes of the two parents are randomly recombined (crossover) to form offspring • Generally the chance of crossover is between 0.6 and 1.0 • Mutation • There is a chance that a gene of a child is changed randomly • Generally the chance of mutation is low (e.g. 0.001)
  • 10. 10 Crossover • One-point crossover • Two-point crossover • Uniform crossover
  • 11. 11 One-point crossover 1 • Randomly one position in the chromosomes is chosen • Child 1 is head of chromosome of parent 1 with tail of chromosome of parent 2 • Child 2 is head of 2 with tail of 1 Parents: 1010001110 0011010010 Offspring: 0101010010 0011001110 Randomly chosen position
  • 12. 12 Two-point crossover Parents: 1010001110 0011010010 Offspring: 0101010010 0011001110 Randomly chosen positions • Randomly two positions in the chromosomes are chosen • Avoids that genes at the head and genes at the tail of a chromosome are always split when recombined
  • 13. 13 Uniform crossover • A random mask is generated • The mask determines which bits are copied from one parent and which from the other parent • Bit density in mask determines how much material is taken from the other parent (takeover parameter) Mask: 0110011000 (Randomly generated) Parents: 1010001110 0011010010 Offspring: 0011001010 1010010110
  • 14. 14 Problems with crossover • Depending on coding, simple crossovers can have high chance to produce illegal offspring • E.g. in TSP with simple binary or path coding, most offspring will be illegal because not all cities will be in the offspring and some cities will be there more than once • Uniform crossover can often be modified to avoid this problem • E.g. in TSP with simple path coding: Where mask is 1, copy cities from one parent Where mask is 0, choose the remaining cities in the order of the other parent
  • 15. 15 Fitness Function Purpose • Parent selection • Measure for convergence • For Steady state: Selection of individuals to die • Should reflect the value of the chromosome in some “real” way • Next to coding the most critical part of a GA
  • 16. 16 Parent selection Chance to be selected as parent proportional to fitness • Roulette wheel To avoid problems with fitness function • Tournament Not a very important parameter
  • 17. 17 Roulette wheel • Sum the fitness of all chromosomes, call it T • Generate a random number N between 1 and T • Return chromosome whose fitness added to the running total is equal to or larger than N • Chance to be selected is exactly proportional to fitness Chromosome: 1 2 3 4 5 6 Fitness: 8 2 17 7 4 11 Running total: 8 10 27 34 38 49 N (1  N  49): 23 Selected: 3
  • 18. 18 Tournament • Binary tournament • Two individuals are randomly chosen; the fitter of the two is selected as a parent • Probabilistic binary tournament • Two individuals are randomly chosen; with a chance p, 0.5<p<1, the fitter of the two is selected as a parent • Larger tournaments • n individuals are randomly chosen; the fittest one is selected as a parent • By changing n and/or p, the GA can be adjusted dynamically
  • 19. 19 Problems with fitness range • Premature convergence • Fitness too large • Relatively superfit individuals dominate population • Population converges to a local maximum • Too much exploitation; too few exploration • Slow finishing • Fitness too small • No selection pressure • After many generations, average fitness has converged, but no global maximum is found; not sufficient difference between best and average fitness • Too few exploitation; too much exploration
  • 20. 20 Solutions for these problems • Use tournament selection • Implicit fitness remapping • Adjust fitness function for roulette wheel • Explicit fitness remapping Fitness scaling Fitness windowing Fitness ranking
  • 21. 21 Fitness scaling • Fitness values are scaled by subtraction and division so that worst value is close to 0 and the best value is close to a certain value, typically 2 • Chance for the most fit individual is 2 times the average • Chance for the least fit individual is close to 0 • Problems when the original maximum is very extreme (super-fit) or when the original minimum is very extreme (super-unfit) • Can be solved by defining a minimum and/or a maximum value for the fitness
  • 23. 23 Fitness windowing • Same as window scaling, except the amount subtracted is the minimum observed in the n previous generations, with n e.g. 10 • Same problems as with scaling
  • 24. 24 Fitness ranking • Individuals are numbered in order of increasing fitness • The rank in this order is the adjusted fitness • Starting number and increment can be chosen in several ways and influence the results • No problems with super-fit or super-unfit • Often superior to scaling and windowing
  • 25. 25 Other parameters of GA 1 • Initialization: • Population size • Random • Dedicated greedy algorithm • Reproduction: • Generational: as described before (insects) • Generational with elitism: fixed number of most fit individuals are copied unmodified into new generation • Steady state: two parents are selected to reproduce and two parents are selected to die; two offspring are immediately inserted in the pool (mammals)
  • 26. 26 Other parameters of GA 2 • Stop criterion: • Number of new chromosomes • Number of new and unique chromosomes • Number of generations • Measure: • Best of population • Average of population • Duplicates • Accept all duplicates • Avoid too many duplicates, because that degenerates the population (inteelt) • No duplicates at all
  • 27. 27 Example run Maxima and Averages of steady state and generational replacement 0 5 10 15 20 25 30 35 40 45 0 5 10 15 20 St_max St_av. Ge_max Ge_av.
  • 28. 28 Introduction to Evolutionary Computation: A Simple Example Procedure simpleEC{ t = 0; Initialize Pop(t); /* of P individuals */ Evaluate Pop(t); while (t <= 4000-P){ Select_Parent(<xmom,ymom>); /* Randomly */ Select_Parent(<xdad,ydad>); /* Randomly */ Create_Offspring(<xkid,ykid>): xkid = rnd(xmom, xdad) + Nx(0,); ykid = rnd(ymom, ydad) + Ny(0,); fitkid = Evaluate(<xkid,ykid>); Pop(t+1) = Replace(worst,kid);{Pop(t)-{worst}}{kid} t = t + 1; } }