Chapter 2 1 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing.

Slides:



Advertisements
Similar presentations
Genetic Algorithms Chapter 3. A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Genetic Algorithms GA Quick Overview Developed: USA in.
Advertisements

Population-based metaheuristics Nature-inspired Initialize a population A new population of solutions is generated Integrate the new population into the.
What is an Evolutionary Algorithm?
What is an Evolutionary Algorithm?
Genetic Algorithms Contents 1. Basic Concepts 2. Algorithm
Parameter control Chapter 8. A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Parameter Control in EAs 2 Motivation 1 An EA has many.
Parameter Control A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Chapter 8.
Genetic Algorithms Representation of Candidate Solutions GAs on primarily two types of representations: –Binary-Coded –Real-Coded Binary-Coded GAs must.
Genetic Algorithms Chapter 3.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
Evolutionary Computational Intelligence
Multimodal Problems and Spatial Distribution Chapter 9.
Doug Downey, adapted from Bryan Pardo, Machine Learning EECS 349 Machine Learning Genetic Programming.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Evolutionary Computational Intelligence Lecture 8: Memetic Algorithms Ferrante Neri University of Jyväskylä.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
Evolutionary Computation 22c: 145, Chapter 9. What is Evolutionary Computation? A technique borrowed from the theory of biological evolution that is used.
Genetic Algorithms Overview Genetic Algorithms: a gentle introduction –What are GAs –How do they work/ Why? –Critical issues Use in Data Mining –GAs.
Genetic Programming Chapter 6. A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Genetic Programming GP quick overview Developed: USA.
Prepared by Barış GÖKÇE 1.  Search Methods  Evolutionary Algorithms (EA)  Characteristics of EAs  Genetic Programming (GP)  Evolutionary Programming.
Genetic Algorithm.
Evolutionary Intelligence
© Negnevitsky, Pearson Education, CSC 4510 – Machine Learning Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Introduction to Evolutionary Algorithms Lecture 1 Jim Smith University of the West of England, UK May/June 2012.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Genetic Algorithms Michael J. Watts
Artificial Intelligence Chapter 4. Machine Evolution Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
A.E. Eiben and J.E. Smith, What is an Evolutionary Algorithm? With Additions and Modifications by Ch. Eick EP---January 31, 2012 Please read specification.
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
Genetic Algorithms 虞台文. Content Evolutional Algorithms Genetic Algorithms Main Components of Genetic Algorithms – Encoding – Fitness Function – Recombination.
Introduction to Evolutionary Algorithms Session 4 Jim Smith University of the West of England, UK May/June 2012.
What is an Evolutionary Algorithm? Chapter 2. A.E. Eiben and J.E. Smith, What is an Evolutionary Algorithm? With Additions and Modifications by Ch. Eick.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Genetic Algorithms Genetic Algorithms – What are they? And how they are inspired from evolution. Operators and Definitions in Genetic Algorithms paradigm.
Genetic Algorithms Introduction Advanced. Simple Genetic Algorithms: Introduction What is it? In a Nutshell References The Pseudo Code Illustrations Applications.
GENETIC ALGORITHM A biologically inspired model of intelligence and the principles of biological evolution are applied to find solutions to difficult problems.
© Negnevitsky, Pearson Education, Lecture 9 Evolutionary Computation: Genetic algorithms Introduction, or can evolution be intelligent? Introduction,
1 Genetic Algorithms K.Ganesh Introduction GAs and Simulated Annealing The Biology of Genetics The Logic of Genetic Programmes Demo Summary.
Evolutionary Programming
Genetic Algorithms. 2 Overview Introduction To Genetic Algorithms (GAs) GA Operators and Parameters Genetic Algorithms To Solve The Traveling Salesman.
Evolution strategies Chapter 4. A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Evolution Strategies ES quick overview Developed: Germany.
Probabilistic Algorithms Evolutionary Algorithms Simulated Annealing.
Genetic Programming A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Chapter 6.
Evolutionary Computing Chapter 3. / 41 Recap of EC metaphor (1/2) A population of individuals exists in an environment with limited resources Competition.
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
An Introduction to Genetic Algorithms Lecture 2 November, 2010 Ivan Garibay
Genetic Algorithms. Underlying Concept  Charles Darwin outlined the principle of natural selection.  Natural Selection is the process by which evolution.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
Introduction to Evolutionary Computing II A.E. Eiben Free University Amsterdam with thanks to the EvoNet Training Committee.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal Evolutionary Computation.
Evolutionary Programming A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Chapter 5.
Multimodal Problems and Spatial Distribution A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Chapter 9.
EVOLUTIONARY SYSTEMS AND GENETIC ALGORITHMS NAME: AKSHITKUMAR PATEL STUDENT ID: GRAD POSITION PAPER.
Genetic Algorithms And other approaches for similar applications Optimization Techniques.
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
1 Genetic Algorithms Contents 1. Basic Concepts 2. Algorithm 3. Practical considerations.
Genetic Programming.
Genetic Algorithms Author: A.E. Eiben and J.E. Smith
Genetic Algorithms.
Artificial Intelligence Chapter 4. Machine Evolution
Genetic Algorithms Chapter 3.
Artificial Intelligence Chapter 4. Machine Evolution
Genetic Programming Chapter 6.
Genetic Programming Chapter 6.
Genetic Programming Chapter 6.
Beyond Classical Search
Population Based Metaheuristics
Presentation transcript:

