28 08 2018
play

28.08.2018 Why Draw Inspiration from Evolution? INF3490/4490 - PDF document

28.08.2018 Why Draw Inspiration from Evolution? INF3490/4490 Biologically inspired computing Lecture 2: Eiben and Smith, chapter 1-4 Evolutionary Algorithms - Introduction and representation Kai Olav Ellefsen 2 The Problem with Hillclimbing


  1. 28.08.2018 Why Draw Inspiration from Evolution? INF3490/4490 Biologically inspired computing Lecture 2: Eiben and Smith, chapter 1-4 Evolutionary Algorithms - Introduction and representation Kai Olav Ellefsen 2 The Problem with Hillclimbing Evolution • Biological evolution: – Lifeforms adapt to a particular environment over successive generations. – Combinations of traits that are better adapted tend to increase representation in population. – Mechanisms: Variation (Crossover, Mutation) and Selection (Survival of the fittest). • Evolutionary Computing (EC): – Mimic the biological evolution to optimize solutions to a wide variety of complex problems. – In every new generation, a new set of solutions is created using bits and pieces of the fittest of the old. General scheme of EAs EA scheme in pseudo-code Parent selection Parents Intialization Recombination (crossover) Population Mutation Termination Offspring Survivor selection 5 6 1

  2. 28.08.2018 Scheme of an EA: Representation: EA terms Two pillars of evolution There are two competing forces locus: the position of a gene allele= 0 or 1 (what values a Decreasing population diversity Increasing population gene can have) by selection diversity by genetic operators 0 1 2 n  of parents  mutation 1 0 1 1  of survivors  recombination gene: one element of Push towards quality Push towards novelty genotype: a set of gene the array values phenotype: what could be built/developed based on the 7 genotype Main EA components: General scheme of EAs Evaluation (fitness) function Parent selection • Represents the Parents task to solve • Enables Intialization selection Recombination (provides basis (crossover) for comparison) Population Mutation • Assigns a single real-valued fitness to each Termination phenotype Offspring Survivor selection 9 10 Main EA components: General scheme of EAs Population Parent selection • The candidate solutions (individuals) of the Parents problem Intialization • Population is the basic unit of evolution, i.e., the Recombination population is evolving , not the individuals (crossover) • Selection operators act on population level Population Mutation • Variation operators act on individual level Termination Offspring Survivor selection 11 12 2

  3. 28.08.2018 Main EA components: Main EA components: Selection mechanism (1/3) Selection mechanism (2/3) • Identifies individuals Example: roulette wheel selection – to become parents 1/6 = 17% – to survive fitness(A) = 3 B • Pushes population towards higher fitness fitness(B) = 1 A C • Parent selection is usually probabilistic fitness(C) = 2 3/6 = 50% 2/6 = 33% – high quality solutions more likely to be selected than low quality, but not guaranteed – This stochastic nature can aid escape from local optima 13 14 Main EA components: General scheme of EAs Selection mechanism (3/3) Parent selection Survivor selection: Parents • N old solutions + K new solutions (offspring) -> N Intialization individuals (new population) Recombination • Often deterministic: (crossover) – Fitness based : e.g., rank old population + Population offspring and take best Mutation – Age based : make N offspring and delete all old solutions • Sometimes a combination of stochastic and Termination deterministic (elitism) Offspring Survivor selection 15 16 Main EA components: Main EA components: Variation operators Mutation (1/2) • Role: to generate new candidate solutions • Role: cause small, random variance to a genotype • Usually divided into two types according to their arity • Element of randomness is essential and (number of inputs to the variation operator): differentiates it from other unary heuristic operators – Arity 1 : mutation operators • Importance ascribed depends on representation and historical dialect: – Arity >1 : recombination operators – Binary Genetic Algorithms – background operator – Arity = 2 typically called crossover responsible for preserving and introducing diversity – Arity > 2 is formally possible, seldom used in EC – Evolutionary Programming for continuous variables – the only search operator – Genetic Programming – hardly used 17 18 3

  4. 28.08.2018 Why do we do Random Mutation? Main EA components: Mutation (2/2) before 1 1 1 1 1 1 1 after 1 1 1 0 1 1 1 19 Main EA components: Main EA components: Recombination (2/2) Recombination (1/2) Parents • Role: merges information from parents into offspring • Choice of what information to merge is stochastic cut cut • Hope is that some offspring are better by combining 1 1 1 1 1 1 1 0 0 0 0 0 0 0 elements of genotypes that lead to good traits 1 1 1 0 0 0 0 0 0 0 1 1 1 1 Offspring 21 22 Main EA components: General scheme of EAs Initialisation / Termination Parent selection • Initialisation usually done at random, Parents – Need to ensure even spread and mixture of possible allele values Intialization – Can include existing solutions, or use problem-specific Recombination heuristics, to “seed” the population (crossover) Population • Termination condition checked every generation Mutation – Reaching some (known/hoped for) fitness – Reaching some maximum allowed number of generations Termination – Reaching some minimum level of diversity Offspring – Reaching some specified number of generations without Survivor selection fitness improvement 23 24 4

  5. 28.08.2018 Typical EA behaviour: Typical EA behaviour: Typical run: progression of fitness Are long runs beneficial? • Answer: – It depends on how much you want the last bit of progress 25 26 Chapter 4: Representation, Mutation, Role of representation and variation and Recombination operators • First stage of building an EA and most difficult one: • Role of representation and variation operators choose right representation for the problem • Most common representation of genomes: • Type of variation operators needed depends on – Binary chosen representation – Integer – Real-Valued or Floating-Point – Permutation – Tree 27 28 TSP: How to represent? Binary Representation • One of the earliest representations • Genotype consists of a string of binary digits 29 30 5

  6. 28.08.2018 Binary Representation: Binary Representation: Mutation 1-point crossover • Choose a random point on the two parents • Alter each gene independently with a probability p m • Split parents at this crossover point • p m is called the mutation rate • Create children by exchanging tails 31 32 Binary Representation: Binary Representation: n-point crossover Uniform crossover • Choose n random crossover points • Assign 'heads' to one parent, 'tails' to the other • Split along those points • Flip a coin for each gene of the first child • Glue parts, alternating between parents • Make an inverse copy of the gene for the second child • Breaks more “links” in the genome 33 34 Binary Representation: Integer Representation Crossover and/or mutation? • Some problems naturally have integer variables, – e.g. image processing parameters There is co-operation AND competition between them: • Others take categorical values from a fixed set • Crossover is explorative , it makes a big jump to an area – e.g. {blue, green, yellow, pink} somewhere “in between” two (parent) areas • Mutation is exploitative , it creates random small • N-point / uniform crossover operators work diversions, thereby staying near (in the area of) the parent • Extend bit-flipping mutation to make: – “creep” i.e. more likely to move to similar value • Adding a small (positive or negative) value to each gene with probability p . – Random resetting (esp. categorical variables) • With probability p m a new value is chosen at random 35 36 6

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend