Genetic Algorithms - PowerPoint PPT Presentation

1 / 112
About This Presentation
Title:

Genetic Algorithms

Description:

roulette wheel technique. Assign to each individual a part of the roulette wheel ... Roulette wheel selection. Random initialization. x2 Example: Initial Population ... – PowerPoint PPT presentation

Number of Views:41
Avg rating:3.0/5.0
Slides: 113
Provided by: taiwe
Category:

less

Transcript and Presenter's Notes

Title: Genetic Algorithms


1
Genetic Algorithms
  • ???

2
Content
  • Evolutional Algorithms
  • Genetic Algorithms
  • Main Components of Genetic Algorithms
  • Encoding
  • Fitness Function
  • Recombination
  • Mutation
  • Population
  • Selection Models

3
Genetic Algorithms
  • Evolutional Algorithms

4
Biological Evolution
5
Motivated from Nature
  • Nature evolve strikingly complex organisms in
    response to complex environmental adaptation
    problems with apparent ease
  • Localize and extract principles from nature
  • Apply them to design algorithms

6
Darwinian Evolution 1 Survival of the Fittest
1809-1882
  • All environments have finite resources
  • can only support a limited number of individuals
  • Lifeforms have basic instinct/lifecycles geared
    towards reproduction
  • Therefore some kind of selection is inevitable
  • Those individuals that compete for the resources
    most effectively have increased chance of
    reproduction
  • Note fitness in natural evolution is a derived,
    secondary measure, i.e., we (humans) assign a
    high fitness to individuals with many offspring

7
Darwinian Evolution 2 Diversity Drives Change
1809-1882
  • Phenotypic traits
  • Behaviour/physical differences that affect
    response to environment
  • Partly determined by inheritance, partly by
    factors during development
  • Unique to each individual, partly as a result of
    random changes
  • If phenotypic traits
  • Lead to higher chances of reproduction
  • Can be inherited
  • then they will tend to increase in subsequent
    generations and, hence, lead to new combinations
    of traits

8
Darwinian EvolutionSummary
1809-1882
  • Population consists of diverse set of individuals
  • Combinations of traits that are better adapted
    tend to increase representation in population
  • Individuals are units of selection
  • Variations occur through random changes yielding
    constant source of diversity, coupled with
    selection means that
  • Population is the unit of evolution
  • Note the absence of guiding force ? w/o God

9
General Scheme ofEvolutional Algorithms (EAs)
Parents
Population
Offspring
10
General Scheme ofEvolutional Algorithms (EAs)
  • A set of individuals corresponding to candidate
    solutions to a problem.
  • Each individual has a fitness value.
  • How to represent the individuals?
  • How to define the fitness function?

Parents
Population
Offspring
11
General Scheme ofEvolutional Algorithms (EAs)
Better individuals get higher probability to
become the parents of the next generation.
Parents
Population
Variation operators
Offspring
12
General Scheme ofEvolutional Algorithms (EAs)
Parents
Replace some old individuals with newly born ones.
Population
Offspring
13
Pseudo-Code for Typical EA
14
Typical Behavior of an EA
Early phase quasi-random population distribution
Mid-phase population arranged around/on hills
Late phase population concentrated on high hills
15
Components of EAs
  • Representation ? definition of individuals
  • Evaluation function ? fitness function
  • Population
  • Parent selection mechanism
  • Variation operators
  • Recombination
  • Mutation
  • Survivor selection mechanism ? replacement
  • Termination

16
Different Types of EAs
  • Historically, different flavours of EAs have been
    associated with different representations
  • Binary strings Genetic Algorithms
  • Real-valued vectors Evolution Strategies
  • Finite state Machines Evolutionary Programming
  • LISP trees Genetic Programming

17
Different Types of EAs
  • Binary strings Genetic Algorithms
  • Real-valued vectors Evolution Strategies
  • Finite state Machines Evolutionary Programming
  • LISP trees Genetic Programming
  • Historically, different flavours of EAs have been
    associated with different representations

Genetic Algorithms
Evolution Strategies
18
Different Types of EAs
  • Binary strings Genetic Algorithms
  • Real-valued vectors Evolution Strategies
  • Finite state Machines Evolutionary Programming
  • LISP trees Genetic Programming
  • Historically, different flavours of EAs have been
    associated with different representations

Evolutionary Programming
Genetic Programming
19
Genetic Algorithms
  • Genetic Algorithms

20
The Genetic Algorithm
  • Directed search algorithms based on the mechanics
    of biological evolution
  • Developed by John Holland, University of Michigan
    (1970s)
  • To understand the adaptive processes of natural
    systems
  • To design artificial systems software that
    retains the robustness of natural systems

21
Genetic Algorithms
  • Hollands original GA is now known as the simple
    genetic algorithm (SGA)
  • Other GAs use different
  • Representations
  • Mutations
  • Crossovers
  • Selection mechanisms

22
SGA Technical Summary Tableau
Representation Binary strings
Recombination N-point or uniform
Mutation Bitwise bit-flipping with fixed probability
Parent selection Fitness-Proportionate
Survivor selection All children replace parents
Speciality Emphasis on crossover
23
Representation
Genotype space
Phenotype space
10010001
10010010
010001001
011101001
24
SGA Evolution Cycle
  • Select parents for the mating pool
  • (size of mating pool population size)
  • Shuffle the mating pool
  • For each consecutive pair apply crossover with
    probability pc , otherwise copy parents
  • For each offspring apply mutation (bit-flip with
    probability pm independently for each bit)
  • Replace the whole population with the resulting
    offspring

25
SGA Operators 1-Point Crossover
  • Choose a random point on the two parents
  • Split parents at this crossover point
  • Create children by exchanging tails
  • pc typically in range (0.6, 0.9)

26
SGA Operators Mutation
  • Alter each gene independently with a probability
    pm
  • pm is called the mutation rate
  • Typically between 1/pop_size and
    1/chromosome_length

27
SGA Operators Selection
  • Main idea better individuals get higher chance
  • Chances proportional to fitness
  • Implementation ?
  • roulette wheel technique
  • Assign to each individual a part of the roulette
    wheel
  • Spin the wheel n times to select n individuals

28
An Example after Goldberg 89
  • Simple problem max x2 over 0,1,,31
  • GA approach
  • Representation binary code, e.g. 01101 ? 13
  • Population size 4
  • 1-point xover, bitwise mutation
  • Roulette wheel selection
  • Random initialization

29
x2 Example Initial Population
30
x2 Example Selection
0 1 1 0 1
1 1 0 0 0
1 1 0 0 0
1 0 0 1 1
31
x2 Example Selection
32
x2 Example Crossover
33
x2 Example Mutation
34
Exercise The OneMax Problem
  • The OneMax Problem (or BitCounting) is a simple
    problem consisting in maximizing the number of
    ones of a bitstring.
  • Formally, this problem can be described as
    finding a string x (x1, x2, , xn) , with
    xi?0, 1 , that maximizes the following equation

35
Genetic Algorithms
  • Main Components of GAs

36
Nature-to-Computer Mapping
Nature Computer
Individual Solution to a problem
Population Set of solutions
Fitness Quality of a solution
Chromosome Encoding for a solution
Gene Part of the encoding of a solution
Crossover Search Operator (Local)
Mutation Search Operator (Global)
Nature Selection Reuse of good (sub-)solutions
37
Main Components of GAs
  • Encoding principles (gene,
    chromosome)
  • Initialization procedure
    (creation)
  • Selection of parents
    (reproduction)
  • Genetic operators (mutation, recombination)
  • Fitness function
    (environment)
  • Termination condition

38
Encoding
  • The process of representing the solution in the
    form of a string that conveys the necessary
    information.
  • Just as in a chromosome, each gene controls a
    particular characteristic of the individual,
    similarly, each bit in the string represents a
    characteristic of the solution.
  • Hence, the encoding mechanism depends on the
    nature of the problem variables. 

39
Commonly Used Encoding Schemes
  • Binary Encoding
  • most common and simplest one
  • Permutation Encoding
  • used in ordering problems, e.g., TSP
  • Direct Value Encoding
  • used in problems with complicated values
  • Tree Encoding
  • used mainly for evolving programs or expressions,
    e.g., genetic programming

40
Binary Encoding
  • Binary Encoding
  • Permutation Encoding
  • Direct Value Encoding
  • Tree Encoding
  • Most common method of encoding.
  • Chromosomes are strings of 1s and 0s and each
    position in the chromosome represents a
    particular characteristic of the problem.

41
Permutation Encoding
  • Binary Encoding
  • Permutation Encoding
  • Direct Value Encoding
  • Tree Encoding
  • Useful in ordering problems such as the Traveling
    Salesman Problem (TSP).
  • Every chromosome is a string of numbers, each of
    which represents a city to be visited.

42
Direct Value Encoding
  • Binary Encoding
  • Permutation Encoding
  • Direct Value Encoding
  • Tree Encoding
  • Used in problems where complicated values, such
    as real numbers, are used and where binary
    encoding would not suffice.
  • Good for some problems, but often necessary to
    develop some specific crossover and mutation
    techniques for these chromosomes.

43
Tree Encoding
  • Binary Encoding
  • Permutation Encoding
  • Direct Value Encoding
  • Tree Encoding
  • Tree encoding is used mainly for evolving
    programs or expressions for genetic programming.
  • In tree encoding every chromosome is a tree of
    some objects, such as functions or commands in
    programming language.

44
More on Binary Encoding ?Gray coding of integers

Integer Binary Gray
0 000 000
1 001 001
2 010 011
3 011 010
4 100 110
5 101 111
6 110 101
7 111 100
 
45
More on Binary Encoding ?Gray coding of integers
  • Gray coding is a mapping that attempts to
    improve causality, i.e., small changes in the
    genotype cause small changes in the phenotype,
    unlike binary coding.
  • Smoother genotype-phenotype mapping makes life
    easier for the GA.
  • Nowadays it is generally accepted that it is
    better to encode numerical variables directly as
    integers and floating point variables

46
More on Binary Encoding ?Interval Representation
  • z ? x, y ? ? represented by a1,,aL ? 0,1L
  • x, y ? 0,1L must be invertible
  • ? 0,1L ? x, y defines the representation

47
Crossover
  • It is the process in which two chromosomes
    (strings) combine their genetic material (bits)
    to produce a new offspring which possesses both
    their characteristics.
  • Two strings are picked from the mating pool at
    random to cross over.
  • The method chosen depends on the Encoding Method.

48
Crossover
  • It is the process in which two chromosomes
    (strings) combine their genetic material (bits)
    to produce a new offspring which possesses both
    their characteristics.
  • Two strings are picked from the mating pool at
    random to cross over.
  • The method chosen depends on the Encoding Method.

49
Crossover Operators
  • Binary Encoding
  • 1-Point Crossover
  • 2-Point Crossover
  • N-Point Crossover
  • Uniform Crossover
  • Permutation Encoding

50
Binary Encoding ? 1-Point Crossover
Chromosome1 11011 00100110110
Chromosome 2 11011 11000011110
Offspring 1 11011 11000011110
Offspring 2 11011 00100110110
51
Binary Encoding ? 2-Point Crossover
Chromosome1 11011 00100 110110
Chromosome 2 10101 11000 011110
Offspring 1 10101 00100 011110
Offspring 2 11011 11000 110110
52
Binary Encoding ? N-Point Crossover
  • Choose N random crossover points
  • Split along those points
  • Glue parts, alternating between parents

53
Binary Encoding ? Uniform Crossover
  • Each gene (bit) is selected randomly from one of
    the corresponding genes of the parent chromosomes.

Chromosome1 11000101 01011000 01101010
Chromosome 2 00100100 10111001 01111000
Offspring 1 01000101 01111000 01111010
Offspring 2 10100100 10011001 01101000
54
Permutation Encoding ? Order Crossover (OX)
  • Builds offspring by choosing a sub-sequence of a
    tour from one parent and preserving the relative
    order of cities from the other parent and
    feasibility

1 2 3 4 5 6 7 8 9
4 5 2 1 8 7 6 9 3
55
Permutation Encoding ? Order Crossover (OX)
  • Builds offspring by choosing a sub-sequence of a
    tour from one parent and preserving the relative
    order of cities from the other parent and
    feasibility

1 2 3 4 5 6 7 8 9
?
?
?
?
4 5 2 1 8 7 6 9 3
56
Permutation Encoding ? Order Crossover (OX)
  • Builds offspring by choosing a sub-sequence of a
    tour from one parent and preserving the relative
    order of cities from the other parent and
    feasibility

