Introduction to Evolutionary Algorithms Lecture 1 Jim Smith University of the West of England, UK May/June 2012.

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 Chapter 3.
Evolutionary Computation (EC)
Genetic Algorithms Chapter 3.
Genetic Algorithms1 COMP305. Part II. Genetic Algorithms.
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
Doug Downey, adapted from Bryan Pardo, Machine Learning EECS 349 Machine Learning Genetic Programming.
Doug Downey, adapted from Bryan Pardo, Machine Learning EECS 349 Fall 2007 Machine Learning Genetic Algorithms.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Evolutionary Computational Intelligence Lecture 8: Memetic Algorithms Ferrante Neri University of Jyväskylä.
Evolutionary Computational Intelligence
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
Genetic Algorithms Overview Genetic Algorithms: a gentle introduction –What are GAs –How do they work/ Why? –Critical issues Use in Data Mining –GAs.
Prepared by Barış GÖKÇE 1.  Search Methods  Evolutionary Algorithms (EA)  Characteristics of EAs  Genetic Programming (GP)  Evolutionary Programming.
Genetic Algorithm.
Evolutionary Intelligence
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Intro. ANN & Fuzzy Systems Lecture 36 GENETIC ALGORITHM (1)
Genetic algorithms Prof Kang Li
Lecture 8: 24/5/1435 Genetic Algorithms Lecturer/ Kawther Abas 363CS – Artificial Intelligence.
Zorica Stanimirović Faculty of Mathematics, University of Belgrade
Genetic Algorithms Michael J. Watts
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 虞台文. 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
Brief introduction to genetic algorithms and genetic programming A.E. Eiben Free University Amsterdam.
Genetic Algorithms Chapter 3. A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Genetic Algorithms GA Quick Overview Developed: USA in.
2005MEE Software Engineering Lecture 11 – Optimisation Techniques.
1 Genetic Algorithms K.Ganesh Introduction GAs and Simulated Annealing The Biology of Genetics The Logic of Genetic Programmes Demo Summary.
Evolutionary Computing Dialects Presented by A.E. Eiben Free University Amsterdam with thanks to the EvoNet Training Committee and its “Flying Circus”
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
Genetic Algorithms. 2 Overview Introduction To Genetic Algorithms (GAs) GA Operators and Parameters Genetic Algorithms To Solve The Traveling Salesman.
Chapter 12 FUSION OF FUZZY SYSTEM AND GENETIC ALGORITHMS Chi-Yuan Yeh.
EE749 I ntroduction to Artificial I ntelligence Genetic Algorithms The Simple GA.
Genetic Algorithms. The Basic Genetic Algorithm 1.[Start] Generate random population of n chromosomes (suitable solutions for the problem) 2.[Fitness]
CITS7212: Computational Intelligence An Overview of Core CI Technologies Lyndon While.
Evolutionary Computing Chapter 3. / 41 Recap of EC metaphor (1/2) A population of individuals exists in an environment with limited resources Competition.
Genetic Algorithms Chapter 3.
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 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.
Chapter 2 1 What is an EA A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing.
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.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
Genetic Algorithms. GA Quick Overview Developed: USA in the 1970’s Early names: J. Holland, K. DeJong, D. Goldberg Typically applied to: – discrete optimization.
Genetic Algorithms Author: A.E. Eiben and J.E. Smith
Genetic Algorithm in TDR System
Genetic Algorithm (GA)
Genetic Algorithms.
Introduction to Evolutionary Computing
Basics of Genetic Algorithms (MidTerm – only in RED material)
GENETIC ALGORITHMS & MACHINE LEARNING
Genetic Algorithms Chapter 3.
Basics of Genetic Algorithms
Searching for solutions: Genetic Algorithms
Population Based Metaheuristics
Presentation transcript:

Introduction to Evolutionary Algorithms Lecture 1 Jim Smith University of the West of England, UK May/June 2012

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Contents Why do we need good heuristics? Recap of Evolutionary Metaphor Basic scheme of an EA Basic Components: The Simple Genetic Algorithm (SGA)

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Why do we need metaheuristics? Some brief Computer Science… Combinatorial problems have a finite (or countably infinite) number of solutions Tend to analyse the worst case runtime of an algorithm for an instance of a problem Divide problems according to whether we can – find a solution (or say that we can’t) in polynomial time – Verify a solution in polynomial time

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 All the interesting problems are NP Example: Subset Sum Problem – Given some set of integers, is there a subset that sums to zero? – Can’t say no without checking all subsets (worse than polynomial) – But verifying a solution is trivial NP Complete: problem is in NP and all other problems in NP can be reduced to it in polynomial time. NP hard: verifying is also non-polynomial

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Million Dollar Question? Which is true? or

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 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 *, but may run in super- polynomial time (if P ≠ NP) Heuristic Approaches (generate and test) – rules for deciding which x  S to generate next – no guarantees that best solutions found are globally optimal

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 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

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Darwinian Evolution 1: Survival of the fittest All environments have finite resources (i.e., can only support a limited number of individuals) Lifeforms have basic instinct/ lifecycles geared towards reproduction Therefore some kind of selection is inevitable Those individuals that compete for the resources most effectively have increased chance of reproduction – Note: fitness in natural evolution is a derived, secondary measure, i.e., we (humans) assign a high fitness to individuals with many offspring

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Darwinian Evolution 2: Diversity drives change Phenotypic traits: – Behaviour / physical differences affect response to environment – Determined by: inheritance, factors during development,.... – Unique to each individual, If phenotypic traits : – Lead to higher chances of reproduction, and – Can be inherited then – they will tend to increase in subsequent generations, – leading to new combinations of traits …

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Darwinian Evolution:Summary Population consists of diverse set of individuals Combinations of traits that are better adapted tend to increase representation in population Individuals are “units of selection” Variations occur through random changes yielding constant source of diversity, coupled with selection means that: Population is the “unit of evolution” Note the absence of “guiding force”

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 EVOLUTION Environment Individual Fitness The Main Evolutionary Computing Metaphor PROBLEM SOLVING Problem Candidate Solution Quality Quality  chance for seeding new solutions Fitness  chances for survival and reproduction

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 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

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Recap 2: 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 acts as a force pushing quality.

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 General Scheme of EAs

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Pseudo-code for typical EA

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Representations Candidate solutions (individuals) exist in phenotype space They are encoded in chromosomes, which exist in genotype space – 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) In order to find the global optimum, every feasible solution must be represented in genotype space

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Genotype space = {0,1} L Phenotype space Encoding (representation) Decoding (inverse representation) Example: Binary Representation

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Evaluation (Fitness) Function Represents the requirements that the population should adapt to 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

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Population Holds (representations of) possible solutions Usually has a fixed size and is a multiset of genotypes 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)

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Parent Selection Mechanism Assigns variable probabilities of individuals acting as parents depending on their fitnesses Usually probabilistic – high quality solutions more likely to become parents than low quality – but not guaranteed – even worst in current population usually has non- zero probability of becoming a parent This stochastic nature can aid escape from local optima

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Variation Operators Role is 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 There has been much debate about relative importance of recombination and mutation – Nowadays most EAs use both – Choice of particular variation operators is representation dependant

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Mutation Acts on one genotype and delivers another Element of randomness is essential and differentiates it from e.g., Local search Importance ascribed depends on representation and 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

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Recombination 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

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 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 – Fitness based : e.g., rank parents+offspring and take best – Age based: make as many offspring as parents and delete all parents Sometimes do combination (elitism)

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 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

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 What are the different types of EAs Historically different flavours of EAs have been associated with different representations – 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

Genetic Algorithms The Simple GA

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 GA Quick Overview Developed: USA in the 1970’s Early names: J. Holland, K. DeJong, D. Goldberg Typically applied to: – discrete optimization Attributed features: – not too fast – good heuristic for combinatorial problems Special Features: – Traditionally emphasizes combining information from good parents (crossover) – many variants, e.g., reproduction models, operators

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Genetic algorithms Holland’s original GA is now known as the simple genetic algorithm (SGA) Other GAs use different: – Representations – Mutations – Crossovers – Selection mechanisms

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 SGA technical summary tableau RepresentationBinary strings RecombinationN-point or uniform MutationBitwise bit-flipping with fixed probability Parent selectionFitness-Proportionate Survivor selectionAll children replace parents SpecialityEmphasis on crossover

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 SGA reproduction cycle 1.Select parents for the mating pool (size of mating pool = population size) 2.Shuffle the mating pool 3.For each consecutive pair apply crossover with probability p c, otherwise copy parents 4.For each offspring apply mutation (bit-flip with probability p m independently for each bit) 5.Replace the whole population with the resulting offspring

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 SGA operators: 1-point crossover Choose a random point on the two parents Split parents at this crossover point Create children by exchanging tails P c typically in range (0.6, 0.9)

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 SGA operators: mutation Alter each gene independently with a probability p m p m is called the mutation rate – Typically between 1/pop_size and 1/ chromosome_length

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Main idea: better individuals get higher chance – Chances proportional to fitness – Implementation: roulette wheel technique Assign to each individual a part of the roulette wheel Spin the wheel n times to select n individuals SGA operators: Selection fitness(A) = 3 fitness(B) = 1 fitness(C) = 2 A C 1/6 = 17% 3/6 = 50% B 2/6 = 33%

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 The simple GA Has been subject of many (early) studies – still often used as benchmark for novel GAs Shows many shortcomings, e.g. – Representation is too restrictive – Mutation & crossovers only applicable for bit-string & integer representations – Selection mechanism sensitive for converging populations with close fitness values – Generational population model (step 5 in SGA repr. cycle) can be improved with explicit survivor selection

Introduction to Evolutionary Computation, Jim Smith Seminars at UNESP May/June 2012 Summary Many / most interesting combinatorial problems are variants of well known NP problems – So exact methods cannot scale (unless P=NP) Evolutionary Algorithms are population based stochastic global search methods – Darwinian Metaphor (but we know it works) – Fitness-based selection for reproduction/survival – Recombination & mutation to create offspring Simple Genetic Algorithm as an example for binary representations