SlideShare a Scribd company logo
GGeenneettiicc AAllggoorriitthhmmss:: 
Wendy Williams 1 
Metaheuristic Algorithms 
“Genetic Algorithms are 
good at taking large, 
potentially huge search 
spaces and navigating 
them, looking for optimal 
combinations of things, 
solutions you might not 
otherwise find in a 
lifetime.” 
- Salvatore Mangano 
Computer Design, May 1995 
Genetic Algorithms: A Tutorial 
AA TTuuttoorriiaall
The Genetic Algorithm 
 Directed search algorithms based on 
the mechanics of biological evolution 
 Developed by John Holland, University 
of Michigan (1970’s) 
¨ To understand the adaptive processes of 
natural systems 
¨ To design artificial systems software that 
retains the robustness of natural systems 
Wendy Williams 2 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial
The Genetic Algorithm (cont.) 
 Provide efficient, effective techniques 
for optimization and machine learning 
applications 
 Widely-used today in business, 
scientific and engineering circles 
Wendy Williams 3 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial
Classes of Search Techniques 
C a lc u lu s - b a s e d t e c h n iq u e s 
D ir e c t m e t h o d s I n d ir e c t m e t h o d s 
G u i d e d r a n d o m s e a r c h t e c h n i q u e s 
E v o l u t i o n a r y a l g o r i t h m s S im u la t e d a n n e a lin g 
P a r a l l e l 
G e n e t i c a l g o r i t h m s 
Wendy Williams 4 
Metaheuristic Algorithms 
S e q u e n t i a l 
E n u m e r a t iv e t e c h n iq u e s 
Genetic Algorithms: A Tutorial 
F in o n a c c i N e w t o n 
E v o lu t io n a r y s t r a t e g ie s 
C e n t r a l i z e d D i s t r i b u t e d 
S t e a d y - s t a t e G e n e r a t i o n a l 
D y n a m ic p r o g r a m m in g 
S e a r c h t e c h n i q u e s
Components of a GA 
A problem to solve, and ... 
 Encoding technique (gene, chromosome) 
 Initialization procedure (creation) 
 Evaluation function (environment) 
 Selection of parents (reproduction) 
 Genetic operators (mutation, recombination) 
 Parameter settings (practice and art) 
Wendy Williams 5 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial
Simple Genetic Algorithm 
{ 
initialize population; 
evaluate population; 
while TerminationCriteriaNotSatisfied 
{ 
select parents for reproduction; 
perform recombination and mutation; 
evaluate population; 
} 
Wendy Williams 6 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial 
}
The GA Cycle of Reproduction 
parents 
deleted 
members 
Wendy Williams 7 
Metaheuristic Algorithms 
modification 
Genetic Algorithms: A Tutorial 
reproduction 
population evaluation 
discard 
children 
modified 
children 
evaluated children
Population 
population 
Wendy Williams 8 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial 
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 ...
Reproduction 
reproduction 
Wendy Williams 9 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial 
population 
parents 
children 
Parents are selected at random with 
selection chances biased in relation to 
chromosome evaluations.
Chromosome Modification 
modified children 
Wendy Williams 10 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial 
modification 
children 
 Modifications are stochastically triggered 
 Operator types are: 
¨ Mutation 
¨ Crossover (recombination)
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 
Wendy Williams 11 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial
Crossover: Recombination 
P1 (0 1 1 0 1 0 0 0) (0 1 0 0 1 0 0 0) C1 
P2 (1 1 0 1 1 0 1 0) (1 1 1 1 1 0 1 0) C2 
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) 
Wendy Williams 12 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial 
*
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 
Wendy Williams 13 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial 
evaluation 
evaluated 
children 
modified 
children
population 
discarded members 
discard 
Wendy Williams 14 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial 
Deletion 
 Generational GA: 
entire populations replaced with each iteration 
 Steady-state GA: 
