An overview of Genetic Algorithm By David Beasley, David R. Bull and Ralph R. Martin 090070T – T.P.K. Dahanayakage 090150N – K.M.T.V.
May 11, 2015
An overview of Genetic AlgorithmBy David Beasley, David R. Bull and Ralph R. Martin
090070T – T.P.K. Dahanayakage090150N – K.M.T.V. Ganegedara
Introduction
Population Evolves Natural Selection Survival of the fittest
Applications? Computer, Bridges, Garment, etc.
Analogy
Think about successive generations
Analogy (ctd)
Evolve according to environment
Super-fit
Basic Concept
Set of solutions for a problem Each solution – fitness score
Reproduce a new set of solutions by “Cross-breeding” Most-fit: get selected Least-fit: not selected – die out
Result? Offsprings with characteristics from most-fit
What just happened?
Good characteristics of a generation was spread in a successive generation
Most promising areas of solution space are searched
Algorithm
BEGINGenerate populationCalculate fitness for each individualWHILE NOT CONVERGED DOBEGIN
FOR population_size/2 DOBEGIN
Select 2 parents for matingCombine and produce an offspringCalculate the fitness for the new individualInsert the offspring to the new generation
END
END
END
Lesson on Biology
Chromosome Organized collection of coiled DNA
DNA
Fitness function
Must represent the “fitness to the environment” or “ability” of a chromosome’s
Issues of fitness range Premature convergence Slow finishing
Reproduction
Selection of parents Random Favors the fittest
Crossover Single point crossover
Cut 2 chromosomes at a random point Swap over tails to create 2 new chromosomes
Reproduction (ctd)
Crossover is not the only case! 0.6 - 1.0 chance Otherwise replicate the parent
Mutation Alter the genes of crossover-ed with a
small probability
Example
0 1 0 1 0 0 1 1 0 0 1 0 1 1 0 0 1 0 0 1
0 1 0 1 0 0 1 0 0 1 1 0 1 1 0 0 1 1 0 0
0 1 0 1 0 0 1 0 0 1
0 1 0 1 1 0 1 0 0 1
Before mutation:
After mutation:
Convergence
Fitness of the BEST and AVERAGE moves to a global optimum
Gene is said to have converged 95% of the population has converged
Population is said to have converged All the genes have converged
Other techniques
“Schemata” and “Scheme”
Definition of Schema Pattern of gene String comprise {0,1,#}
Ex: Chromosome 0110 contains following “Schemata” #110, #1#0, 01##, etc.
A chromosome is said to contain a schema if it matches a particular schemata
Order of schema – Number of non-# symbols
Length of schema – Distance between outer most non-# symbols.
Ex: #1#0
Schema Theorem
Individuals in a population are given reproductive trials
Number of trials α Fitness of an individual Higher fitness value -> Good schemata
Good Schemata receives exponentially increasing number of trials in successive generations!
Building Block Hypothesis
Definition Schemata short in length and tend to
improve performance when incorporated to an individual
Properties of a successful coding scheme Related genes close together Little interaction between genes
Exploration and Exploitation
Exploration Exploring unknown areas
Exploitation Utilizing already-learnt to find better solutions
Tradeoff Ex: Random search and Hill climbing
GA combines both in an optimal way!
Practical Aspects of GA
Parent selection
Individuals are copied to a “mating pool” Highly fit – more copies Less fit – lesser copies
How to determine number of copies? Explicit fitness remapping Implicit fitness remapping
Explicit fitness remapping
Individual’s fitnessAverage fitness of population
Issue: Number of copies should be an integer
Solution: Fitness scaling Fitness windowing
Implicit fitness remapping
Tournament selection 2 random individuals Copy the one with higher fitness value
to the mating pool Continue until the pool is full
Generation gaps and steady-state replacement
Generation gap Proportion of individuals in a population replaced
in each generation
Steady-state replacement Only few individuals are replaced in a generation Considerations:
Parent selection – Random, Fitness Replacement – Random, Inverse fitness
Thank you
Q & A Session