Genetic Operators and Selection - PowerPoint PPT Presentation

1 / 35
About This Presentation
Title:

Genetic Operators and Selection

Description:

... point crossover has positional/defining length bias. Schemas with longer defining length are more likely to be ... Random crossover for variable length GAs ... – PowerPoint PPT presentation

Number of Views:76
Avg rating:3.0/5.0
Slides: 36
Provided by: han105
Category:

less

Transcript and Presenter's Notes

Title: Genetic Operators and Selection


1
Genetic Operators and Selection
  • Han Yu
  • 01/20/2005

2
Genetic Operators
  • Explore new regions of search space while
    retaining current information
  • Commonly used genetic operators
  • Crossover
  • Mutation

3
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

4
One-Point Crossover
  • Only one crossover point is selected for each
    parent

5
One-Point Crossover
  • Advantages
  • Simple to implement
  • Little disruption on evolved schemas
  • Weakness
  • Cannot combine many schemas
  • 1 1 1
  • 0 0

1 0 0 1 1
6
Two-Point Crossover
  • Two crossover points are selected for each parent

11011100 01100110
11000100 01111110
Parent 1
Offspring 1
Parent 2
Offspring 2
Crossover Points
7
Two-Point Crossover
  • Advantage
  • More likely to combine schemas (downside more
    likely to disrupt existing schemas)
  • 1 1 1
  • 0 0

1 0 0 1 1
8
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

11011100 01100110
11001110 01110100
Parent 1
Offspring 1
Parent 2
Offspring 2
9
Positional/Defining Length Bias
  • Defining length
  • The distance of two remotest genes defined in a
    schema
  • Formation and disruption of a schema depends on
    its defining length or its locations in the
    chromosome
  • One-point crossover has positional/defining
    length bias
  • Schemas with longer defining length are more
    likely to be disrupted
  • Uniform crossover has no positional/defining
    length bias
  • Each pair of genes has the same probability of
    being swapped independent of its location

Defining length 5
1 0 0 1 1
10
Distribution Bias
  • The number of genes to be swapped may be
    distributed around a particular value instead of
    uniformly from 1 to L-1 (L individual length)
  • One-point crossover has no distribution bias
  • Crossover point is selected randomly within the
    chromosome
  • Uniform crossover has high distribution bias
  • The number of genes to be swapped depends on P0

11
Hitchhiking
  • A result of inaccuracy in preserving and
    combining schemas during crossover
  • Loci adjacent to good schemas are likely to be
    preserved as well

Hitchhikers
Chromosome
Very good solution
12
Mutation
  • Involves only one chromosome
  • Applies to each gene individually
  • The value of a mutated gene is flipped
  • 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

11011000
11011100
13
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
  • Rates are encoded in the chromosome
  • Adjust rates under certain conditions, e.g.,
    Hypermutation

14
Implementation Variations
  • Problem dependent variations
  • Example, in TSP, solution encoded as a sequence
    of integers representing the cities

PMX Partially Mapped Crossover for TSP Route
A 9 8 4 5 6 7 1 3 2 Route B 8 7 1 2 3 9 5
4 6 Swap bits corresponding to the ones in the
middle segment Route A 7 _ _ 2 3 9 _ 6 5
Route B _ 9 _ 5 6 7 2 _ 3 Fill in the
rest Route A 7 8 4 2 3 9 1 6 5 Route B 8
9 1 5 6 7 2 4 3
15
Implementation Variations
  • Random crossover for variable length GAs
  • Crossover points can be selected separately for
    parents
  • Creates offspring with different lengths from
    their parents

Offspring 1
Parent 1
Parent 2
Offspring 2
16
Other Genetic Operators
  • Inversion

4 1 2 3 0 5
2 1 4 3 0 5
  • Transposition

4 1 2 3 0 5
3 0 5 4 1 2
17
Selection
  • Choose the individuals to create the next
    generation of population
  • Typically fitness-based
  • High-fitness individuals have more chances to be
    selected
  • Direct the search toward promising regions of the
    search space

.
.
.
.
.
.
Search space
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Promising Regions
18
Fitness Proportion Selection
  • Holland, 1975
  • Expected number of times an individual is
    selected to reproduce, E(si), is proportional to
    its fitness relative fi to the average population
    fitness
  • Actual number of offspring may be far from
    expected number

19
Fitness Proportion Selection
f0 6, E0 6/5 1.2 P0 6/20 0.3 f1
2, E1 2/5 0.4 P1 2/20 0.1 f2 8, E2
8/5 1.6 P2 8/20 0.4 f3 4, E3 4/5
0.8 P4 4/20 0.2 fsum 20 favg 5
19 0
Roulette wheel selection
20
Stochastic Universal Sampling
  • Baker 1987
  • Another fitness proportional selection method
  • Decrease statistical sampling error
  • Randomly select an initial pointer, then sample
    at N equally spaced locations on the roulette
    wheel (where N population size)