a few members replaced each generation
An Abstract Example 
Distribution of Individuals in Generation 0 
Distribution of Individuals in Generation N 
Wendy Williams 15 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial
A Simple Example 
“The Gene is by far the most sophisticated program around.” 
- Bill Gates, Business Week, June 27, 1994 
Wendy Williams 16 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial
A Simple Example 
The Traveling Salesman Problem: 
Find a tour of a given set of cities so that 
¨ each city is visited only once 
¨ the total distance traveled is minimized 
Wendy Williams 17 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial
Representation 
Representation is an ordered list of city 
numbers known as an order-based GA. 
1) London 3) Dunedin 5) Beijing 7) Tokyo 
2) Venice 4) Singapore 6) Phoenix 8) Victoria 
CityList1 (3 5 7 2 1 6 4 8) 
CityList2 (2 5 7 6 8 1 3 4) 
Wendy Williams 18 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial
Wendy Williams 19 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial 
Crossover 
Crossover combines inversion and 
recombination: 
* * 
Parent1 (3 5 7 2 1 6 4 8) 
Parent2 (2 5 7 6 8 1 3 4) 
Child (5 8 7 2 1 6 3 4) 
This operator is called the Order1 crossover.
Mutation 
Mutation involves reordering of the list: 
Wendy Williams 20 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial 
* * 
Before: (5 8 7 2 1 6 3 4) 
After: (5 8 6 2 1 7 3 4)
TSP Example: 30 Cities 
100 
90 
80 
70 
60 
50 
40 
30 
20 
10 
Wendy Williams 21 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial 
0 
0 10 20 30 40 50 60 70 80 90 100 
x 
y
Solution i (Distance = 941) 
100 
90 
80 
70 
60 
50 
40 
30 
20 
10 
Wendy Williams 22 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial 
TSP30 (Performance = 941) 
0 
0 10 20 30 40 50 60 70 80 90 100 
x 
y
Solution j(Distance = 800) 
100 
90 
80 
70 
60 
50 
40 
30 
20 
10 
Wendy Williams 23 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial 
TSP30 (Performance = 800) 
0 
0 10 20 30 40 50 60 70 80 90 100 
x 
y
Solution k(Distance = 652) 
100 
90 
80 
70 
60 
50 
40 
30 
20 
10 
Wendy Williams 24 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial 
TSP30 (Performance = 652) 
0 
0 10 20 30 40 50 60 70 80 90 100 
x 
y
Best Solution (Distance = 420) 
TSP30 Solution (Performance = 420) 
100 
90 
80 
70 
60 
50 
40 
30 
20 
10 
Wendy Williams 25 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial 
0 
0 10 20 30 40 50 60 70 80 90 100 
x 
y
Overview of Performance 
TSP30 - Overview of Performance 
1600 
1400 
1200 
1000 
800 
600 
400 
200 
Wendy Williams 26 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial 
0 
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 
Generations (1000) 
Distance 
Best 
Worst 
Average
Considering the GA Technology 
Wendy Williams 27 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial 
“Almost eight years ago ... 
people at Microsoft wrote 
a program [that] uses 
some genetic things for 
finding short code 
sequences. Windows 2.0 
and 3.2, NT, and almost 
all Microsoft applications 
products have shipped 
with pieces of code 
created by that system.” 
- Nathan Myhrvold, Microsoft Advanced 
Technology Group, Wired, September 1995
Issues for GA Practitioners 
Choosing basic implementation issues: 
¨ representation 
¨ population size, mutation rate, ... 
¨ selection, deletion policies 
¨ crossover, mutation operators 
Termination Criteria 
Performance, scalability 
Solution is only as good as the evaluation 
function (often hardest part) 
Wendy Williams 28 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial
Benefits of Genetic Algorithms 
Concept is easy to understand 
Modular, separate from application 
Supports multi-objective optimization 
Good for “noisy” environments 
Always an answer; answer gets better 
with time 
Inherently parallel; easily distributed 
Wendy Williams 29 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial
Benefits of Genetic Algorithms (cont.) 
Many ways to speed up and improve a 
GA-based application as knowledge 
about problem domain is gained 
Easy to exploit previous or alternate 
solutions 
Flexible building blocks for hybrid 
applications 
Substantial history and range of use 
Wendy Williams 30 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial
When to Use a GA 
Alternate solutions are too slow or overly 
complicated 
Need an exploratory tool to examine new 
approaches 
Problem is similar to one that has already been 
successfully solved by using a GA 
Want to hybridize with an existing solution 
Benefits of the GA technology meet key problem 
requirements 
Wendy Williams 31 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial
Some GA Application Types 
Domain Application Types 
Control gas pipeline, pole balancing, missile evasion, pursuit 
Design semiconductor layout, aircraft design, keyboard 
configuration, communication networks 
Scheduling manufacturing, facility scheduling, resource allocation 
Robotics trajectory planning 
Machine Learning designing neural networks, improving classification 
algorithms, classifier systems 
Signal Processing filter design 
Game Playing poker, checkers, prisoner’s dilemma 
Combinatorial 
Optimization 
set covering, travelling salesman, routing, bin packing, 
graph colouring and partitioning 
Wendy Williams 32 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial
Conclusions 
Question: ‘If GAs are so smart, why ain’t they rich?’ 
Answer: ‘Genetic algorithms are rich - rich in 
application across a large and growing 
number of disciplines.’ 
- David E. Goldberg, Genetic Algorithms in Search, Optimization and Machine Learning 
Wendy Williams 33 
Metaheuristic Algorithms 
Genetic Algorithms: A Tutorial

