Evolutionary Computation

advertisement
Evolutionary Computation
SS 2002
Prof. Petros Koumoutsakos
Assistants: Dirk Bueche, Sibylle Mueller
Project 1
In this exercise, we discuss one of the simplest evolutionary strategies, the so called
1+1-Evolution Strategy (ES) without step size adaptation. It was developed by Ingo
Rechenberg in Berlin in 1964.
The algorithm of the 1+1-ES has a population of two individuals, one parent and one
child. The two operations mutation and selection, by which the strategy iteratively
approaches the solution to the problem, are inspired by natural evolution.
In the mutation step, the strategy generates an offspring represented by the parameter
vector xN(g) (Index N for Newer) by adding a normally distributed random vector z to
the parent vector xE(g) (Index E for Elder):
xN(g) = xE(g) +  z,
where  is the so called step size which scales the random number.
In the selection step, for both the parent and the offspring the capacity of survival is
determined by calculating their fitness. For function optimization, the fitness
corresponds to the function value f(x). For minimization, the individual with the
smaller function value is selected as the parent of the next generation.
These two operations are repeated until the search terminates, either after a predefined
maximum number of iterations (=generations) or when the function value is below a
predefined value.
1) Write a program (programming language of your choice) that performs a
function optimization using a 1+1-ES with constant step size. (Do not forget to
put comments in your code.)
If you use C or Fortran, you can obtain random number generators from the
book ‘Numerical Recipes’ online under
http://www.ulib.org/webRoot/Books/Numerical_Recipes/…
…/bookc.html
( ps-files for C)
…/bookcpdf.html
( pdf files for C)
I recommend for uniform random number generators (RNG) the algorithm
‘ran1’, and for normally distributed RNG’s the algorithm ‘gasdev’.
If you use matlab, use ‘rand’ for uniform RNG and ‘randn’ for normal RNG.
2) With this program, minimize the quadratic (sphere) function
f sphere(x) =  n i=1 (xi)2
The search starts from the initial parameter vector x (0) = 1 and terminates as
soon as the number of generations reaches g = 104. In the following, the
problem dimension is n = 5. You should use three different step sizes,
and 
Each of the three minimizations should consist of 100 runs, each of the runs
with a different seed for the random number generator. 
3) Plot the logarithm of the median of the parent’s function value,
log(median(f(xE))), as a function of number of generations g, for the three step
sizes in one figure. Explain the behavior of the strategy with respect to the
three different step sizes. (What is the difference at g = 104? What happens in
the transient phase? Which would you consider the best for this case?)
4) How could the adjustment of the step size be improved? Explain. Implement
your solution and document the improvements by comparing it with the above
implementation a) in a graph and b) writing 2-3 sentences.
5) Now let the step size Minimize the sphere function using the
1+1-ES for problem dimensions 1 < n < 14 in steps of 1. The search now
should terminate as soon as f < 3*10-4. Plot the needed number of generations
until termination over the number of dimensions n. State what happens for n >
10 and explain.
6) Hand in a hardcopy of the following pieces on the due date:
a) A first sheet, on which you write:
Evolutionary Computation SS 2002
Project 1
Team <your.team.number>
Team members: <your.team.members>
b) Printout of your source code
c) Plots and answers to tasks 3 to 5.
Due: Monday, April 22, 11:15 a.m. in IFW A 36
Download