Evolutionary Algorithms in a Nutshell
Evolutionary Algorithms in a Nutshell
Evolutionary Algorithms in a Nutshell
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>Evolutionary</strong> <strong>Algorithms</strong> <strong>in</strong> a <strong>Nutshell</strong>ORHow I copied the comp.ai.genetic FAQ onto a bunch of slides at 5am this morn<strong>in</strong>gAniruddh Nath24 Sep 2006
What are <strong>Evolutionary</strong> <strong>Algorithms</strong>?● “A subset of evolutionary computation, ageneric population-based metaheuristicoptimization algorithm.” - Wikipedia● Wuh?● A set of biologically <strong>in</strong>spired algorithms thatwork on the 'survival of the fittest' pr<strong>in</strong>ciple.
Key Features● Population● Genetic operators (recomb<strong>in</strong>ation, mutation)● Reproduction● Fitness function● Exploration
Types of <strong>Evolutionary</strong> <strong>Algorithms</strong>● Genetic algorithms● <strong>Evolutionary</strong> programm<strong>in</strong>g● Evolution strategies● Genetic programm<strong>in</strong>g● Learn<strong>in</strong>g classifier systems
Genetic <strong>Algorithms</strong>● Search technique, often used for optimizationproblems.● Population: usually a set of b<strong>in</strong>ary str<strong>in</strong>gs(“chromosomes”).● Look<strong>in</strong>g for a b<strong>in</strong>ary str<strong>in</strong>g that is exactly orapproximately optimal, given a fitnessfunction.
Pseudocode (from c.a.genetic)t := 0;<strong>in</strong>itpopulation P (t);evaluate P (t);while not done dot := t + 1;P' := selectparents P (t);recomb<strong>in</strong>e P' (t);mutate P' (t);evaluate P' (t);P := survive P,P' (t);od
Toy Example (cont'd)Init: P = {010010, 110011, 100001}Evaluate:f(010010) = 18f(110011) = 33f(100001) = 33
Generation 1Select parents: 110011, 100001Recomb<strong>in</strong>ation: we're us<strong>in</strong>g one po<strong>in</strong>t crossover.Other methods are possible.110 011100 001110001100011Mutation: 111001, 100010P = {110011, 100001, 111001, 100010}Condition not met.
Generation 2Select parents: 110011, 100010Recomb<strong>in</strong>ation:110 011100 010110010100011Mutation: 010010, 101011P = {110011, 100010, 010010, 101011}f(101011) = 41 > 40. Done.
<strong>Evolutionary</strong> Programm<strong>in</strong>g● Similar idea, but not restricted to'chromosome' structure.● Solutions can have any structure; variousmutations are possible based on how youdef<strong>in</strong>e your solutions.● Recomb<strong>in</strong>ation tends not to play a role.
<strong>Evolutionary</strong> Strategy● Uses vector of reals rather than bit str<strong>in</strong>g.● Mutation: add a random value to each elementof the vector.● Recomb<strong>in</strong>ation: take the mean of eachelement of the parent vector:[1.0, 2.0, 3.0], [2.0, 1.0, 4.0] [1.5, 1.5, 3.5]
Genetic Programm<strong>in</strong>g● Solutions are actual programs, usuallyrepresented as parse trees.● Recomb<strong>in</strong>ation consists of programsexchang<strong>in</strong>g subtrees.● Mutation is generally not used.● This is awesome.
Learn<strong>in</strong>g Classifier Systems● Population is a set of 'b<strong>in</strong>ary classifiers' (ifthenrules about an environment).● Uses re<strong>in</strong>forcement learn<strong>in</strong>g: the environmentgives the agent a reward for choos<strong>in</strong>g a set ofrules; agent aims to maximize award.
Problems with EAs● Local maxima.● Highly dependent on problem formulation.● Not guaranteed to ever f<strong>in</strong>d a good solution (ifyou're really unlucky with your operators).
Why bother?● Yields surpris<strong>in</strong>gly good results on optimizationproblems.● Example: f<strong>in</strong>d a pretty good way to schedulejobs on a processor (m<strong>in</strong>imize wait<strong>in</strong>g time).● Schedul<strong>in</strong>g problems tend to be NP-hard;cannot calculate exact solution.● EAs can also be used to f<strong>in</strong>d numbers close to42.
A Brief History of EAs● Nils Aall Barricelli used EAs <strong>in</strong> 1954 to play acard game.● The father of modern GAs is Prof. JohnHolland, at the University of Michigan.● Prof. David Goldberg <strong>in</strong> the GE departmentworked with Prof. Holland, and now runs theIll<strong>in</strong>ois Genetic <strong>Algorithms</strong> Laboratory(IlliGAL).
References/Further Read<strong>in</strong>g● Goldberg, David. Genetic <strong>Algorithms</strong> <strong>in</strong>Search, Optimization, and Mach<strong>in</strong>e Learn<strong>in</strong>g.● comp.ai.genetic newsgroup.● Wikipedia.● Some website I found off Google:http://neo.lcc.uma.es/cEA-web/ES.htm