More Related Content

What's hot

Flowchart of GA
Flowchart of GAFlowchart of GA
Flowchart of GA
Ishucs
 
Genetic algorithm fitness function
Genetic algorithm fitness functionGenetic algorithm fitness function
Genetic algorithm fitness function
Prof Ansari
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
Designage Solutions
 
GENETIC ALGORITHM
GENETIC ALGORITHM GENETIC ALGORITHM
GENETIC ALGORITHM
Abhishek Sur
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
Alaa Khamis, PhD, SMIEEE
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
anas_elf
 
Optimization technique genetic algorithm
Optimization technique genetic algorithmOptimization technique genetic algorithm
Optimization technique genetic algorithm
Uday Wankar
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHM
Puneet Kulyana
 
Introduction to the Genetic Algorithm
Introduction to the Genetic AlgorithmIntroduction to the Genetic Algorithm
Introduction to the Genetic Algorithm
Qiang Hao
 
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
International Islamic University
 
Introduction to Genetic Algorithm
Introduction to Genetic Algorithm Introduction to Genetic Algorithm
Introduction to Genetic Algorithm
ramyaravindran12
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
Premsankar Chakkingal
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
Jari Abbas
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
SHIMI S L
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
zamakhan
 
Application of Genetic Algorithm in Software Testing
Application of Genetic Algorithm in Software TestingApplication of Genetic Algorithm in Software Testing
Application of Genetic Algorithm in Software Testing
Ghanshyam Yadav
 
genetic programming
genetic programminggenetic programming
genetic programming
Bassant Hassan
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
rabidityfactor
 
Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)
Kapil Khatiwada
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
Respa Peter
 

What's hot (20)

Flowchart of GA
Flowchart of GAFlowchart of GA
Flowchart of GA
 
Genetic algorithm fitness function
Genetic algorithm fitness functionGenetic algorithm fitness function
Genetic algorithm fitness function
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
GENETIC ALGORITHM
GENETIC ALGORITHM GENETIC ALGORITHM
GENETIC ALGORITHM
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Optimization technique genetic algorithm
Optimization technique genetic algorithmOptimization technique genetic algorithm
Optimization technique genetic algorithm
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHM
 
Introduction to the Genetic Algorithm
Introduction to the Genetic AlgorithmIntroduction to the Genetic Algorithm
Introduction to the 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
 
Introduction to Genetic Algorithm
Introduction to Genetic Algorithm Introduction to Genetic Algorithm
Introduction to 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 algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
Application of Genetic Algorithm in Software Testing
Application of Genetic Algorithm in Software TestingApplication of Genetic Algorithm in Software Testing
Application of Genetic Algorithm in Software Testing
 
genetic programming
genetic programminggenetic programming
genetic programming
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)Genetic_Algorithm_AI(TU)
Genetic_Algorithm_AI(TU)
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 

Similar to Genatic Algorithm

AI_PPT_Genetic-Algorithms_2.ppt
AI_PPT_Genetic-Algorithms_2.pptAI_PPT_Genetic-Algorithms_2.ppt
AI_PPT_Genetic-Algorithms_2.ppt
HotTea
 
ga.ppt
ga.pptga.ppt
ga.ppt
ImXaib
 
GA tutorial.pst
GA tutorial.pstGA tutorial.pst
GA tutorial.pst
Jacob Rubinovitz
 
Ga
GaGa
Advanced Optimization Techniques
Advanced Optimization TechniquesAdvanced Optimization Techniques
Advanced Optimization Techniques
Valerie Felton
 