1 2 3 4 5 6 7 8 9
2
1
8
9
3
?
?
?
?
4 5 2 1 8 7 6 9 3
57
Permutation Encoding ? Order Crossover (OX)
  • Builds offspring by choosing a sub-sequence of a
    tour from one parent and preserving the relative
    order of cities from the other parent and
    feasibility

Chromosome1 1 2 3 4 5 6 7 8 9
Chromosome 2 4 5 2 1 8 7 6 9 3
Offspring 1 3 4 5 1 8 7 6 9 2
Offspring 2 2 1 8 4 5 6 7 9 3
1 2 3 4 5 6 7 8 9
2
1
8
9
3
?
?
?
?
4 5 2 1 8 7 6 9 3
58
Permutation Encoding ? Partially Mapped
Crossover (PMX)
59
Permutation Encoding ? Partially Mapped
Crossover (PMX)
Step 1
60
Permutation Encoding ? Partially Mapped
Crossover (PMX)
Step 2
9
3
1
61
Permutation Encoding ? Partially Mapped
Crossover (PMX)
Step 3
9
3
1
8
2
62
Permutation Encoding ? Partially Mapped
Crossover (PMX)
Step 1
63
Permutation Encoding ? Partially Mapped
Crossover (PMX)
Step 2
1
3
9
64
Permutation Encoding ? Partially Mapped
Crossover (PMX)
Step 3
1
3
9
4
7
65
Permutation Encoding ? Partially Mapped
Crossover (PMX)
Chromosome1 1 2 3 4 5 6 7 8 9
Chromosome 2 9 3 7 8 2 6 5 1 4
Offspring 1 9 3 2 4 5 6 7 1 8
Offspring 2 1 7 3 8 2 6 5 4 9
66
Permutation Encoding ? Cycle Crossover
67
Permutation Encoding ? Cycle Crossover
Step 1 identify cycles
4
5
6
7
9
1
2
8
3
4
9
1
8
8
2
6
5
9
7
4
1
3
8
9
4
1
68
Permutation Encoding ? Cycle Crossover
Step 1 identify cycles
4
5
6
7
9
1
2
8
3
4
9
1
8
5
7
2
3
8
2
6
5
9
7
4
1
3
8
9
4
1
2
5
7
3
69
Permutation Encoding ? Cycle Crossover
Step 1 identify cycles
4
5
6
7
9
1
2
8
3
4
9
1
8
5
7
2
3
6
8
2
6
5
9
7
4
1
3
8
9
4
1
2
5
7
3
6
70
Permutation Encoding ? Cycle Crossover
Step 1 identify cycles
Step 2 copy alternate cycles into offspring
4
5
6
7
9
1
2
8
3
4
9
1
8
5
7
2
3
6
4
9
1
8
2
5
7
3
6
9
7
4
3
8
2
6
5
1
8
9
4
1
2
5
7
3
6
8
9
4
1
5
7
2
3
6
71
Permutation Encoding ? Edge Recombination
Step 1 Construct edge table
72
Permutation Encoding ? Edge Recombination
1
Step 1 Construct edge table
Step 2 Randomly choose start node
73
Permutation Encoding ? Edge Recombination
1
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
74
Permutation Encoding ? Edge Recombination
1
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
75
Permutation Encoding ? Edge Recombination
1
5
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
76
Permutation Encoding ? Edge Recombination
1
5
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
Step 5 Loop to Step 3 until done
77
Permutation Encoding ? Edge Recombination
1
5
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
Step 5 Loop to Step 3 until done
78
Permutation Encoding ? Edge Recombination
1
5
6
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
Step 5 Loop to Step 3 until done
79
Permutation Encoding ? Edge Recombination
1
5
6
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
Step 5 Loop to Step 3 until done
80
Permutation Encoding ? Edge Recombination
1
5
6
2
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
Step 5 Loop to Step 3 until done
81
Permutation Encoding ? Edge Recombination
1
5
6
2
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
Step 5 Loop to Step 3 until done
82
Permutation Encoding ? Edge Recombination
1
5
6
2
8
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
Step 5 Loop to Step 3 until done
83
Permutation Encoding ? Edge Recombination
1
5
6
2
8
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
Step 5 Loop to Step 3 until done
84
Permutation Encoding ? Edge Recombination
1
5
6
2
8
7
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
Step 5 Loop to Step 3 until done
85
Permutation Encoding ? Edge Recombination
1
5
6
2
8
7
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
Step 5 Loop to Step 3 until done
86
Permutation Encoding ? Edge Recombination
1
5
6
2
8
7
3
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
Step 5 Loop to Step 3 until done
87
Permutation Encoding ? Edge Recombination
1
5
6
2
8
7
3
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
Step 5 Loop to Step 3 until done
88
Permutation Encoding ? Edge Recombination
1
5
6
2
8
7
3
9
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
Step 5 Loop to Step 3 until done
89
Permutation Encoding ? Edge Recombination
1
5
6
2
8
7
3
9
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
Step 5 Loop to Step 3 until done
90
Permutation Encoding ? Edge Recombination
1
5
6
2
8
7
3
9
4
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
Step 5 Loop to Step 3 until done
91
Permutation Encoding ? Edge Recombination
1
5
6
2
8
7
3
9
4
Step 1 Construct edge table
Step 2 Randomly choose start node
Step 3 Remove visited nodes
Pick common edge if existent Pick one with the
shortest list Ties are split at random
Step 4
Step 5 Loop to Step 3 until done
92
Crossover for Real Valued GAs
  • Discrete
  • Each allele value in offspring z comes from one
    of its parents (x, y) with equal probability zi
    xi or yi
  • Could use n-point or uniform
  • Intermediate
  • exploits idea of creating children between
    parents (hence a.k.a. arithmetic recombination)
  • zi ? xi (1 ? ?) yi where ? 0 ? ? ? 1.
  • The parameter ? can be
  • constant uniform arithmetical crossover
  • variable (e.g. depend on the age of the
    population)
  • picked at random every time

