Professional Documents
Culture Documents
Variation to GA
C a lc u lu s - b a s e d te c h n iq u e s G u id e d ra n d o m s e a rc h te c h n iq u e s E n u m e r a tiv e te c h n iq u e s
P a ra lle l S e q u e n tia l
Order
The number of fixed bits in a schema
discard
Population
population
Chromosomes could be:
Bit strings (0101 ... 1100)
Real numbers (43.2 -33.1 ... 0.0 89.2)
Permutations of element (E11 E3 E7 ... E1 E15)
Lists of rules (R1 R2 R3 ... R22 R23)
Program elements (genetic programming)
... any data structure ...
Reproduction
children
reproduction
parents
population
Crossover (recombination)
Mutation: Local Modification
Before: (1 0 1 1 0 1 1 0)
After: (0 1 1 0 0 1 1 0)
discard
Generational GA:
entire populations replaced with each
iteration
Steady-state GA:
a few members replaced each generation
Generational GA
All parents reproduce at the same time
Offspring generation replaces parent
generation
Current Parent (temporary) Offspring
: : :
Steady State GA
Fewer offspring generated and replace
parents or other members of population
Current population
Select
parents
Generate one
or more offspring
:
Offspring replace
population member
Population Initialization
sum = P(xi);
while sum < r do
i = i + 1; i.e. next chromosome
sum = sum + P(xi);
end
return xi as one of the selected parent;
repeat until all parents are selected
Drawback:
If the best chromosome fitness is 90% of all the roulette
wheel then the other chromosomes will have very few
chances to be selected
Rank Selection
Drawback:
This method can lead to slower convergence, because the best
chromosomes do not differ so much from other ones.
Steady-State Selection
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
Reproduction
Reproduction operators
Crossover
Mutation
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)
Crossover
Performed on two chromosomes as parents
The probability of parents being crossed
over is given by crossover rate
Crossover points are randomly selected
Exchanges genetic code between parents to
create two new chromosomes as offspring
Commonly used crossover
One-point crossover
Two-point crossover
Uniform crossover
One-Point Crossover
Only one crossover point is selected
for each parent
Crossover point
One-Point Crossover
Advantages
Simple to implement
Little disruption on evolved schemas
Weakness
Cannot combine many schemas
1 * * * 1 1
1 0 0 * 1 1
* 0 0 * * *
Two-Point Crossover
Two crossover points are selected
for each parent
Crossover Points
Two-Point Crossover
Advantage
More likely to combine schemas
(downside: more likely to disrupt
existing schemas)
1 * * * 1 1
1 0 0 * 1 1
* 0 0 * * *
Uniform Crossover
Every gene can be swapped between
the parents independent of the other
genes
The probability of swapping genes is
fixed at P0
No need to select crossover points
Parent 1 11011100 11001110 Offspring 1
11011100 11011000
The probability of a gene being mutated is
controlled by mutation rate M
The mutation rate per chromosome = M * L
Low mutation rate: low exploration power
High mutation rate: too disruptive
Implementation Variations
Varying rates of Crossover/Mutation
Start with low mutation rate and increase afterwards
Start with high crossover rate and decrease afterwards
Adaptive crossover and mutation rates
Adjust rates under certain conditions
Problem dependent variations
Random crossover for variable length GAs
Crossover points can be selected separately for
parents
Creates offspring with different lengths from their
parents
Parent 1 Offspring 1
Parent 2 Offspring 2
Other Genetic Operators
Inversion
412305
214305
• Transposition
412305
305412
A Simple Example
CityList1 (3 5 2 6 4)
CityList2 (2 5 6 3 4)
Initial Population for TSP
(3,4,5,6,2)
Create More Offspring
(3,4,5,6,2) (5,4,2,6,3)
Mutate
(3,4,5,6,2) (5,4,2,6,3)
Mutate
(3,4,5,6,2) (5,4,2,6,3)
Eliminate
(3,4,5,6,2) (5,4,2,6,3)
Tend to kill off the worst ones.
Integrate
Facts
Very robust but slow
In the limit, optimal