Automated Software Enging, Fall 2015, NCSU
Automated Software Enging, Fall 2015, NCSUAutomated Software Enging, Fall 2015, NCSU
Automated Software Enging, Fall 2015, NCSU
CS, NcState
 
Topic_6
Topic_6Topic_6
Topic_6
butest
 
An Introduction To Applied Evolutionary Meta Heuristics
An Introduction To Applied Evolutionary Meta HeuristicsAn Introduction To Applied Evolutionary Meta Heuristics
An Introduction To Applied Evolutionary Meta Heuristics
biofractal
 
ga-2.ppt
ga-2.pptga-2.ppt
ga-2.ppt
sayedmha
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
Vanessa Camilleri
 
Introduction to Genetic Algorithms
Introduction to Genetic AlgorithmsIntroduction to Genetic Algorithms
Introduction to Genetic Algorithms
Dr. C.V. Suresh Babu
 
Data Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsData Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic Algorithms
Derek Kane
 
Software testing
Software testingSoftware testing
Software testing
DIPEN SAINI
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
Ankit Chaudhary
 
Or ppt,new
Or ppt,newOr ppt,new
Or ppt,new
Roy Thomas
 
Evolutionary Optimization Algorithms & Large-Scale Machine Learning
Evolutionary Optimization Algorithms & Large-Scale Machine LearningEvolutionary Optimization Algorithms & Large-Scale Machine Learning
Evolutionary Optimization Algorithms & Large-Scale Machine Learning
University of Maribor
 
Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02
Amna Saeed
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
ESUG
 
GA.pptx
GA.pptxGA.pptx
Genetic-Algorithms.ppt
Genetic-Algorithms.pptGenetic-Algorithms.ppt
Genetic-Algorithms.ppt
Nipun85
 

Similar to Genatic Algorithm (20)

AI_PPT_Genetic-Algorithms_2.ppt
AI_PPT_Genetic-Algorithms_2.pptAI_PPT_Genetic-Algorithms_2.ppt
AI_PPT_Genetic-Algorithms_2.ppt
 
ga.ppt
ga.pptga.ppt
ga.ppt
 
GA tutorial.pst
GA tutorial.pstGA tutorial.pst
GA tutorial.pst
 
Ga
GaGa
Ga
 
Advanced Optimization Techniques
Advanced Optimization TechniquesAdvanced Optimization Techniques
Advanced Optimization Techniques
 
Automated Software Enging, Fall 2015, NCSU
Automated Software Enging, Fall 2015, NCSUAutomated Software Enging, Fall 2015, NCSU
Automated Software Enging, Fall 2015, NCSU
 
Topic_6
Topic_6Topic_6
Topic_6
 
An Introduction To Applied Evolutionary Meta Heuristics
An Introduction To Applied Evolutionary Meta HeuristicsAn Introduction To Applied Evolutionary Meta Heuristics
An Introduction To Applied Evolutionary Meta Heuristics
 
ga-2.ppt
ga-2.pptga-2.ppt
ga-2.ppt
 
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
 
Data Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsData Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic Algorithms
 
Software testing
Software testingSoftware testing
Software testing
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Or ppt,new
Or ppt,newOr ppt,new
Or ppt,new
 
Evolutionary Optimization Algorithms & Large-Scale Machine Learning
Evolutionary Optimization Algorithms & Large-Scale Machine LearningEvolutionary Optimization Algorithms & Large-Scale Machine Learning
Evolutionary Optimization Algorithms & Large-Scale Machine Learning
 
Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02Geneticalgorithms 100403002207-phpapp02
Geneticalgorithms 100403002207-phpapp02
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
GA.pptx
GA.pptxGA.pptx
GA.pptx
 
Genetic-Algorithms.ppt
Genetic-Algorithms.pptGenetic-Algorithms.ppt
Genetic-Algorithms.ppt
 

More from Yasir Khan

Lecture 6
Lecture 6Lecture 6
Lecture 6
Yasir Khan
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
Yasir Khan
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
Yasir Khan
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
Yasir Khan
 
Lec#1
Lec#1Lec#1
Lec#1
Yasir Khan
 
Ch10 (1)
Ch10 (1)Ch10 (1)
Ch10 (1)
Yasir Khan
 
