Skip to content

Latest commit

 

History

History
89 lines (56 loc) · 3.13 KB

CODE7.md

File metadata and controls

89 lines (56 loc) · 3.13 KB


At a glance... | Syllabus | Models | Code | Lecturer

Code7: coding homework : Differential Evolution

What to Hand in

After doing all the following, you should be able to write one source files into hw/code/7 along with screen snaps of your work (if relevant).

Using some URL shortener (e.g. goo.gl), shorten the URL to hw/code/7 and paste into the submission page.

Basic Differential Evolution

Read the lecture on Differential Evolution

To the generic experimentation loop of Code6, add

  • DE
  • Yet another model: Golinski (from the usual place).

For energy, use the fromHell calculation to generate an aggregate

  • Generate the frontier
  • For each candidate, evaluate the objectives
  • Incrementally track of the min,max seen for each objective
  • Run back over the frontier, computing the aggregate score (note that hell = 1 and so g1 = fromHell for one objective f1 is the normalized distance to 1. Then, the aggregate energy for n objectives
    e = 1 - sqrt(sum( gi2 )) / sqrt(n)

(Aside: We use "1 - " so this becomes a value we want to minimize. So we say candiadte1 is better than candidate2 if it generates lower energy.)

Now, after frontier0, if we incrementally track min max objective scores then all future candidates can be stamped with their "e" just as soon as they are created.

Try and make a report that looks like the output from SA.

DE(s) = DE + elite sampling

Try some elite sampling, keeping the s best items in frontier. At the start of each generation of DE, sort the frontier by the aggregate and find the min/max aggregate score (these will be found at the start and end of the list). Let small be

min + (max-min)*s/100

(e.g. at s=33 you are keeping just the best 33% of of the frontier as scored by the aggregate score).

For all the models you are currently running, collect the the median values of energy in the the last era generated by DE(s) for s in (12,25,33,50,100) (note that s=100 makes DE(s) the same as standard DE). Offer a conclusion: is DE(s) useful?

(Aside: comparing just the medians is kind of brain dead but until we have the stats machinery of CODE8, its the best we can do for now.)

Tips

As before Not everything is "ok".

Note that this model has constraints-- so after you mutate a solution, you must check if it is ok (I.e. does not violate the constraints-- otherwise, mutate again until ok).


Copyright © 2015 Tim Menzies. This is free and unencumbered software released into the public domain.
For more details, see the license.