93
Single Arithmetic Crossover
  • Parents ?x1,, xn ? and ?y1,, yn?
  • Pick a single gene (k) at random
  • child1 is
  • reverse for other child. e.g. with ? 0.5

94
Simple Arithmetic Crossover
  • Parents ?x1,, xn ? and ?y1,, yn?
  • Pick random gene (k) after this point mix values
  • child1 is
  • reverse for other child. e.g. with ? 0.5

95
Whole Arithmetic Crossover
  • Parents ?x1,, xn ? and ?y1,, yn?
  • child1 is
  • reverse for other child. e.g. with ? 0.5

96
More on Crossover
  • Crossover between 2 good solutions MAY NOT ALWAYS
    yield a better or as good a solution.
  • Since parents are good, probability of the child
    being good is high.
  • If offspring is not good (poor solution), it will
    be removed in the next iteration during
    Selection.

97
Crossover or Mutation
  • Decade long debate
  • Which one is better / necessary /
    main-background?
  • Answer (at least, rather wide agreement)
  • it depends on the problem, but
  • in general, it is good to have both
  • both have another role
  • mutation-only-EA is possible, xover-only-EA would
    not work in general

98
Crossover or Mutation
  • Exploration
  • Discovering promising areas in the search space,
    i.e. gaining information on the problem
  • Crossover is usually explorative, it makes a
    big jump to an area somewhere in between two
    (parent) areas
  • Exploitation
  • Optimizing within a promising area, i.e. using
    information
  • Mutation is usually exploitative, it creates
    random small diversions, thereby staying near (in
    the area of ) the parent

99
Crossover or Mutation
  • Crossover can combine information from two
    parents
  • Mutation can introduce new information (alleles)
  • Crossover does not change the allele frequencies
    of the population
  • To hit the optimum you often need a lucky
    mutation

100
Mutation Operators
  • Binary Encoding
  • Value Encoding
  • Integers
  • Floating points
  • Permutation Encoding

101
Mutation Operator for Binary Encoding
  • For chromosomes using Binary Encoding, randomly
    selected bits are inverted.

Offspring 11011 00100 110110
Mutated Offspring 11010 00100 100110
NOTE The number of bits to be inverted depends
on the Mutation Probability.
102
Mutation Operator for Value Encoding
  • Creep ?
  • Adding small offset to randomly chosen allele(s)
  • Random choice ?
  • Assign random value to randomly chosen allele(s)