Chapter 2 1 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

Contents Recap of evolutionary metaphor Basic scheme of an EA Basic components: Representation / evaluation / population Parent selection / survivor selection Recombination / mutation Examples: eight-queens / knapsack problem Typical EA behaviour EAs and global optimisation 2 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

Recap of EC metaphor A population of individuals exists in an environment with limited resources Competition for those resources causes selection of those fitter individuals that are better adapted to the environment These individuals act as seeds for the generation of new individuals through recombination and mutation The new individuals have their fitness evaluated and compete (possibly also with parents) for survival. Over time Natural selection causes a rise in the fitness of the population 3 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

Recap cont’d EAs fall into the category of “generate and test” algorithms They are stochastic, population-based algorithms Variation operators (recombination and mutation) create the necessary diversity and thereby facilitate novelty Selection reduces diversity and acts as a force pushing quality 4 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

General scheme of EAs Population Parents Parent selection Survivor selection Offspring Recombination (crossover) Mutation Intialization Termination 5 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

EA scheme in pseudo-code 6 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

Common model of evolutionary processes Population of individuals Individuals have a fitness Variation operators: crossover, mutation Selection towards higher fitness “survival of the fittest” and “mating of the fittest” Neo Darwinism: Evolutionary progress towards higher life forms = Optimization according to some fitness-criterion (optimization on a fitness landscape) 7 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Two pillars of evolution There are two competing forces Increasing population diversity by genetic operators mutation recombination Push towards novelty Decreasing population diversity by selection of parents of survivors Push towards quality 8 / 43

What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Main EA components Representation Population Selection (parent selection, survivor selection) Variation (mutation, recombination) Initialisation Termination condition 9 / 43

Representation Role: provides code for candidate solutions that can be manipulated by variation operators Leads to two levels of existence phenotype: object in original problem context, the outside genotype: code to denote that object, the inside (chromosome, “digital DNA”) Implies two mappings: Encoding : phenotype=> genotype (not necessarily one to one) Decoding : genotype=> phenotype (must be one to one) Chromosomes contain genes, which are in (usually fixed) positions called loci (sing. locus) and have a value (allele) 10 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Genotype spacePhenotype space Encoding (representation) Decoding (inverse representation) B 0 c 0 1 c d G 0 c 0 1 c d R 0 c 0 1 c d Representation 2 In order to find the global optimum, every feasible solution must be represented in genotype space 11 / 43

