1 / 12

Tutorial 2 (Lecture6)

Tutorial 2 (Lecture6). (Intro to) Evolutionary Computation School of Computer Science University of Birmingham. Catching up…. The module’s web page: http://www.cs.bham.ac.uk/%7Eaxk/EC.htm Syllabus page linked from there Lecturer’s email: axk@cs.bham.ac.uk

marc
Download Presentation

Tutorial 2 (Lecture6)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Tutorial 2 (Lecture6) (Intro to) Evolutionary Computation School of Computer Science University of Birmingham

  2. Catching up… • The module’s web page: • http://www.cs.bham.ac.uk/%7Eaxk/EC.htm • Syllabus page linked from there • Lecturer’s email: axk@cs.bham.ac.uk • TA’s email: A.Soltoggio@cs.bham.ac.uk • TA’s office hour: Wednsday 2-3pm • Please see him for help with programming exercises. See me in case of other problems

  3. Catching up… • Recommended books: • See Syllabus page • School library • Where are the lecture/tutorial notes? • On the module’s web page + related papers to read • New: ‘EC-discussions’ mailing list • Check that you received the welcome message • If you haven’t then contact us to add you on the list • The list is a forum of discussions for those registered to this module.

  4. Remainder of this tutorial • Questions • What was not sufficiently clear so far? • What do you want me to address in more detail? • Short recap of what we did so far • Programming exercise & some hints

  5. Questions?

  6. Some thoughts before the exercise Real Valued Representation  • Gaussian or Cauchy Mutation  • Different distributions • Very much depends on the scaling factor There are new papers related to this subject – pointers will be added to the EC web page The programming exercise will concern the ‘classical’ version of Fast-EP, discussed in the lecture

  7. Implementing Gaussian and Cauchy Mutation Gaussian distributed random number • In Java: mean + deviation * rng.nextGaussian(), or code below • In C, C++ use GSL, or code below. Cauchy distributed random number • In Java: see code below. • In C, C++ use GSL, or code below. Other distributions • See references  References • Gnu Scientific Library (GSL), • http://www.gnu.org/software/gsl/gsl.html • L. Devroye, Non-Uniform Random Variate Generation, Springer Verlag 1986.  • Richard Saucier, Computer Generation of Statistical Distributions • http://ftp.arl.mil/random/

  8. Exercise Sheet Self-Adaptive Mutation Goal: • The goal of this exercise is to get experience with real-valued based representations and self-adaptation in EC.  Task • Write an EA (possibly reusing bits from the previous tutorial), that finds the optimum in one of the test functions shown in Xin’s paper discussed in the last lecture. Use a real-valued representation, with Gaussian or Cauchy mutation and self-adaptive mutation parameter.  Hints • Each individual in the population will need two genotypes: one for the actual value and one for the strategy parameter. You will need to mutate both, using the contents of the second genotype to control the mutation of the first.  • Question • ·What happens if you do not use a minimum value for the strategy parameter? • ·For most global optimization problems, the ranges of variables are usually given (e.g. –10.0<x_i<10.0). What do you do if a random mutation takes an offspring outside the range?

  9. Implementing Gaussian and Cauchy Mutation – code examples Code examples taken from Thorsten double Gaussian (double stdev, double median) { assert( stdev > 0. ); double u,v,x; do { u = 2.0 * rng.nextDouble() - 1.0; v = 2.0 * rng.nextDouble() - 1.0; x = u * u + v * v; } while ( x >= 1.0 ); return median + stdev * u * sqrt( -2. * log( x ) / x ); } double Cauchy (double formFactor, double median) { assert( formFactor > 0. ); double u, v; do { u = 2.0 * rng.nextDouble() - 1.0; v = 2.0 * rng.nextDouble() - 1.0; } while (u*u+v*v>1.0 ||(u==0.0&&v==0.0)); if (u!=0) return (median + formFactor * (v/u)); else return(median); }

  10. Binary representation of Real Values? • When designing a representation, try to ensure that:  • -       your complete search space is covered • -       nothing outside your search space is covered • -       all areas of your search space are covered with equal density (no bias)

  11. Problems with Binary Encoding • 1.Hamming Cliffs • Hamming distance = nos of pixel-wise differences • Hamming distance is important • Gray coding = neighbors always have hamming distance one • 2.What bit-length to use when representing real values by binary strings? • Too short… • … or too long • 3.Bit-Mutation Probability • Single mutation… • … or many-bit mutation In valued problems such as function optimization it is often better to use real-valued representation.

  12. Have fun with the programming exercise! • Do share your experiences on ‘EC-discussions’!

More Related