next up previous
Next: Cart-Pole Controller Optimization [5 Up: MLB_Exercises_2012 Previous: Exercises

Comparison of Optimization Algorithms [5 P]

Apply the four optimization algorithms gradient descent, genetic algorithms, simulated annealing, and particle swarm optimization to minimize each of the following four 2-dimensional functions;


$\displaystyle f_1({\bf x}) = \sum_{i=1}^2 (x_i^2+10-10 \cos(2 \pi x_i ))$

in the interval $ {\bf x} \in [-5, 5]^2$ ,

$\displaystyle f_2({\bf x}) = (x_2 - x_1^2)^2 + (x_1 - 1)/2 + 2 (\vert x_1-1.5\vert+ \vert x_2-1.5\vert)$

in the interval $ {\bf x} \in [-2, 2]^2$ ,

$\displaystyle f_2({\bf x}) = e +20 - 20 \exp(-0.2 \sqrt{1/2 \sum_{i=1}^2 x_i^2}) -
\exp(1/2\sum_{i=1}^2 \cos(2 \pi x_i))$

in the interval $ {\bf x} \in [-8, 8]^2$ ,

$\displaystyle f_2({\bf x}) = 1000 \vert x_1\vert/(1000 \vert x_1\vert + 1)+ 0.01 \vert x_2\vert$

in the interval $ {\bf x} \in [-5, 5]^2$
and compare their performance and run time.

Download the MATLAB code for the genetic algorithm toolbox (gatoolbox), simulated annealing (anneal.m) and the calculation of the gradient (gradient.m).1

Implement the particle swarm optimization algorithm. Complete the MATLAB function pso.m.

Implement the gradient descent algorithm with adaptive learning rate by estimating the gradient with finite differences as provided in the MATLAB function gradient.m.

In order to carry out the optimization you can write your own MATLAB code or use the code template provided in compare.m. Missing code fragements that have to be completed are marked with "... HOMEWORK ...".

For each of the four optimization problems set the free parameters of each of the four optimization algorithm to appropriate values. The free parameters are marked with "... HOMEWORK ..." in the MATLAB code. Explain and justify your choice.

Repeat the minimization for each of the four functions with each of the four algorithms 10 times (with the parameters settings chosen in e) ) and calculate the mean and the standard error of the mean (SEM) of the resulting minimum function values and the corresponding run times.

Compare the results obtained in f) and interpret possible strengths and weaknesses of each optimization algorithm with respect to the optimized functions. Hand in graphical illustrations of your results that support all your statements.

Present your results clearly, structured and legible. Document them in such a way that anybody can reproduce them effortless.

next up previous
Next: Cart-Pole Controller Optimization [5 Up: MLB_Exercises_2012 Previous: Exercises
Haeusler Stefan 2013-01-16