Ch09
Ch09Ch09
Ch05
Ch05Ch05
Snooping protocols 3
Snooping protocols 3Snooping protocols 3
Snooping protocols 3
Yasir Khan
 
Snooping 2
Snooping 2Snooping 2
Snooping 2
Yasir Khan
 
Introduction 1
Introduction 1Introduction 1
Introduction 1
Yasir Khan
 
Hpc sys
Hpc sysHpc sys
Hpc sys
Yasir Khan
 
Hpc 6 7
Hpc 6 7Hpc 6 7
Hpc 6 7
Yasir Khan
 
Hpc 4 5
Hpc 4 5Hpc 4 5
Hpc 4 5
Yasir Khan
 
Hpc 3
Hpc 3Hpc 3
Hpc 3
Yasir Khan
 
Hpc 2
Hpc 2Hpc 2
Hpc 2
Yasir Khan
 
Hpc 1
Hpc 1Hpc 1
Hpc 1
Yasir Khan
 
Flynns classification
Flynns classificationFlynns classification
Flynns classification
Yasir Khan
 
Dir based imp_5
Dir based imp_5Dir based imp_5
Dir based imp_5
Yasir Khan
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
Yasir Khan
 

More from Yasir Khan (20)

Lecture 6
Lecture 6Lecture 6
Lecture 6
 
Lecture 4
Lecture 4Lecture 4
Lecture 4
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Lec#1
Lec#1Lec#1
Lec#1
 
Ch10 (1)
Ch10 (1)Ch10 (1)
Ch10 (1)
 
Ch09
Ch09Ch09
Ch09
 
Ch05
Ch05Ch05
Ch05
 
Snooping protocols 3
Snooping protocols 3Snooping protocols 3
Snooping protocols 3
 
Snooping 2
Snooping 2Snooping 2
Snooping 2
 
Introduction 1
Introduction 1Introduction 1
Introduction 1
 
Hpc sys
Hpc sysHpc sys
Hpc sys
 
Hpc 6 7
Hpc 6 7Hpc 6 7
Hpc 6 7
 
Hpc 4 5
Hpc 4 5Hpc 4 5
Hpc 4 5
 
Hpc 3
Hpc 3Hpc 3
Hpc 3
 
Hpc 2
Hpc 2Hpc 2
Hpc 2
 
Hpc 1
Hpc 1Hpc 1
Hpc 1
 
Flynns classification
Flynns classificationFlynns classification
Flynns classification
 
Dir based imp_5
Dir based imp_5Dir based imp_5
Dir based imp_5
 
Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
 