21
Stochastic Universal Sampling
19 0
f0 6, E0 6/5 1.2 P0 6/20 0.3 f1
2, E1 2/5 0.4 P1 2/20 0.1 f2 8, E2
8/5 1.6 P2 8/20 0.4 f3 4, E3 4/5
0.8 P4 4/20 0.2 fsum 20 favg 5
22
Stochastic Universal Sampling
19 0
f0 6, E0 6/5 1.2 P0 6/20 0.3 f1
2, E1 2/5 0.4 P1 2/20 0.1 f2 8, E2
8/5 1.6 P2 8/20 0.4 f3 4, E3 4/5
0.8 P4 4/20 0.2 fsum 20 favg 5
23
Stochastic Universal Sampling
19 0
f0 6, E0 6/5 1.2 P0 6/20 0.3 f1
2, E1 2/5 0.4 P1 2/20 0.1 f2 8, E2
8/5 1.6 P2 8/20 0.4 f3 4, E3 4/5
0.8 P4 4/20 0.2 fsum 20 favg 5
24
Problem with Proportion Selection Methods
  • Depends on the variance of fitness in a
    population
  • Early in search, fitness variance is large,
    results in strong selection pressure and
    premature population convergence
  • Later in search, fitness variance is small,
    results in close to random selection

f0 56, E0 2.24 f1 12, E1 0.48 f2 28, E2
1.12 f3 4, E3 0.16
f0 60, E0 0.87 f1 72, E1 1.05 f2 68, E2
0.99 f3 75, E3 1.09
  • EARLY IN RUN LATE IN RUN

25
Sigma Scaling
  • Combine with fitness proportional selection
  • Try to maintain constant selection pressure
  • Define a maximum and minimum number of expected
    offspring and scale with that range

E.g. FP FP w/ SS 0, 2 f0 1, E0 4 E0
2 f1 0, E1 0 E1 0.67 f2 0, E2 0 E2
0.67 f3 0, E3 0 E3 0.67
26
Rank Selection
  • Baker, 1985
  • Rank all individuals according to fitness
  • Expected number of offspring based on rank
    instead of fitness
  • Attempts to solve the problem of fitness
    proportion selection

27
Rank Selection
  • Eases differences in fitness early in search

Fitness proportional Rank f0 56, E0 2.24 R0
4, E0 1.6 f1 28, E1 1.12 R1 3, E1
1.2 f2 12, E2 0.48 R2 2, E2 0.8 f3
4, E3 0.16 R3 1, E3 0.4
28
Rank Selection
  • Enhances difference in fitness later in search

Fitness proportional Rank f0 75, E0 1.09 R0
4, E0 1.6 f1 72, E1 1.05 R1 3, E1
1.2 f2 68, E2 0.99 R2 2, E2 0.8 f3
60, E3 0.87 R3 1, E3 0.4
29
Tournament Selection
  • Procedure
  • Each time randomly select two individuals
  • Generate a random number, r, 0 r 1
  • Select the better of the two individuals, if r lt
    k (k is a parameter)
  • Select the worse of the two, otherwise
  • Computationally efficient
  • No need to sort all individuals
  • No need to calculate expected number of offspring
  • Easy to parallelize
  • Selection pressure controlled by tournament size
    and k

30
Boltzmann Selection
  • Use a continuously varying selection pressure
  • Similar to the process of simulated annealing
  • Early in run high temperature low selection
    pressure
  • Later in run low temperature high selection
    pressure

31
Elitism
  • De Jong, 1975
  • Force GA to retain some of top individuals in
    each generation
  • No genetic operators allowed to performed on
    selected top individuals
  • The number or percent retained is the generation
    gap
  • May be combined with other selection methods

32
Generational GA
  • All parents reproduce at the same time
  • Offspring generation replaces parent generation

Current
Offspring
Parent (temporary)

33
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
34
Infant Mortality
  • More offspring generated but few survive

M offspring where M gtgt N

N offspring survive to become next generation

35
Evolutionary Strategies
  • 1 1 Selection
  • Population size 1, 1 offspring
  • Best survives
  • ? 1 selection
  • Population size ?, 1 offspring
  • Offspring replaces worst individual
  • ?, ? selection, ? gt ? 1
  • Population size ?, generate ? offspring.
  • Best ? offspring replace parents (not elitist).
  • ? ? selection, ? gt ? 1
  • Population size ?, generate ? offspring.
  • Offspring selected from among best of ? and ?
Write a Comment
User Comments (0)
About PowerShow.com