Upload
others
View
8
Download
0
Embed Size (px)
Citation preview
Lecture 3
Evolutionary Algorithms
Invited Guest Professorship
Université Lois Pasteur, StrasbourgUniversité Lois Pasteur, Strasbourg
Prof. Dr. Gisbert Schneider
Goethe-University, Frankfurt
25 November 2008, (c) G. Schneider
Global optimum
Fitness
Adaptive Walk
in a “fitness landscape”
Start
Xn
Optimization Tasks
Local optimum
Fitness
X1X2
End
X1
X2
Xn
2
Fitn
ess
Types of fitness landscapesF
itn
ess
The Dream The Nightmare
3
Start
q C
BA
Local Neighborhood Search
Neighborhood N Local
optimumx
• fixed N
• variable (“adaptive”) N
4
Local (neighborhood) search
Any-ascent/Stochastichill-climbing
Steepest/First-ascenthill-climbing
Population-based
Local Neighborbood Strategies
Threshold-acceptingSimulatedannealing
Tabu search
Geneticalgorithms
Evolutionstrategies
Evolutionaryprogramming
5
Elements of artificial adaptive systems (Koza)
• Structures that undergo adaptation
• Initial structures (starting solutions)
• Fitness measure that evaluates the structures
• Operations to modify the structures• Operations to modify the structures
• State (memory) of the system at each stage
• Method for designating a result
• Method for terminating the process
• Parameters that control the proces
6
• Genetic algorithms
• Evolution strategies
• Particle Swarm Optimization (PSO)
Learning from Nature ...
• Particle Swarm Optimization (PSO)
• Ant Colony Optimization (ACO)
7
Which search strategy should be applied?
Global & local search techniques guided by
• Random parameter variation
• Stepwise systematic parameter variation
• Gradients in the fitness landscape ...
There is no one best method.There is no one best method.
Evolutionary algorithms are
• easily implemented
• robust
• able to cope with high-dimensional optimization tasks
8
Searching in real and artificial fitness landscapes
Quality
(experimental)
“Fitness”
(calculated)
Idealized path
Neural network model
of peptide antibody recognition
9
a) Griewangk Funktion b) Rastrigin Funktion c) De Jong‘s Sphere Funktion
globales Minimum globales Minimum
1cos4000
)(11
2
+
−= ∏∑
==
n
i
in
i
i
i
xxxf
∑=
=n
i
ixxf1
2)(
( )∑=
⋅⋅⋅−+⋅=n
i
ii xxnxf1
2)2cos(1010)( π
d) Schaffer F6 Funktion e) Rosenbrock Funktion
globales Minimum
( ) ( )21
1
22
1 1100)( ∑−
=+ −+−⋅=
n
i
iii xxxxf( )222
222
)(001.01
5.0sin5.0)(
yx
yxxf
+⋅+
−++=
10
Operators of Evolutionary Optimization
• Mutation
• Crossover
• Mutation
• CrossoverVariation
Adds new information to a population
Exploits information within a population• Crossover
• Selection
• Crossover
• Selection
Exploits information within a population
11
clogPcMWO+NH-donors Surf [Å2]
S
NH
O
O
5.19 100 110404 011 0105 100 1102 001 00159.9 010 011
Real Binary GrayDescriptors
Genetic Algorithms: Chromosome Representation
Surfpolar [Å2]
NH
O
59.9 010 011
chromosome
genes
100011100001010
110010110001011
12
Principle of Evolutionary Searching
Step 1: Random search
Step 2 and following:
“Local hill climbing”
Best value
Optimum
Generate a diverse set of parametervalues and hope for a hit
Generate localized distributionsof parameter valuesand improve steadily
Best value
à Adaptive neighborhood 13
(Rechenberg, 1973)The (µ,λλλλ) Evolution Strategy
14
Algorithm of the (1,λλλλ) Evolution Strategy
Initialize parent (ξξξξP,σσσσP,QP);
For each generation:
Generate λλλλ variants (ξξξξV,σσσσV,QV) around the parent:
Quality (“Fitness”)
Stepsize
Variables
σσσσV = abs(σσσσP + G);
ξξξξV = ξξξξP + σσσσV • G;
calculate fitness QV;
Select best variant by QV ;
Set (ξξξξP,σσσσP,QP) ≡≡≡≡ (ξξξξV,σσσσV,QV)best ;
Box-Muller: )2sin()ln(2),G( jiji π⋅−=
i,j: pseudo-random numbers in ]0,1]
in [-∞,∞]15
Evolutionary Optimization: Protein backbone folding
Variables: Coordinates of “Beads on a string”
Fitness function: Empirical potential
„Folding“ of the ribonucleasese A backbone
X-ray structure (1rtb)
16
Multiobjective Optimization (MO)
f(property) = w1 * property1 + w2 * property2 + …
Disadvantages:
One possibility: weighted Fitness Function
Disadvantages:
• The setting of the weights is non-intuitive
• Regions of the search space may be excluded due to
the chosen weight setting
• Objectives may be correlated
• Only a single solution is found17
MOGA – Multiobjective Genetic Algorithm
• Most optimization algorithms can only cope with a single
objective
• Evolutionary Algorithms use a population of solutions
MOGA (Fonseca and Fleming 1993):
• Maps out the hypersurface in the search space where all
solutions are tradeoffs between the different objectives
• Searches for a set of non-dominated solutions
• The ranking of solutions is based on dominance instead
of a fitness function (Pareto ranking)18
Multiobjective Optimization (MO)
• Many practical optimization applications are
characterized by more than one objective
• Optimal performance in one objective often correlates • Optimal performance in one objective often correlates
with low performance in another one
• Strong need for a compromise
• Search for solutions that offer acceptable performance
in all objectives
19
MOGA – Multiobjective Genetic Algorithm
0
0
24
f2
number of times the
Potential solutions in a two-objective (f1 and f2) minimization problem:
0
0
0
0
1
f1
number of times thesolution is dominated
non-dominated solution(Pareto solution)
dominated solution
20
Particle Swarm Optimization (PSO)
• Biological motivated optimization paradigm
• Individuals move through a fitness landscape
• Particles can change their movement direction and velocities
• “Social” interactions between individuals of a population• “Social” interactions between individuals of a population
• Each particle knows about its own best position and all
particles know about the overall best position
21
Particle Swarm Optimization (PSO) – cont.
T. Krink, University of Aarhus
22
PSO Algorithm
begin
initialize particle Positions and Memories
evaluate Fitness
while (stop criterion ≠ true)while (stop criterion ≠ true)
compute new Particle Velocities
compute new Particle Positions
evaluate Fitness
update Memories
end
end
23
PSO: Update Rule 1 (Standard Type)
))((2))((2)(v)1(v 21ii txprtxprtt ibii −⋅⋅+−⋅⋅+=+
Individual
Memory
Social
Memory
v: Velocity vector of a particle
x: Position of a particle
i: Dimension
t: Epoch (“time”)
r1 and r2: pseudo-random numbers between 0 and 1
pi and pb: best Positions stored in the individual and social Memories
24
PSO: Update Rule 2 (Inertia Weight Type)
))(())(()(v)1(v 2211ii txprntxprntwt ibii −⋅⋅+−⋅⋅+⋅=+
Inertia
Weight
Individual
Memory
Social
Memory
EpochsMaxEpochs
wwww endstart
start ⋅−
−=
25
v: Velocity vector of a particle
x: Position of a particle
w: inertia weight
i: Dimension
t: Epoch (“time”)
n1 and n2: constants for the individual and social terms
r1 and r2: pseudo-random numbers between 0 and 1
pi and pb: best Positions stored in the individual and social Memories
global
minimum
Convergence of PSO for the minimization of theGriewangk-Function after 100 epochs
PSO: Individual and Social Memory
n1 = 1n2 = 2
n1 = 2n2 = 1
Higher weight on the social memory
26
PSO: Update Rule 3 (Constriction Type)
)))(())(()(v()1(v2221ii
txprntxprntKt ibii −⋅⋅+−⋅⋅+⋅=+
Constriction
ConstantIndividual
Memory
Social
Memory
|42|
2
2 ϕϕϕ −−−=K
4,21
>+= ϕϕ nn
27
v: Velocity vector of a particle
x: Position of a particle
K: constriction constant
i: Dimension
t: Epoch (“time”)
n1 and n2: constants for the individual and social terms
r1 and r2: pseudo-random numbers between 0 and 1
pi and pb: best Positions stored in the individual and social Memories
The Constriction constant regulates swarm behavior in two ways (Kennedy & Eberhart, 2001):
• It leads to swarm convergence after a certain period of time.
• If the swarm has found a local optimum, the value of K determines its ability to escape the local optimum.
Rosenbrock function
Global minimum
Global minimum
Constriction-Type
Rosenbrock function
(after 100 epochs)
Standard-Type
28
Particle Trajectories
Global minimum
• The particle visited several local optima bevor the global optimum was found
29
Exercise
1) Go to the modlab website: www.modlab.de à software à PSOViz
• make yourself familiar with the PSOViz software options
2) Start PsoViz from your local computer (or directly from the website)
Choose a fitness function and change the various PSO parameter settings.
• Do you see an influence on the convergence behavior?
30
• Do you see an influence on the convergence behavior?
• How do you explain the differences?
• Do you observe „typical problems“ with PSO?