Evaluation (fitness) function Role: Represents the task to solve, the requirements to adapt to (can be seen as “the environment”) enables selection (provides basis for comparison) e.g., some phenotypic traits are advantageous, desirable, e.g. big ears cool better, hese traits are rewarded by more offspring that will expectedly carry the same trait A.k.a. quality function or objective function Assigns a single real-valued fitness to each phenotype which forms the basis for selection So the more discrimination (different values) the better Typically we talk about fitness being maximised Some problems may be best posed as minimisation problems, but conversion is trivial 12 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Population Role: holds the candidate solutions of the problem as individuals (genotypes) Formally, a population is a multiset of individuals, i.e. repetitions are possible Population is the basic unit of evolution, i.e., the population is evolving, not the individuals Selection operators act on population level Variation operators act on individual level 13 / 43

Population 2 Some sophisticated EAs also assert a spatial structure on the population e.g., a grid Selection operators usually take whole population into account i.e., reproductive probabilities are relative to current generation Diversity of a population refers to the number of different fitnesses / phenotypes / genotypes present (note: not the same thing) 14 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

Selection Role: Identifies individuals to become parents to survive Pushes population towards higher fitness Usually probabilistic high quality solutions more likely to be selected than low quality but not guaranteed even worst in current population usually has non-zero probability of being selected This stochastic nature can aid escape from local optima 15 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Example: roulette wheel selection fitness(A) = 3 fitness(B) = 1 fitness(C) = 2 A C 1/6 = 17% 3/6 = 50% B 2/6 = 33% Selection mechanism example In principle, any selection mechanism can be used for parent selection as well as for survivor selection 16 / 43

Survivor selection A.k.a. replacement Most EAs use fixed population size so need a way of going from (parents + offspring) to next generation Often deterministic (while parent selection is usually stochastic) Fitness based : e.g., rank parents+offspring and take best Age based: make as many offspring as parents and delete all parents Sometimes a combination of stochastic and deterministic (elitism) 17 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

Variation operators Role: to generate new candidate solutions Usually divided into two types according to their arity (number of inputs): Arity 1 : mutation operators Arity >1 : Recombination operators Arity = 2 typically called crossover Arity > 2 is formally possible, seldomly used in EC There has been much debate about relative importance of recombination and mutation Nowadays most EAs use both Variation operators must match the given representation 18 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

Mutation Role: causes small, random variance Acts on one genotype and delivers another Element of randomness is essential and differentiates it from other unary heuristic operators Importance ascribed depends on representation and historical dialect: Binary GAs – background operator responsible for preserving and introducing diversity EP for FSM’s/ continuous variables – only search operator GP – hardly used May guarantee connectedness of search space and hence convergence proofs 19 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing before after Mutation example 20 / 43

Recombination Role: merges information from parents into offspring Choice of what information to merge is stochastic Most offspring may be worse, or the same as the parents Hope is that some are better by combining elements of genotypes that lead to good traits Principle has been used for millennia by breeders of plants and livestock 21 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Parents cut Offspring Recombination example / 43

Initialisation / Termination Initialisation usually done at random, Need to ensure even spread and mixture of possible allele values Can include existing solutions, or use problem-specific heuristics, to “seed” the population Termination condition checked every generation Reaching some (known/hoped for) fitness Reaching some maximum allowed number of generations Reaching some minimum level of diversity Reaching some specified number of generations without fitness improvement 23 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

What are the different types of EAs Historically different flavours of EAs have been associated with different data types to represent solutions Binary strings : Genetic Algorithms Real-valued vectors : Evolution Strategies Finite state Machines: Evolutionary Programming LISP trees: Genetic Programming These differences are largely irrelevant, best strategy choose representation to suit problem choose variation operators to suit representation Selection operators only use fitness and so are independent of representation 24 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

Place 8 queens on an 8x8 chessboard in such a way that they cannot check each other Example: the 8-queens problem 25 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

