SlideShare a Scribd company logo
1 of 32
GENETIC
ALGORITHMS
Tanmay, Abhijit, Ameya, Saurabh
Inspiration - Evolution
• Natural Selection:
– “Survival of the Fittest”
– favourable traits become common and
unfavourable traits become uncommon in
successive generations
• Sexual Reproduction:
– Chromosomal crossover and genetic
recombination
– population is genetically variable
– adaptive evolution is facilitated
– unfavourable mutations are eliminated
Overview
 Inspiration
 The basic algorithm
 Encoding
 Selection
 Crossover
 Mutation
 Why Genetic Algorithms work ?
 Schemas
 Hyper-planes
 Schema Theorem
 Strengths and Weakness
 Applications
 TSP
 Conclusion
THE BASIC
ALGORITHM
Ameya Muley
Encoding of Solution Space
 Represent solution space by strings of fixed
length over some alphabet
 TSP:
 ordering of points
 Knapsack:
 inclusion in knapsack
A D B E C B E D A C
B
A C
E D
0 0 1 0 1 1 0 1 1 0
Selection
• Fitness function:
– f(x), x is a chromosome in the solution space
– f(x) may be:
• an well-defined objective function to be optimised
– e.g. TSP and knapsack
• a heuristic
– e.g. N-Queens
• Probability distribution for selection:
• Fitness proportional selection
 
 

 M
j j
i
i
x
f
x
f
x
X
P
1
)
(
)
(
Operators-Crossover and
Mutation
• Crossover:
– Applied with high probability
– Position for crossover on the two parent chromosomes randomly
selected
– Offspring share characteristics of well-performing parents
– Combinations of well-performing characteristics generated
• Mutation:
– Applied with low probability
– Bit for mutation randomly selected
– New characteristics introduced into the population
– Prevents algorithm from getting trapped into a local optimum
The Basic Algorithm
1. Fix population size M
2. Randomly generate M strings in the solution space
3. Observe the fitness of each chromosome
4. Repeat:
1. Select two fittest strings to reproduce
2. Apply crossover with high probability to produce offspring
3. Apply mutation to parent or offspring with low probability
4. Observe the fitness of each new string
5. Replace weakest strings of the population with the
offspring
until
i. fixed number of iterations completed, OR
ii. average/best fitness above a threshold, OR
iii. average/best fitness value unchanged for a fixed number of
consecutive iterations
Example
• Problem specification:
– string of length 4
– two 0’s and two 1’s
– 0’s to the right of the 1’s
• Solution space:
• Fitness function (heuristic):
– f(x) = number of bits that match the ones in the solution
• Initialization (M = 4):
0 0 1 1
 4
1
,
0
1 0 0 0 1
)
( 
A
f
0 1 0 0 1
)
( 
B
f
0 1 0 1 2
)
( 
C
f
0 0 1 0 3
)
( 
D
f
75
.
1

av
f
0 1 0 1
0 0 1 0
0 1 0 0
0 0 1 1
1
)
( 
X
f
4
)
( 
Y
f
0 1 0 0 0 1 1 0 2
)
( 
Z
f
Example (contd.)
 After iteration 1:
 After iteration 2:
0 1 0 1 2
)
( 
A
f
0 1 1 0 2
)
( 
B
f
0 0 1 0 3
)
( 
C
f
0 0 1 1 4
)
( 
D
f
75
.
2

av
f
0 1 0 1 2
)
( 
A
f
0 0 0 1 3
)
( 
B
f
0 0 1 0 3
)
( 
C
f
0 0 1 1 4
)
( 
D
f
3

av
f
0 1 0 1
0 0 1 0
0 1 1 0
0 0 0 1
2
)
( 
X
f
3
)
( 
Y
f
WHY GENETIC ALGORITHMS
WORK?
Tanmay Khirwadkar
Schemas
 Population
 Strings over alphabet {0,1} of length L
 E.g.
 Schema
 A schema is a subset of the space of all possible
individuals for which all the genes match the
template for schema H.
 Strings over alphabet {0,1,*} of length L
 E.g. }
