evolutionary algorithms · evolutionary algorithms is not just genetic algorithms. ea tries to...
TRANSCRIPT
1Thomas Stidsen
DTU-Management / Operations Research
Evolutionary Algorithms– simulated evolution
Thomas Stidsen
DTU-Management
Technical University of Denmark
2Thomas Stidsen
DTU-Management / Operations Research
Outline1Heuristics and Meta-heuristics
General information on EA’s
The standard EA
EA for Facility Location
EA disected
Different EA types
Advanced topics
Why and why not use EA
Parameters
3Thomas Stidsen
DTU-Management / Operations Research
Specialised heuristics vs. metaheuristicsThis part of the course is termed: Metaheuristics,what is a metaheuristic ?
A general skeleton to an algorithm applicable toa wide range of optimisation problems.
A meta-heuristic often “evolve” into a morespecialised heuristic when it is specialised to aparticular problem
Approximation algorithms and very largeneighbourhood searches are very specialisedtechniques which have a more limited scope
4Thomas Stidsen
DTU-Management / Operations Research
Specialised heuristics vs. metaheuristicsEfficiency
Specialisation
Heuristics
Meta−heuristics
5Thomas Stidsen
DTU-Management / Operations Research
General InformationEvolutionary Algorithms is not just GeneticAlgorithms.
EA tries to mimic the Darvinian evolution
EA is significantly different from SA and TABUand thus complements these.
EA is difficult to use:Many parametersParameters are hidden and dependsnon-linearly on each other.
6Thomas Stidsen
DTU-Management / Operations Research
HistoryInvented independently three different places, inthe 60’ies:
Michigan: John Holland, Genetic Algorithms.Germany: Schwefel and Rechenberg,Evolution Strategies.California: Edward Fogel: EvolutionaryProgramming.
First dedicated conference: ICGA-85.
Popularised by D. Goldberg, 1989 (GeneticAlgorithms).
7Thomas Stidsen
DTU-Management / Operations Research
The Standard EA
Initialise the entire populationrepeat
Select promising individuals from current populationReproduce selected individualsMutate reproduced individualsEvaluate created individualsCreate new/updated population
until finished()return best from population
8Thomas Stidsen
DTU-Management / Operations Research
Application of EAWhen applying EA’s to a certain problem we needto:
Define problem dependent parts
Select type of EA to use
Select parameters for EA
9Thomas Stidsen
DTU-Management / Operations Research
Problem dependent partsThis is where the modelling of a real world problembegins, three different parts needs to be specified:
Evaluation
Crossover and Mutation operators (andRepresentation)
Let’s look at the simple and classic problem ...
10Thomas Stidsen
DTU-Management / Operations Research
Representation: A Bit vectorVery simple: Boolean vector, corresponding to e.g.binary variables ...
11Thomas Stidsen
DTU-Management / Operations Research
Mutation
0
0
6
������
������
6
1 2 3 4 5
1 0 0 10
1 2 3 4 5
11 0 0 1
Exactly like the neighborhood
12Thomas Stidsen
DTU-Management / Operations Research
CrossoverThe simple 1-point crossover:
1
0
6
6
1
0
6
6
������������������������
������������������������
������������
������������
������������
������������
1 1
54321
01010
0
5
010
01
10
54321
1001 1
4321
54321
13Thomas Stidsen
DTU-Management / Operations Research
OperatorsThe bit-mutation operator and the 1-point crossoverare general non-problem dependent operators.Generally these are not the best operators forspecific problems. What could be the alternative ?
Problem dependent crossovers ???
PMX crossover to Christmas Lunch problem
14Thomas Stidsen
DTU-Management / Operations Research
ReproductionWhat is a good crossover ? Difficult to quantify but:
Avoid epistasis: Related genes should be“close”.
Avoid collateral mutation, keep the geneticmaterial.
New genetic material should be created by themutation operator.
Choose the best material (a little dangerous).
Creating good reproduction operators is an art not ascience.
15Thomas Stidsen
DTU-Management / Operations Research
Optimisation algorithm choiceChoosing the right Evolutionary Algorithm for theoptimization problem then becomes the next issue,the components are:
Population, several current solutions instead ofjust one.
Selection, which individuals should the nextpopulation consist of.
Stopping Criteria, when are we finished ?
16Thomas Stidsen
DTU-Management / Operations Research
The Components II: PopulationThe population is necessary for thereproduction.
Makes the algorithm robust, but increases theneed for computer power and memory.
The trade off: Prob. of getting a good solutionvs. time.
The size determines this trade off and isproblem dependent.
Important measure: Convergense, is thedegree of similarity of the solutions in thepopulation.
The crossover requires a non-converged populationto work.
17Thomas Stidsen
DTU-Management / Operations Research
The Components III: SelectionA much overlooked component which is veryimportant.
Takes one population to a reduced population.
Can be compared to the temperature of theSimulated Annealing.
Three important types:Proportional selection, the classic method,but problematic ...Tournament selection, the simplest method.Stochastic Universal Sampling after LinearFitness ranking.
18Thomas Stidsen
DTU-Management / Operations Research
Selection: Proportional Selection
P3
P4
P1
P2
19Thomas Stidsen
DTU-Management / Operations Research
Selection: Proportional SelectionThis classical method is the basis for most of thetheory, but there are two problems:
Premature convergence: A good initialindividual may quickly spread into the entirepopulation.
Slow finishing: In the end, the individualsusually have almost identical fitness values
For these reasons, proportional selection is neverused ...
20Thomas Stidsen
DTU-Management / Operations Research
Selection: Tournament selectionA simple and efficient approach: Select twodifferent individuals randomly and choose the best:
Avoids the premature convergence and slowfinishing.
Easy to use in parallel
Random fluctuations may cause problems
21Thomas Stidsen
DTU-Management / Operations Research
Selection: LFR-SUSLFR-SUS: Linear Fitness Ranking with StochasticUniversal Sampling. Works in several stages:
Sort the entire population
Assign selection value linearly
Use stochastic universal sampling to copyindividuals
22Thomas Stidsen
DTU-Management / Operations Research
LFR
1
1.0
2.0
NIndividual Ranking
23Thomas Stidsen
DTU-Management / Operations Research
SUS
P2
P1
P4
P3
24Thomas Stidsen
DTU-Management / Operations Research
Selection: LFR-SUSThe most “fair” method, with the least noise inthe sampling of new individuals.
More computational demanding, but that’susually not a problem
Difficult to parralellise
25Thomas Stidsen
DTU-Management / Operations Research
The Components IIII: ReproductionThe biggest difference compared to otheralgorithms: Create a new individual/solution bycombining material from two previous solution:
Intuitively: Create new solutions by combiningexisting solutions in a new way.
Very problemdependent.
Standard types: 1-point, 2-point.
Traditionally considered the most importantcomponent.
If you cannot create a good crossover, don’t useEA.
26Thomas Stidsen
DTU-Management / Operations Research
The Components IIII: MutationTraditionally a background operator.
Corresponds to the traditional neighbourhoodupdate: sm ∈ N (sl).
Possibility for guided mutations.
27Thomas Stidsen
DTU-Management / Operations Research
Two recomandable EA’sTwo good algorithms worth considering are:
Generational EA with LFT-SUS (bacteriaevolution)
Steady State EA with tournament selection(elephant evolution)
Depending on the problem, these are excellentalgorithms.
28Thomas Stidsen
DTU-Management / Operations Research
Generational EAP ← RandomIndividuals()repeat
P ′ := LFR− SUS(P )P ′′ ← {}while P ′ 6= {}
p1, p2 := RandomRemove2(P ′)o1, o2 := Crossover(p1, p2)P ′′ ← o′
1, o′
2:= Mutate(o1, o2)
endwhileP := P ′′
until finished()return Best(P )
29Thomas Stidsen
DTU-Management / Operations Research
Steady State EAP ← RandomIndividuals()repeat
p1, p2, p3, p4 := RandomSelect4dif(P )o1, o2 := Crossover(Best(p1, p2), Best(p3, p4))o′
1, o′
2:= Mutate(o1, o2)
r1, r2, r3, r4 := RandomSelect4different(P )Replace(P,Worst(r1, r2), o1)Replace(P,Worst(r3, r4), o2)
until finished()
30Thomas Stidsen
DTU-Management / Operations Research
Convergence ?What did I mean by converged ? Depending on therepresentation, we may look on the similarity of thedifferent individuals:
Binary strings: Hamming distance
Permutation ???
Real valued arrays: Euclidian distance
Special structures: ???
31Thomas Stidsen
DTU-Management / Operations Research
Advanced TopicsThere are MANY variations of EA’s, just to name afew:
Island EA.
Hill climber inclusion: Baldwin and Lamarcianevolution.
Parallel implementations.
Multi-criteria optimisation.
Co-evolutionary EA.
Automatic operator probability adjustment.
32Thomas Stidsen
DTU-Management / Operations Research
EA TheoryAs for the other metaheuristics, the EA theory isvery limited:
The Schemata theorem, in your notes.
Price’es theorem. Comes from populationbiology, and has been transferred to EA’s byLee Altenberg. Very complicated mathematics.
Goldberg’s work on population sizing.
In practice none of theories are useable. Note,contrary to SA there is no convergence theory.
33Thomas Stidsen
DTU-Management / Operations Research
The first theory book ...Is the book: “Genetic Algorithms - Principles andPerspectives”, C.R. Reeves & J. E. Rowe.
The first (to my knowledge) theory book onevolutionary algorithms.
The lack of theory is acknowledged ...
... but not ignored !
34Thomas Stidsen
DTU-Management / Operations Research
Many bad articles ...“The number of papers devoted to GA’s isenormous - and increasing - but sadly, too many ofthem have titles like: A New Genetic Algorithm forthe Multi-Resource Travelling GravediggerProblem with Variable Coffin Size”, “GeneticAlgorithms - Principles and Perspectives”, C.R.Reeves & J. E. Rowe.
35Thomas Stidsen
DTU-Management / Operations Research
When to use EA ?When should you consider EA ?
If the problem is REALLY hard:If the problem is very multimodal.If the problem is a multi criteria problem.If the standard neighbourhood is bad ...
If you have a good reproduction operator.
If your problem is multi-objective
36Thomas Stidsen
DTU-Management / Operations Research
When not use EADon’t use EA if:
Your problem is too simple.
Your (single solution) neighbourhood operator isefficient
Your reproduction cannot produce goodindividuals.
Time is critical.
37Thomas Stidsen
DTU-Management / Operations Research
ParametersThere are more parameters in EA than in SA andmost TABU algorithms. Further some parametersare hidden:
Population size.
Selection pressure, Important but hiddenparameter.
Operator probability: Which operator should thealgorithm use ?
Stopping criteria.
Generation gap.These are just the basic parameters, many othersmay show up ...
38Thomas Stidsen
DTU-Management / Operations Research
Tips and tricksA few general advices:
The most important: Get the representation andreproduction operator right.
Use a large population initially.
Be carefull about the selection pressure, use alow selection pressure initially.
Tune your evaluation function, this is where thebulk of the work is performed by the computer.
Watch the convergens.