Genotype: a permutation of the numbers Phenotype: a board configuration Obvious mapping The 8-queens problem: representation 26 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

The 8-queens problem: fitness evaluation Penalty of one queen: the number of queens she can check Penalty of a configuration: the sum of penalties of all queens Note: penalty is to be minimized Fitness of a configuration: inverse penalty to be maximized 27 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

Small variation in one permutation, e.g.: swapping values of two randomly chosen positions, The 8-queens problem: mutation 28 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

Combining two permutations into two new permutations: choose random crossover point copy first parts into children create second part by inserting values from other parent: in the order they appear there beginning after crossover point skipping values already in child The 8-queens problem: recombination 29 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

The 8-queens problem: selection Parent selection: Pick 5 parents and take best two to undergo crossover Survivor selection (replacement) When inserting a new child into the population, choose an existing member to replace by: sorting the whole population by decreasing fitness enumerating this list from high to low replacing the first with a fitness lower than the given child 30 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

8 Queens Problem: summary Note that is only one possible set of choices of operators and parameters 31 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

Typical behaviour of an EA Stages in optimising on a 1-dimensional fitness landscape Early stage: quasi-random population distribution Mid-stage: population arranged around/on hills Late stage: population concentrated on high hills 32 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Working of an EA demo Searching a fitness landscape without “niching” 33 / 43

What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Working of an EA demo Searching a fitness landscape with “niching” 34 / 43

Typical run: progression of fitness Typical run of an EA shows so-called “anytime behavior” Best fitness in population Time (number of generations) 35 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

Best fitness in population Time (number of generations) Progress in 1 st half Progress in 2 nd half Are long runs beneficial? Answer: It depends on how much you want the last bit of progress May be better to do more short runs 36 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

T: time needed to reach level F after random initialisation T Time (number of generations) Best fitness in population F: fitness after smart initialisation F Answer: it depends. - Possibly good, if good solutions/methods exist. - Care is needed, see chapter/lecture on hybridisation. Is it worth expending effort on smart initialisation? 37 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

Evolutionary Algorithms in context There are many views on the use of EAs as robust problem solving tools For most problems a problem-specific tool may: perform better than a generic search algorithm on most instances, have limited utility, not do well on all instances Goal is to provide robust tools that provide: evenly good performance over a range of problems and instances 38 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

Scale of “all” problems Performance of methods on problems Random search Special, problem tailored method Evolutionary algorithm EAs as problem solvers: Goldberg view (1989) Question: why does the horizontal axis have no arrow? 39 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

EAs and domain knowledge Trend in the 90’s: adding problem specific knowledge to EAs (special variation operators, repair, etc) Result: EA performance curve “deformation”: better on problems of the given type worse on problems different from given type amount of added knowledge is variable Recent theory suggests the search for an “all-purpose” algorithm may be fruitless 40 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

Scale of “all” problems P Performance of methods on problems EA 1EA 4 EA 3 EA 2 EAs as problem solvers: Michalewicz view (1996) 41 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

EC and Global Optimisation Global Optimisation: search for finding best solution x * out of some fixed set S Deterministic approaches e.g. box decomposition (branch and bound etc) Guarantee to find x *, May have bounds on runtime, usually super-polynomial Heuristic Approaches (generate and test) rules for deciding which x  S to generate next no guarantees that best solutions found are globally optimal no bounds on runtime “I don’t care if it works as long as it converges” vs. “I don’t care if it converges as long as it works” 42 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing

EC and Neighbourhood Search Many heuristics impose a neighbourhood structure on S Such heuristics may guarantee that best point found is locally optimal e.g. Hill-Climbers: But problems often exhibit many local optima Often very quick to identify good solutions EAs are distinguished by: Use of population, Use of multiple, stochastic search operators Especially variation operators with arity >1 Stochastic selection Question: what is the neighbourhood in an EA? 43 / 43 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing