Lecture 13
Lecture 13
Lecture 13
Main steps of GA
Step-1: Coding.
Step-3: Cross-over.
Step-4: Mutations.
2
Genetic Algorithms: Stochastic Operators
Selection replicates the most successful solutions
found in a population at a rate proportional to their
relative quality. Also known as Reproduction.
4
Genetic Algorithms: Metaphors Cont…
BUT
5
Genetic Algorithms: A Simple Genetic Algorithm
parents
selection modification
modified
offspring
initiate & evaluation
population
evaluate evaluated off-spring
deleted
members
discard
GA: Example f(x) = x2
Actual count was generated using coin tosses.
The best strings get more copies, while the weak ones
just die off.
13
GA: Example f(x) = x2
14
GA: Example f(x) = x2
Before After
2000
1500
1000
500
0
Sum Avg Max
15
GA: Example f(x) = x2
Notes:
Initial population chosen by four repetitions of five coin tosses
where head = 1 and tail = 0
Objective
AFTER
Function
20
A Simple Example
21
Representation
CityList1 (3 5 7 2 1 6 4 8)
CityList2 (2 5 7 6 8 1 3 4)
22
Crossover
Child (5 8 7 2 1 6 3 4)
* *
Before: (5 8 7 2 1 6 3 4)
After: (5 8 6 2 1 7 3 4)
24
Genetic Algorithms: Why do they work?
GA offers a means of searching a broad search space.
31
Some GA Application Types
• Termination Criteria
• Performance, scalability
34
GA: Limitations & Weaknesses
35