Offspring 9 15 7 0 32 50 70
Mutated Offspring 9 17 7 0 80 50 70
103
Mutation Operators for Permutation Encoding
  • Insert Mutation
  • Swap Mutation
  • Inversion mutation

104
Elitism
Elitism is a method which copies the best
chromosome to the new offspring population before
crossover and mutation.
  • When creating a new population by crossover or
    mutation the best chromosome might be lost.
  • Forces GAs to retain some number of the best
    individuals at each generation.
  • Has been found that elitism significantly
    improves performance.

105
Population Models
  • SGA uses a Generational model
  • each individual survives for exactly one
    generation
  • the entire set of parents is replaced by the
    offspring
  • At the other end of the scale are Steady-State
    models
  • one offspring is generated per generation,
  • one member of population replaced,
  • Generation Gap
  • the proportion of the population replaced
  • 1.0 for GGA, 1/pop_size for SSGA

106
Fitness Function
  • A fitness function quantifies the optimality of a
    solution (chromosome) so that that particular
    solution may be ranked against all the other
    solutions.
  • A fitness value is assigned to each solution
    depending on how close it actually is to solving
    the problem.
  • Ideal fitness function correlates closely to goal
    quickly computable.
  • Example In TSP, f(x) is sum of distances
    between the cities in solution. The lesser the
    value, the fitter the solution is.

107
Selection Models
  • Selection can occur in two places
  • Parent selection ? Selection from current
    generation to take part in mating
  • Survivor selection ? Selection from parents
    offspring to go into next generation
  • Distinction between selection
  • operators define selection probabilities
  • algorithms define how probabilities are
    implemented

108
Parent Selection
  • Fitness-Proportionate Selection
  • Roulette wheel algorithm
  • Bakers SUS algorithm
  • Rank-Based Selection
  • Linear Ranking
  • Exponential Ranking
  • Tournament Selection

109
Fitness-Proportionate Selection
  • Roulette wheel algorithm
  • Given a probability distribution, spin a 1-armed
    wheel n times to make n selections
  • Bakers SUS algorithm
  • Stochastic Universal Sampling
  • n evenly spaced arms on wheel and spin once

110
Fitness-Proportionate Selection
  • Problems
  • One highly fit member can rapidly take over if
    rest of population is much less fit Premature
    Convergence
  • At end of runs when fitnesses are similar, lose
    selection pressure
  • Highly susceptible to function transposition
  • Scaling can fix last two problems
  • Windowing f(i) f(i) - ? t
  • where ? is worst fitness in this (last n)
    generations
  • Sigma Scaling f(i) max f(i) (? f ? - c
    ?f ), 0.0
  • where c is a constant, usually 2.0

111
Function Transposition for FPS
112
Rank-Based Selection
  • Attempt to remove problems of FPS by basing
    selection probabilities on relative rather than
    absolute fitness
  • Rank population according to fitness and then
    base selection probabilities on rank where
    fittest has rank ? and worst rank 1

113
Rank-Based Selection
  • Linear Ranking
  • Exponential Ranking

114
Tournament Selection
115
Tournament Selection
  • All methods above rely on global population
    statistics
  • Could be a bottleneck esp. on parallel machines
  • Relies on presence of external fitness function
    which might not exist e.g., evolving game
    players
  • Informal Procedure
  • Pick k members at random then select the best of
    these
  • Repeat to select more individuals
  • k 2 binary tournament selection

116
Tournament Selection
117
Some Demonstrations
  • http//cs.felk.cvut.cz/xobitko/ga/
  • http//www.heatonresearch.com/articles/65/page1.ht
    ml
  • http//homepage.sunrise.ch/homepage/pglaus/gentore
    .htmApplet
  • http//www.ads.tuwien.ac.at/raidl/tspga/TSPGA.html
  • http//www.see.ed.ac.uk/rjt/ga.html?http//oldeee
    .see.ed.ac.uk/rjt/ga.html

118
References
  • A Survey of Genetic Algorithm
  • Genetic Algorithms A Survey
  • A Genetic Algorithm Tutorial
Write a Comment
User Comments (0)
About PowerShow.com