11110
,
11010
,
10110
,
10010
{
]
10
*
*
1
[ 

H
10010

s
Hyper-plane model
 Search space
 A hyper-cube in L dimensional space
 Individuals
 Vertices of hyper-cube
 Schemas
 Hyper-planes formed by vertices
0**
Sampling Hyper-planes
 Look for hyper-planes (schemas) with good
fitness value instead of vertices (individuals) to
reduce search space
 Each vertex
 Member of 3L hyper-planes
 Samples hyper-planes
 Average Fitness of a hyper-plane can be
estimated by sampling fitness of members in
population
 Selection retains hyper-planes with good
estimated fitness values and discards others
Schema Theorem
 Schema Order O(H)
 Schema order, O(.) , is the number of non ‘*’ genes in
schema H.
 E.g. O(1**1*) = 2
 Schema Defining Length δ(H)
 Schema Defining Length, δ(H), is the distance
between first and last non ‘*’ gene in schema H
 E.g. δ(1**1*) = 4 – 1 = 3
 Schemas with short defining length, low order with
fitness above average population are favored by
GAs
Formal Statement
 Selection probability
 Crossover probability
 Mutation probability
 Expected number of members of a schema
)
,
(
)
,
(
)
,
(
))
1
,
(
(
t
H
f
t
H
f
t
H
m
t
H
m
E 

1
)
(
)
( 
 L
H
c
crossover p
h
P 
m
mutation p
H
h
P )
(
)
( 

))
(
1
)
(
1
(
)
,
(
)
,
(
)
,
(
)
1
,
(
( H
p
L
H
p
t
H
f
t
H
f
t
H
m
t
H
m
E m
c 






Why crossover and mutation?
 Crossover
 Produces new solutions while ‘remembering’ the
characteristics of old solutions
 Partially preserves distribution of strings across
schemas
 Mutation
 Randomly generates new solutions which cannot
be produced from existing population
 Avoids local optimum
STRENGTHS AND WEAKNESS
Abhijit Bhole
Area of application
GAs can be used when:
 Non-analytical problems.
 Non-linear models.
 Uncertainty.
 Large state spaces.
Non-analytical problems
 Fitness functions may not be expressed
analytically always.
 Domain specific knowledge may not be
computable from fitness function.
 Scarce domain knowledge to guide the
search.
Non-linear models
 Solutions depend on starting values.
 Non – linear models may converge to local
optimum.
 Impose conditions on fitness functions such as
convexity, etc.
 May require the problem to be approximated to
fit the non-linear model.
Uncertainty
 Noisy / approximated fitness functions.
 Changing parameters.
 Changing fitness functions.
 Why do GAs work? Because uncertainty is
common in nature.
Large state spaces
 Heuristics focus only on the immediate area of
initial solutions.
 State-explosion problem: number of states
huge or even infinite! Too large to be handled.
 State space may not be completely
understood.
Characteristics of GAs
 Simple, Powerful, Adaptive, Parallel
 Guarantee global optimum solutions.
 Give solutions of un-approximated form of
problem.
 Finer granularity of search spaces.
When not to use GA!
 Constrained mathematical optimization
problems especially when there are few
solutions.
 Constraints are difficult to incorporate into a
GA.
 Guided domain search is possible and
efficient.
PRACTICAL EXAMPLE - TSP
Saurabh Chakradeo
TSP Description
 Problem Statement: Given a complete
weighted undirected graph, find the shortest
Hamiltonian cycle. (n nodes)
 The size of the solution space in (n-1)!/2
 Dynamic Programming gives us a solution in
time O(n22n)
 TSP is NP Complete
TSP Encoding
 Binary representation
 Tour 1-3-2 is represented as ( 00 10 01 )
 Path representation
 Natural – ( 1 3 2 )
 Adjacency representation
 Tour 1-3-2 is represented as ( 3 1 2 )
 Ordinal representation
 A reference list is used. Let that be ( 1 2 3 ).
 Tour 1-3-2 is represented as ( 1 2 1 )
TSP – Crossover operator
 Order Based crossover (OX2)
 Selects at random several positions in the parent
tour
 Imposes the order of nodes in selected positions
of one parent on the other parent
 Parents: (1 2 3 4 5 6 7 8) and (2 4 6 8 7 5 3 1)
 Selected positions, 2nd , 3rd and 6th
 Impose order on (2 4 6 8 7 5 3 1) &(1 2 3 4 5 6 7
8)
 Children are (2 4 3 8 7 5 6 1) and (1 2 3 4 6 5 7 8)
TSP – Mutation Operators
 Exchange Mutation Operator (EM)
 Randomly select two nodes and interchange their
positions.
 ( 1 2 3 4 5 6 ) can become ( 1 2 6 4 5 3 )
 Displacement Mutation Operator (DM)
 Select a random sub-tour, remove and insert it in
a different location.
 ( 1 2 [3 4 5] 6 ) becomes ( 1 2 6 3 4 5 )
Conclusions
 Plethora of applications
 Molecular biology, scheduling, cryptography,
parameter optimization
 General algorithmic model applicable to a
large variety of classes of problems
 Another in the list of algorithms inspired by
biological processes – scope for more
parallels?
 Philosophical Implication:
 Are humans actually moving towards their global
optimum?
References
 Adaptation in Natural and Artificial Systems,
John H. Holland, MIT Press, 1992.
 Goldberg, D. E. 1989 Genetic Algorithms in
Search, Optimization and Machine Learning.
1st. Addison-Wesley Longman Publishing Co.,
Inc.
 Genetic Algorithms for the Travelling
Salesman Problem: A Review of
Representations and Operators, P. Larranaga
et al., University of Basque, Spain. Artificial
Intelligence Review, Volume 13, Number 2 /

More Related Content

What's hot

Introduction to Genetic algorithms
Introduction to Genetic algorithmsIntroduction to Genetic algorithms
Introduction to Genetic algorithmsAkhil Kaushik
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithmJari Abbas
 
Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)Kapil Khatiwada
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceSahil Kumar
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithmsguest9938738
 
GENETIC ALGORITHM
GENETIC ALGORITHM GENETIC ALGORITHM
GENETIC ALGORITHM Abhishek Sur
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithmszamakhan
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithmsanas_elf
 
Genetic Algorithms for optimization
Genetic Algorithms for optimizationGenetic Algorithms for optimization
Genetic Algorithms for optimizationFethi Candan
 
Genetic programming
Genetic programmingGenetic programming
Genetic programmingMeghna Singh
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic AlgorithmsAhmed Othman
 
Genetic algorithms in Data Mining
Genetic algorithms in Data MiningGenetic algorithms in Data Mining
Genetic algorithms in Data MiningAtul Khanna
 

What's hot (20)

Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Introduction to Genetic algorithms
Introduction to Genetic algorithmsIntroduction to Genetic algorithms
Introduction to Genetic algorithms
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial Intelligence
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Modified Genetic Algorithm for Solving n-Queens Problem
Modified Genetic Algorithm for Solving n-Queens ProblemModified Genetic Algorithm for Solving n-Queens Problem
Modified Genetic Algorithm for Solving n-Queens Problem
 
GENETIC ALGORITHM
GENETIC ALGORITHM GENETIC ALGORITHM
GENETIC ALGORITHM
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Genetic Algorithms for optimization
Genetic Algorithms for optimizationGenetic Algorithms for optimization
Genetic Algorithms for optimization
 
Ga
GaGa
Ga
 
Genetic programming
Genetic programmingGenetic programming
Genetic programming
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
 
Genetic algorithms in Data Mining
Genetic algorithms in Data MiningGenetic algorithms in Data Mining
Genetic algorithms in Data Mining
 

Similar to Group 9 genetic-algorithms (1)

Learning to Search Henry Kautz
Learning to Search Henry KautzLearning to Search Henry Kautz
Learning to Search Henry Kautzbutest
 
Learning to Search Henry Kautz
Learning to Search Henry KautzLearning to Search Henry Kautz
Learning to Search Henry Kautzbutest
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic AlgorithmSHIMI S L
 
An Improved Iterative Method for Solving General System of Equations via Gene...
An Improved Iterative Method for Solving General System of Equations via Gene...An Improved Iterative Method for Solving General System of Equations via Gene...
An Improved Iterative Method for Solving General System of Equations via Gene...Zac Darcy
 
An Improved Iterative Method for Solving General System of Equations via Gene...
An Improved Iterative Method for Solving General System of Equations via Gene...An Improved Iterative Method for Solving General System of Equations via Gene...
An Improved Iterative Method for Solving General System of Equations via Gene...Zac Darcy
 
Multi-Domain Diversity Preservation to Mitigate Particle Stagnation and Enab...
Multi-Domain Diversity Preservation to Mitigate Particle Stagnation and Enab...Multi-Domain Diversity Preservation to Mitigate Particle Stagnation and Enab...
Multi-Domain Diversity Preservation to Mitigate Particle Stagnation and Enab...Weiyang Tong
 
Two-Stage Eagle Strategy with Differential Evolution
Two-Stage Eagle Strategy with Differential EvolutionTwo-Stage Eagle Strategy with Differential Evolution
Two-Stage Eagle Strategy with Differential EvolutionXin-She Yang
 
AN IMPROVED ITERATIVE METHOD FOR SOLVING GENERAL SYSTEM OF EQUATIONS VIA GENE...
AN IMPROVED ITERATIVE METHOD FOR SOLVING GENERAL SYSTEM OF EQUATIONS VIA GENE...AN IMPROVED ITERATIVE METHOD FOR SOLVING GENERAL SYSTEM OF EQUATIONS VIA GENE...
AN IMPROVED ITERATIVE METHOD FOR SOLVING GENERAL SYSTEM OF EQUATIONS VIA GENE...Zac Darcy
 
Model Selection and Validation
Model Selection and ValidationModel Selection and Validation
Model Selection and Validationgmorishita
 
Emerging Approach to Computing Techniques.pptx
Emerging Approach to Computing Techniques.pptxEmerging Approach to Computing Techniques.pptx
Emerging Approach to Computing Techniques.pptxPoonamKumarSharma
 
17 Machine Learning Radial Basis Functions
17 Machine Learning Radial Basis Functions17 Machine Learning Radial Basis Functions
17 Machine Learning Radial Basis FunctionsAndres Mendez-Vazquez
 
Accelerated life testing
Accelerated life testingAccelerated life testing
Accelerated life testingSteven Li
 
Chapter09.ppt
Chapter09.pptChapter09.ppt
Chapter09.pptbutest
 
Genetic Algorithm for the Traveling Salesman Problem using Sequential Constru...
Genetic Algorithm for the Traveling Salesman Problem using Sequential Constru...Genetic Algorithm for the Traveling Salesman Problem using Sequential Constru...
Genetic Algorithm for the Traveling Salesman Problem using Sequential Constru...CSCJournals
 
Energy-Based Models with Applications to Speech and Language Processing
Energy-Based Models with Applications to Speech and Language ProcessingEnergy-Based Models with Applications to Speech and Language Processing
Energy-Based Models with Applications to Speech and Language Processingnxmaosdh232
 

Similar to Group 9 genetic-algorithms (1) (20)

Learning to Search Henry Kautz
Learning to Search Henry KautzLearning to Search Henry Kautz
Learning to Search Henry Kautz
 
Learning to Search Henry Kautz
Learning to Search Henry KautzLearning to Search Henry Kautz
Learning to Search Henry Kautz
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
1582997627872.pdf
1582997627872.pdf1582997627872.pdf
1582997627872.pdf
 
GA.pptx
GA.pptxGA.pptx
GA.pptx
 
An Improved Iterative Method for Solving General System of Equations via Gene...
An Improved Iterative Method for Solving General System of Equations via Gene...An Improved Iterative Method for Solving General System of Equations via Gene...
An Improved Iterative Method for Solving General System of Equations via Gene...
 
An Improved Iterative Method for Solving General System of Equations via Gene...
An Improved Iterative Method for Solving General System of Equations via Gene...An Improved Iterative Method for Solving General System of Equations via Gene...
An Improved Iterative Method for Solving General System of Equations via Gene...
 
Multi-Domain Diversity Preservation to Mitigate Particle Stagnation and Enab...
Multi-Domain Diversity Preservation to Mitigate Particle Stagnation and Enab...Multi-Domain Diversity Preservation to Mitigate Particle Stagnation and Enab...
Multi-Domain Diversity Preservation to Mitigate Particle Stagnation and Enab...
 
Two-Stage Eagle Strategy with Differential Evolution
Two-Stage Eagle Strategy with Differential EvolutionTwo-Stage Eagle Strategy with Differential Evolution
Two-Stage Eagle Strategy with Differential Evolution
 
CI_L02_Optimization_ag2_eng.pdf
CI_L02_Optimization_ag2_eng.pdfCI_L02_Optimization_ag2_eng.pdf
CI_L02_Optimization_ag2_eng.pdf
 
04 1 evolution
04 1 evolution04 1 evolution
04 1 evolution
 
AN IMPROVED ITERATIVE METHOD FOR SOLVING GENERAL SYSTEM OF EQUATIONS VIA GENE...
AN IMPROVED ITERATIVE METHOD FOR SOLVING GENERAL SYSTEM OF EQUATIONS VIA GENE...AN IMPROVED ITERATIVE METHOD FOR SOLVING GENERAL SYSTEM OF EQUATIONS VIA GENE...
AN IMPROVED ITERATIVE METHOD FOR SOLVING GENERAL SYSTEM OF EQUATIONS VIA GENE...
 
Model Selection and Validation
Model Selection and ValidationModel Selection and Validation
Model Selection and Validation
 
Emerging Approach to Computing Techniques.pptx
Emerging Approach to Computing Techniques.pptxEmerging Approach to Computing Techniques.pptx
Emerging Approach to Computing Techniques.pptx
 
17 Machine Learning Radial Basis Functions
17 Machine Learning Radial Basis Functions17 Machine Learning Radial Basis Functions
17 Machine Learning Radial Basis Functions
 
Accelerated life testing
Accelerated life testingAccelerated life testing
Accelerated life testing
 
Borgulya
BorgulyaBorgulya
Borgulya
 
Chapter09.ppt
Chapter09.pptChapter09.ppt
Chapter09.ppt
 
Genetic Algorithm for the Traveling Salesman Problem using Sequential Constru...
Genetic Algorithm for the Traveling Salesman Problem using Sequential Constru...Genetic Algorithm for the Traveling Salesman Problem using Sequential Constru...
Genetic Algorithm for the Traveling Salesman Problem using Sequential Constru...
 
Energy-Based Models with Applications to Speech and Language Processing
Energy-Based Models with Applications to Speech and Language ProcessingEnergy-Based Models with Applications to Speech and Language Processing
Energy-Based Models with Applications to Speech and Language Processing
 

Recently uploaded

SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
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
 
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
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...Call Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
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
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 

Recently uploaded (20)

SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
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
 
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
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
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
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 

Group 9 genetic-algorithms (1)

  • 2. Inspiration - Evolution • Natural Selection: – “Survival of the Fittest” – favourable traits become common and unfavourable traits become uncommon in successive generations • Sexual Reproduction: – Chromosomal crossover and genetic recombination – population is genetically variable – adaptive evolution is facilitated – unfavourable mutations are eliminated
  • 3. Overview  Inspiration  The basic algorithm  Encoding  Selection  Crossover  Mutation  Why Genetic Algorithms work ?  Schemas  Hyper-planes  Schema Theorem  Strengths and Weakness  Applications  TSP  Conclusion
  • 5. Encoding of Solution Space  Represent solution space by strings of fixed length over some alphabet  TSP:  ordering of points  Knapsack:  inclusion in knapsack A D B E C B E D A C B A C E D 0 0 1 0 1 1 0 1 1 0
  • 6. Selection • Fitness function: – f(x), x is a chromosome in the solution space – f(x) may be: • an well-defined objective function to be optimised – e.g. TSP and knapsack • a heuristic – e.g. N-Queens • Probability distribution for selection: • Fitness proportional selection       M j j i i x f x f x X P 1 ) ( ) (
  • 7. Operators-Crossover and Mutation • Crossover: – Applied with high probability – Position for crossover on the two parent chromosomes randomly selected – Offspring share characteristics of well-performing parents – Combinations of well-performing characteristics generated • Mutation: – Applied with low probability – Bit for mutation randomly selected – New characteristics introduced into the population – Prevents algorithm from getting trapped into a local optimum
  • 8. The Basic Algorithm 1. Fix population size M 2. Randomly generate M strings in the solution space 3. Observe the fitness of each chromosome 4. Repeat: 1. Select two fittest strings to reproduce 2. Apply crossover with high probability to produce offspring 3. Apply mutation to parent or offspring with low probability 4. Observe the fitness of each new string 5. Replace weakest strings of the population with the offspring until i. fixed number of iterations completed, OR ii. average/best fitness above a threshold, OR iii. average/best fitness value unchanged for a fixed number of consecutive iterations
  • 9. Example • Problem specification: – string of length 4 – two 0’s and two 1’s – 0’s to the right of the 1’s • Solution space: • Fitness function (heuristic): – f(x) = number of bits that match the ones in the solution • Initialization (M = 4): 0 0 1 1  4 1 , 0 1 0 0 0 1 ) (  A f 0 1 0 0 1 ) (  B f 0 1 0 1 2 ) (  C f 0 0 1 0 3 ) (  D f 75 . 1  av f 0 1 0 1 0 0 1 0 0 1 0 0 0 0 1 1 1 ) (  X f 4 ) (  Y f 0 1 0 0 0 1 1 0 2 ) (  Z f
  • 10. Example (contd.)  After iteration 1:  After iteration 2: 0 1 0 1 2 ) (  A f 0 1 1 0 2 ) (  B f 0 0 1 0 3 ) (  C f 0 0 1 1 4 ) (  D f 75 . 2  av f 0 1 0 1 2 ) (  A f 0 0 0 1 3 ) (  B f 0 0 1 0 3 ) (  C f 0 0 1 1 4 ) (  D f 3  av f 0 1 0 1 0 0 1 0 0 1 1 0 0 0 0 1 2 ) (  X f 3 ) (  Y f
  • 12. Schemas  Population  Strings over alphabet {0,1} of length L  E.g.  Schema  A schema is a subset of the space of all possible individuals for which all the genes match the template for schema H.  Strings over alphabet {0,1,*} of length L  E.g. } 11110 , 11010 , 10110 , 10010 { ] 10 * * 1 [   H 10010  s
  • 13. Hyper-plane model  Search space  A hyper-cube in L dimensional space  Individuals  Vertices of hyper-cube  Schemas  Hyper-planes formed by vertices 0**
  • 14. Sampling Hyper-planes  Look for hyper-planes (schemas) with good fitness value instead of vertices (individuals) to reduce search space  Each vertex  Member of 3L hyper-planes  Samples hyper-planes  Average Fitness of a hyper-plane can be estimated by sampling fitness of members in population  Selection retains hyper-planes with good estimated fitness values and discards others
  • 15. Schema Theorem  Schema Order O(H)  Schema order, O(.) , is the number of non ‘*’ genes in schema H.  E.g. O(1**1*) = 2  Schema Defining Length δ(H)  Schema Defining Length, δ(H), is the distance between first and last non ‘*’ gene in schema H  E.g. δ(1**1*) = 4 – 1 = 3  Schemas with short defining length, low order with fitness above average population are favored by GAs
  • 16. Formal Statement  Selection probability  Crossover probability  Mutation probability  Expected number of members of a schema ) , ( ) , ( ) , ( )) 1 , ( ( t H f t H f t H m t H m E   1 ) ( ) (   L H c crossover p h P  m mutation p H h P ) ( ) (   )) ( 1 ) ( 1 ( ) , ( ) , ( ) , ( ) 1 , ( ( H p L H p t H f t H f t H m t H m E m c       
  • 17. Why crossover and mutation?  Crossover  Produces new solutions while ‘remembering’ the characteristics of old solutions  Partially preserves distribution of strings across schemas  Mutation  Randomly generates new solutions which cannot be produced from existing population  Avoids local optimum
  • 19. Area of application GAs can be used when:  Non-analytical problems.  Non-linear models.  Uncertainty.  Large state spaces.
  • 20. Non-analytical problems  Fitness functions may not be expressed analytically always.  Domain specific knowledge may not be computable from fitness function.  Scarce domain knowledge to guide the search.
  • 21. Non-linear models  Solutions depend on starting values.  Non – linear models may converge to local optimum.  Impose conditions on fitness functions such as convexity, etc.  May require the problem to be approximated to fit the non-linear model.
  • 22. Uncertainty  Noisy / approximated fitness functions.  Changing parameters.  Changing fitness functions.  Why do GAs work? Because uncertainty is common in nature.
  • 23. Large state spaces  Heuristics focus only on the immediate area of initial solutions.  State-explosion problem: number of states huge or even infinite! Too large to be handled.  State space may not be completely understood.
  • 24. Characteristics of GAs  Simple, Powerful, Adaptive, Parallel  Guarantee global optimum solutions.  Give solutions of un-approximated form of problem.  Finer granularity of search spaces.
  • 25. When not to use GA!  Constrained mathematical optimization problems especially when there are few solutions.  Constraints are difficult to incorporate into a GA.  Guided domain search is possible and efficient.
  • 26. PRACTICAL EXAMPLE - TSP Saurabh Chakradeo
  • 27. TSP Description  Problem Statement: Given a complete weighted undirected graph, find the shortest Hamiltonian cycle. (n nodes)  The size of the solution space in (n-1)!/2  Dynamic Programming gives us a solution in time O(n22n)  TSP is NP Complete
  • 28. TSP Encoding  Binary representation  Tour 1-3-2 is represented as ( 00 10 01 )  Path representation  Natural – ( 1 3 2 )  Adjacency representation  Tour 1-3-2 is represented as ( 3 1 2 )  Ordinal representation  A reference list is used. Let that be ( 1 2 3 ).  Tour 1-3-2 is represented as ( 1 2 1 )
  • 29. TSP – Crossover operator  Order Based crossover (OX2)  Selects at random several positions in the parent tour  Imposes the order of nodes in selected positions of one parent on the other parent  Parents: (1 2 3 4 5 6 7 8) and (2 4 6 8 7 5 3 1)  Selected positions, 2nd , 3rd and 6th  Impose order on (2 4 6 8 7 5 3 1) &(1 2 3 4 5 6 7 8)  Children are (2 4 3 8 7 5 6 1) and (1 2 3 4 6 5 7 8)
  • 30. TSP – Mutation Operators  Exchange Mutation Operator (EM)  Randomly select two nodes and interchange their positions.  ( 1 2 3 4 5 6 ) can become ( 1 2 6 4 5 3 )  Displacement Mutation Operator (DM)  Select a random sub-tour, remove and insert it in a different location.  ( 1 2 [3 4 5] 6 ) becomes ( 1 2 6 3 4 5 )
  • 31. Conclusions  Plethora of applications  Molecular biology, scheduling, cryptography, parameter optimization  General algorithmic model applicable to a large variety of classes of problems  Another in the list of algorithms inspired by biological processes – scope for more parallels?  Philosophical Implication:  Are humans actually moving towards their global optimum?
  • 32. References  Adaptation in Natural and Artificial Systems, John H. Holland, MIT Press, 1992.  Goldberg, D. E. 1989 Genetic Algorithms in Search, Optimization and Machine Learning. 1st. Addison-Wesley Longman Publishing Co., Inc.  Genetic Algorithms for the Travelling Salesman Problem: A Review of Representations and Operators, P. Larranaga et al., University of Basque, Spain. Artificial Intelligence Review, Volume 13, Number 2 /

Editor's Notes

  1. Most organisms evolve by means of two primary processes: natural selection and sexual reproduction. The first determines which members of population survive and reproduce, and the second ensures mixing and recombination among the genes of their offspring. When sperm and ova fuse, matching chromosomes line up with one another and then cross-over partway along their length, thus swapping genetic material. This mixing allows creatures to evolve much more rapidly than they would if each offspring simply contained a copy of the genes of a single parent, modified occasionally by mutation. High-quality strings mate; low-quality ones perish. As generations pass, strings associated with improved solutions will predominate. Furthermore, the mating process continually combines these strings in new ways, generating ever more sophisticated solutions.
  2. Non-linear programming solvers generally use some form of gradient search technique to move along the steepest gradient until the highest point (maximisation) is reached. In the case of linear programming, a global optimum will always be attained (). However, non-linear programming models may be subject to problems of convergence to local optima, or in some cases, may be unable to find a feasible solution. This largely depends on the starting point of the solver.
  3. 1) Noisy fitness function. Noise in fitness evaluations may come from many different sources such as sensory measurement errors or randomized simulations. 2) Approximated fitness function. When the fitness function is very expensive to evaluate, or an analytical fitness function is not available, approximated fitness functions are often used instead. 3) Robustness. Often, when a solution is implemented, the design variables or the environmental parameters are subject to perturbations or changes. Therefore, a common requirement is that a solution should still work satisfyingly either when the design variables change slightly, e.g., due to manufacturing tolerances, or when the environmental parameters vary slightly. This issue is generally known as the search for robust solutions. 4) Dynamic fitness function. In a changing environment, it should be possible to continuously track the moving optimum rather than to repeatedly restart the optimization process.
  4. Iterative improvement techniques based on module interchange are the most robust, simple and successful heuristics in solving the partitioning and placement problems. The main disadvantage of these heuristics is that they mainly focus on the immediate area around the current initial solution, thus no attempt is made to explore all regions of the parameter space The main practical limitation when model checking real systems is dealing with the so-called state-explosion problem: the number of states contained in the state space of large complex systems can be huge, even infinite, thereby making exhaustive state-space exploration intractable. The search space is large, complex or poorly understood. Domain knowledge is scarce or expert knowledge is difficult to encode to narrow the search space. No mathematical analysis is available.
  5. Genetic Algorithms are adaptive to their environments. timing improvement could be done by utilising the implicit parallelization of multiple independent generations evolving at the same time.
  6. As in the example above, it would not be expected for a constrained mathematical programming problem to be solved faster by GA, which is a probabilistic search method, than by a traditional optimisation approach, which is a guided search method and has been developed and successfully applied to many models of this type over the years. Genetic algorithms should not be regarded as a replacement for other existing approaches, but as another optimisation approach which the modeller can use. Unconstrained problems are particularly suitable for consideration as constraints require the management of possible infeasibility, which may slow down the optimisation process considerably. Generally, a standard genetic algorithm is taken for specific development of the problem under investigation where the modeller should take advantage of model structure for effective implementation.