Genatic Algorithm

  • 1. GGeenneettiicc AAllggoorriitthhmmss:: Wendy Williams 1 Metaheuristic Algorithms “Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations of things, solutions you might not otherwise find in a lifetime.” - Salvatore Mangano Computer Design, May 1995 Genetic Algorithms: A Tutorial AA TTuuttoorriiaall
  • 2. The Genetic Algorithm Directed search algorithms based on the mechanics of biological evolution Developed by John Holland, University of Michigan (1970’s) ¨ To understand the adaptive processes of natural systems ¨ To design artificial systems software that retains the robustness of natural systems Wendy Williams 2 Metaheuristic Algorithms Genetic Algorithms: A Tutorial
  • 3. The Genetic Algorithm (cont.) Provide efficient, effective techniques for optimization and machine learning applications Widely-used today in business, scientific and engineering circles Wendy Williams 3 Metaheuristic Algorithms Genetic Algorithms: A Tutorial
  • 4. Classes of Search Techniques C a lc u lu s - b a s e d t e c h n iq u e s D ir e c t m e t h o d s I n d ir e c t m e t h o d s G u i d e d r a n d o m s e a r c h t e c h n i q u e s E v o l u t i o n a r y a l g o r i t h m s S im u la t e d a n n e a lin g P a r a l l e l G e n e t i c a l g o r i t h m s Wendy Williams 4 Metaheuristic Algorithms S e q u e n t i a l E n u m e r a t iv e t e c h n iq u e s Genetic Algorithms: A Tutorial F in o n a c c i N e w t o n E v o lu t io n a r y s t r a t e g ie s C e n t r a l i z e d D i s t r i b u t e d S t e a d y - s t a t e G e n e r a t i o n a l D y n a m ic p r o g r a m m in g S e a r c h t e c h n i q u e s
  • 5. Components of a GA A problem to solve, and ... Encoding technique (gene, chromosome) Initialization procedure (creation) Evaluation function (environment) Selection of parents (reproduction) Genetic operators (mutation, recombination) Parameter settings (practice and art) Wendy Williams 5 Metaheuristic Algorithms Genetic Algorithms: A Tutorial
  • 6. Simple Genetic Algorithm { initialize population; evaluate population; while TerminationCriteriaNotSatisfied { select parents for reproduction; perform recombination and mutation; evaluate population; } Wendy Williams 6 Metaheuristic Algorithms Genetic Algorithms: A Tutorial }
  • 7. The GA Cycle of Reproduction parents deleted members Wendy Williams 7 Metaheuristic Algorithms modification Genetic Algorithms: A Tutorial reproduction population evaluation discard children modified children evaluated children
  • 8. Population population Wendy Williams 8 Metaheuristic Algorithms Genetic Algorithms: A Tutorial 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 ...
  • 9. Reproduction reproduction Wendy Williams 9 Metaheuristic Algorithms Genetic Algorithms: A Tutorial population parents children Parents are selected at random with selection chances biased in relation to chromosome evaluations.
  • 10. Chromosome Modification modified children Wendy Williams 10 Metaheuristic Algorithms Genetic Algorithms: A Tutorial modification children Modifications are stochastically triggered Operator types are: ¨ Mutation ¨ Crossover (recombination)
  • 11. 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 Wendy Williams 11 Metaheuristic Algorithms Genetic Algorithms: A Tutorial
  • 12. Crossover: Recombination P1 (0 1 1 0 1 0 0 0) (0 1 0 0 1 0 0 0) C1 P2 (1 1 0 1 1 0 1 0) (1 1 1 1 1 0 1 0) C2 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) Wendy Williams 12 Metaheuristic Algorithms Genetic Algorithms: A Tutorial *
  • 13. 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 Wendy Williams 13 Metaheuristic Algorithms Genetic Algorithms: A Tutorial evaluation evaluated children modified children
  • 14. population discarded members discard Wendy Williams 14 Metaheuristic Algorithms Genetic Algorithms: A Tutorial Deletion Generational GA: entire populations replaced with each iteration Steady-state GA: a few members replaced each generation
  • 15. An Abstract Example Distribution of Individuals in Generation 0 Distribution of Individuals in Generation N Wendy Williams 15 Metaheuristic Algorithms Genetic Algorithms: A Tutorial
  • 16. A Simple Example “The Gene is by far the most sophisticated program around.” - Bill Gates, Business Week, June 27, 1994 Wendy Williams 16 Metaheuristic Algorithms Genetic Algorithms: A Tutorial
  • 17. A Simple Example The Traveling Salesman Problem: Find a tour of a given set of cities so that ¨ each city is visited only once ¨ the total distance traveled is minimized Wendy Williams 17 Metaheuristic Algorithms Genetic Algorithms: A Tutorial
  • 18. Representation Representation is an ordered list of city numbers known as an order-based GA. 1) London 3) Dunedin 5) Beijing 7) Tokyo 2) Venice 4) Singapore 6) Phoenix 8) Victoria CityList1 (3 5 7 2 1 6 4 8) CityList2 (2 5 7 6 8 1 3 4) Wendy Williams 18 Metaheuristic Algorithms Genetic Algorithms: A Tutorial
  • 19. Wendy Williams 19 Metaheuristic Algorithms Genetic Algorithms: A Tutorial Crossover Crossover combines inversion and recombination: * * Parent1 (3 5 7 2 1 6 4 8) Parent2 (2 5 7 6 8 1 3 4) Child (5 8 7 2 1 6 3 4) This operator is called the Order1 crossover.
  • 20. Mutation Mutation involves reordering of the list: Wendy Williams 20 Metaheuristic Algorithms Genetic Algorithms: A Tutorial * * Before: (5 8 7 2 1 6 3 4) After: (5 8 6 2 1 7 3 4)
  • 21. TSP Example: 30 Cities 100 90 80 70 60 50 40 30 20 10 Wendy Williams 21 Metaheuristic Algorithms Genetic Algorithms: A Tutorial 0 0 10 20 30 40 50 60 70 80 90 100 x y
  • 22. Solution i (Distance = 941) 100 90 80 70 60 50 40 30 20 10 Wendy Williams 22 Metaheuristic Algorithms Genetic Algorithms: A Tutorial TSP30 (Performance = 941) 0 0 10 20 30 40 50 60 70 80 90 100 x y
  • 23. Solution j(Distance = 800) 100 90 80 70 60 50 40 30 20 10 Wendy Williams 23 Metaheuristic Algorithms Genetic Algorithms: A Tutorial TSP30 (Performance = 800) 0 0 10 20 30 40 50 60 70 80 90 100 x y
  • 24. Solution k(Distance = 652) 100 90 80 70 60 50 40 30 20 10 Wendy Williams 24 Metaheuristic Algorithms Genetic Algorithms: A Tutorial TSP30 (Performance = 652) 0 0 10 20 30 40 50 60 70 80 90 100 x y
  • 25. Best Solution (Distance = 420) TSP30 Solution (Performance = 420) 100 90 80 70 60 50 40 30 20 10 Wendy Williams 25 Metaheuristic Algorithms Genetic Algorithms: A Tutorial 0 0 10 20 30 40 50 60 70 80 90 100 x y
  • 26. Overview of Performance TSP30 - Overview of Performance 1600 1400 1200 1000 800 600 400 200 Wendy Williams 26 Metaheuristic Algorithms Genetic Algorithms: A Tutorial 0 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 Generations (1000) Distance Best Worst Average
  • 27. Considering the GA Technology Wendy Williams 27 Metaheuristic Algorithms Genetic Algorithms: A Tutorial “Almost eight years ago ... people at Microsoft wrote a program [that] uses some genetic things for finding short code sequences. Windows 2.0 and 3.2, NT, and almost all Microsoft applications products have shipped with pieces of code created by that system.” - Nathan Myhrvold, Microsoft Advanced Technology Group, Wired, September 1995
  • 28. Issues for GA Practitioners Choosing basic implementation issues: ¨ representation ¨ population size, mutation rate, ... ¨ selection, deletion policies ¨ crossover, mutation operators Termination Criteria Performance, scalability Solution is only as good as the evaluation function (often hardest part) Wendy Williams 28 Metaheuristic Algorithms Genetic Algorithms: A Tutorial
  • 29. Benefits of Genetic Algorithms Concept is easy to understand Modular, separate from application Supports multi-objective optimization Good for “noisy” environments Always an answer; answer gets better with time Inherently parallel; easily distributed Wendy Williams 29 Metaheuristic Algorithms Genetic Algorithms: A Tutorial
  • 30. Benefits of Genetic Algorithms (cont.) Many ways to speed up and improve a GA-based application as knowledge about problem domain is gained Easy to exploit previous or alternate solutions Flexible building blocks for hybrid applications Substantial history and range of use Wendy Williams 30 Metaheuristic Algorithms Genetic Algorithms: A Tutorial
  • 31. When to Use a GA Alternate solutions are too slow or overly complicated Need an exploratory tool to examine new approaches Problem is similar to one that has already been successfully solved by using a GA Want to hybridize with an existing solution Benefits of the GA technology meet key problem requirements Wendy Williams 31 Metaheuristic Algorithms Genetic Algorithms: A Tutorial
  • 32. Some GA Application Types Domain Application Types Control gas pipeline, pole balancing, missile evasion, pursuit Design semiconductor layout, aircraft design, keyboard configuration, communication networks Scheduling manufacturing, facility scheduling, resource allocation Robotics trajectory planning Machine Learning designing neural networks, improving classification algorithms, classifier systems Signal Processing filter design Game Playing poker, checkers, prisoner’s dilemma Combinatorial Optimization set covering, travelling salesman, routing, bin packing, graph colouring and partitioning Wendy Williams 32 Metaheuristic Algorithms Genetic Algorithms: A Tutorial
  • 33. Conclusions Question: ‘If GAs are so smart, why ain’t they rich?’ Answer: ‘Genetic algorithms are rich - rich in application across a large and growing number of disciplines.’ - David E. Goldberg, Genetic Algorithms in Search, Optimization and Machine Learning Wendy Williams 33 Metaheuristic Algorithms Genetic Algorithms: A Tutorial

Editor's Notes

  1. Newton's method can be used to find a minimum or maximum of a function. The derivative is zero at a minimum or maximum, so minima and maxima can be found by applying Newton's method to the derivative. The iteration becomes: