EASy 12 October 2009Artificial Life Lecture 21 Evolution and Genetic Algorithms The original definition of Artificial Life, by Langton and others, concentrated.

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

12 October 2010Artificial Life Lecture 31 Artificial Life lecture 3 More on Evolutionary Algorithms In Lecture 2 we covered the basics of evolution and.
Biologically Inspired Computing: Operators for Evolutionary Algorithms
Tuesday, May 14 Genetic Algorithms Handouts: Lecture Notes Question: when should there be an additional review session?
Genetic Algorithms Representation of Candidate Solutions GAs on primarily two types of representations: –Binary-Coded –Real-Coded Binary-Coded GAs must.
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.
EvoNet Flying Circus Introduction to Evolutionary Computation Brought to you by (insert your name) The EvoNet Training Committee The EvoNet Flying Circus.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Evolutionary Computational Intelligence
Introduction to Genetic Algorithms Yonatan Shichel.
EASy Summer 2006Non-Symbolic AI lecture 31 More on Evolutionary Algorithms Last lecture discussed encoding real numbers as bits on a genotype (either binary.
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Tutorial 1 Temi avanzati di Intelligenza Artificiale - Lecture 3 Prof. Vincenzo Cutello Department of Mathematics and Computer Science University of Catania.
CS 447 Advanced Topics in Artificial Intelligence Fall 2002.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2004.
Chapter 6: Transform and Conquer Genetic Algorithms The Design and Analysis of Algorithms.
The Standard Genetic Algorithm Dr. Chrisantha Fernando Systems Biology Centre University of Birmingham Dr. Chrisantha Fernando Systems Biology Centre University.
Genetic Programming. Agenda What is Genetic Programming? Background/History. Why Genetic Programming? How Genetic Principles are Applied. Examples of.
Genetic Algorithms Overview Genetic Algorithms: a gentle introduction –What are GAs –How do they work/ Why? –Critical issues Use in Data Mining –GAs.
Genetic Algorithm.
Evolutionary Intelligence
1 An Overview of Evolutionary Computation 조 성 배 연세대학교 컴퓨터과학과.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Evolution Strategies Evolutionary Programming Genetic Programming Michael J. Watts
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
What is Genetic Programming? Genetic programming is a model of programming which uses the ideas (and some of the terminology) of biological evolution to.
Genetic algorithms Charles Darwin "A man who dares to waste an hour of life has not discovered the value of life"
Introduction to Evolutionary Algorithms Session 4 Jim Smith University of the West of England, UK May/June 2012.
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.
1 Machine Learning: Lecture 12 Genetic Algorithms (Based on Chapter 9 of Mitchell, T., Machine Learning, 1997)
GENETIC ALGORITHMS.  Genetic algorithms are a form of local search that use methods based on evolution to make small changes to a popula- tion of chromosomes.
© Negnevitsky, Pearson Education, Lecture 9 Evolutionary Computation: Genetic algorithms Introduction, or can evolution be intelligent? Introduction,
15/06/2003NORPIE 2004, Trondheim1 Genetic Optimization of Electric Machines, a State of the Art Study S. E. Skaar, R. Nilssen.
1 Genetic Algorithms K.Ganesh Introduction GAs and Simulated Annealing The Biology of Genetics The Logic of Genetic Programmes Demo Summary.
Introduction to Genetic Algorithms. Genetic Algorithms We’ve covered enough material that we can write programs that use genetic algorithms! –More advanced.
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.
Evolutionary Algorithms K. Ganesh Research Scholar, Ph.D., Industrial Management Division, Humanities and Social Sciences Department, Indian Institute.
1. Genetic Algorithms: An Overview  Objectives - Studying basic principle of GA - Understanding applications in prisoner’s dilemma & sorting network.
2101INT – Principles of Intelligent Systems Lecture 11.
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]
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
Selection and Recombination Temi avanzati di Intelligenza Artificiale - Lecture 4 Prof. Vincenzo Cutello Department of Mathematics and Computer Science.
CAP6938 Neuroevolution and Artificial Embryogeny Evolutionary Comptation Dr. Kenneth Stanley January 23, 2006.
1 Comparative Study of two Genetic Algorithms Based Task Allocation Models in Distributed Computing System Oğuzhan TAŞ 2005.
EVOLUTIONARY SYSTEMS AND GENETIC ALGORITHMS NAME: AKSHITKUMAR PATEL STUDENT ID: GRAD POSITION PAPER.
Genetic Algorithm. Outline Motivation Genetic algorithms An illustrative example Hypothesis space search.
 Presented By: Abdul Aziz Ghazi  Roll No:  Presented to: Sir Harris.
Introduction to Genetic Algorithms
Genetic Algorithm in TDR System
Dr. Kenneth Stanley September 11, 2006
Evolution Strategies Evolutionary Programming
USING MICROBIAL GENETIC ALGORITHM TO SOLVE CARD SPLITTING PROBLEM.
Evolution strategies Can programs learn?
Genetic Algorithms, Search Algorithms
Basics of Genetic Algorithms (MidTerm – only in RED material)
GENETIC ALGORITHMS & MACHINE LEARNING
Genetic Algorithms Chapter 3.
Basics of Genetic Algorithms
Non-Symbolic AI Lecture 2
Biologically Inspired Computing: Operators for Evolutionary Algorithms
Presentation transcript:

EASy 12 October 2009Artificial Life Lecture 21 Evolution and Genetic Algorithms The original definition of Artificial Life, by Langton and others, concentrated on what counted as a synthesis of (effectively) living artefacts, without regard to origins or evolution. Despite this, very quickly a high proportion of Alife work came to be dependent on some form of evolutionary ideas.

EASy 12 October 2009Artificial Life Lecture 22 Biological Evolution For biological evolution, see the ‘Darwinian Evolution' lectures. Tue 15:00 AND Fri 11:00 in CHI-LecTheatre (recommended!) Read (strongly recommended, readable and fresh) the original C. Darwin 'On the Origin of Species‘ Also John Maynard Smith 'The Theory of Evolution' Richard Dawkins 'The Selfish Gene' etc. M Ridley “Evolution” – (textbook)

EASy 12 October 2009Artificial Life Lecture 23 EvolutionEvolution The context of evolution is a population (of organisms, objects, agents...) that survive for a limited time (usually) and then die. Some produce offspring for succeeding generations, the 'fitter' ones tend to produce more. Over many generations, the make-up of the population changes. Without the need for any individual to change, successive generations, the 'species' changes, in some sense (usually) adapts to the conditions.

EASy 12 October 2009Artificial Life Lecture 24 3 Requirements HEREDITY - offspring are (roughly) identical to their parents VARIABILITY - except not exactly the same, some significant variation SELECTION - the 'fitter' ones are likely to have more offspring

EASy 12 October 2009Artificial Life Lecture 25 SelectionSelection Variability is usually random and undirected Selection is usually unrandom and directed In natural evolution the 'direction' of selection does not imply a conscious Director -- cf Blind Watchmaker. In artificial evolution often you are the director.

EASy 12 October 2009Artificial Life Lecture 26 Neo-DarwinismNeo-Darwinism Darwin invented the theory of evolution without any modern notion of genetics - that waited until Mendel's contributions were recognised. neo-Darwinian theory = Darwin + Mendel + some maths (eg Fisher, Haldane, Sewall Wright)

EASy 12 October 2009Artificial Life Lecture 27 (Artificial) Genetics In Genetic Algorithm (GA) terminology, the genotype is the full set of genes that any individual in the population has. The phenotype is the individual potential solution to the problem, that the genotype 'encodes'. So if you are evolving with a GA the control structure, the 'nervous system' of a robot, then the genotype could be a string of 0s and 1s and the phenotype would be the actual architecture of the control system which this genotype encoded.

EASy 12 October 2009Artificial Life Lecture 28 Possible examples … You could be evolving for optimal timetables genotype: string listing room/student allocations fitness: (negative) number of clashes Or for optimal aircraft wing design genotype: string listing various wing dimensions fitness: formula based on lift/drag/cost of wing Or for … … … …

EASy 12 October 2009Artificial Life Lecture 29 An example It is up to you to design an appropriate encoding system. Eg. Evolving paper gliders Fold TL to BR towards you Fold horiz middle away Fold vertical middle towards Fold TR to BL towards you Fold horiz middle away Fold vertical middle away

EASy 12 October 2009Artificial Life Lecture 210 Evolving paper gliders 1.Generate 20 random sequences of folding instructions 2.Fold each piece of paper according to instructions written on them 3.Throw them all out of the window 4.Pick up the ones that went furthest, look at the instrns 5.Produce 20 new pieces of paper, writing on each bits of sequences from parent pieces of paper 6.Repeat from (2) on.

EASy 12 October 2009Artificial Life Lecture 211 Basic Genetic Algorithm

EASy 12 October 2009Artificial Life Lecture 212 Basic GA -- continued represents a genotype, string of characters, which encodes a possible solution to problem Current popn Evaluate all fitnesses Select fitter for parents Produce offspring from parents

EASy 12 October 2009Artificial Life Lecture 213 RecombinationRecombination Typically 2 parents recombine to produce an offspring Parents offspring 1-point crossover 2-point crossover Uniform crossover = 50/50 at each locus

EASy 12 October 2009Artificial Life Lecture 214 MutationMutation After an offspring has been produced from two parents (if sexual GA) or from one parent (if asexual GA) Mutate at randomly chosen loci with some probability Locus = a position on the genotype

EASy 12 October 2009Artificial Life Lecture 215 A trivial example Max-Ones – you have to find the string of 10 bits that matches as closely as possible this string: … and yes, clearly the answer will be , but pretend that you don’t know this. A fitness function:- int evaluate(int *g) { int i,r=0; for (i=0;i<10;i++) r += (g(i) == 1); return(r); }

EASy 12 October 2009Artificial Life Lecture 216 Program structure Initialise a population of (eg) 30 strings of length 10 int popn[30][10]; void initialise_popn() { int i,j; for (i=0;i<30;i++) for (j=0;j<10;j++) popn[i][j]= flip_a_bit(); }

EASy 12 October 2009Artificial Life Lecture 217 Main Program Loop For n times round generation loop evaluate all the population (of 30) select preferentially the fitter ones as parents for 30 times round repro loop pick 2 from parental pool recombine to make 1 offspring mutate the offspring end repro loop throw away parental generation and replace with offspring End generation loop

EASy 12 October 2009Artificial Life Lecture 218 Variant GA methods We have already mentioned different recombination (crossover) methods - 1-pt, 2-pt, uniform. You can have a GA with no recombination -- asexual with mutation only. Mutation rates can be varied, with effects on how well the GA works. Population size -- big or small? (Often )

EASy 12 October 2009Artificial Life Lecture 219 Selection Methods Eg. Truncation Selection. All parents come from top-scoring 50% (or 20% or..) A different common method: Fitness-proportionate If fitnesses of (an example small) population are 2 and 5 and 3 and 7 and 4 total 21 then to generate each offspring you select mum with 2/21 5/21 3/21 7/21 4/21 probability and likewise to select dad. Repeat for each offspring.

EASy 12 October 2009Artificial Life Lecture 220 Different Selection Methods Problems with fitness-proportionate: How about negative scores ? How about if early on all scores are zero (or near-zero) bar one slightly bigger -- then it will 'unfairly' dominate the parenting of next generation? How about if later on in GA all the scores vary slightly about some average (eg 1020, 1010, 1025, ) then there will be very little selection pressure to improve through these small differences? You will see in literature reference to scaling (eg sigma-scaling) to get around these problems.

EASy 12 October 2009Artificial Life Lecture 221 Rank Selection With linear rank selection you line up all in the population according to rank, and give them probabilities of being selected-as-parent in proportion: Best … … … … worst

EASy 12 October 2009Artificial Life Lecture 222 More Rank Selection Note with linear rank selection you ignore the absolute differences in scores, focus purely on ranking. The 'line' in linear ranking need not slope from 2.0 to 0.0, it could eg slope from 1.5 to 0.5. You could have non-linear ranking. But the most common way (I recommend unless you have good reasons otherwise) is linear slope from 2.0 to 0.0 as shown. This means that the best can expect to have twice as many offspring as the average. Even below-average have a sporting chance of being parents.

EASy 12 October 2009Artificial Life Lecture 223 ElitismElitism Many people swear by elitism (...I don't!) Elitism is the GA strategy whereby as well as producing the next generation through whichever selection, recombination, mutation methods you wish, you also force the direct unmutated copy of best-of-last generation into this generation -- 'never lose the best'.

EASy 12 October 2009Artificial Life Lecture 224 Demes / Geographical breeding Brief mention here (more later): One population quickly becomes fairly genetically converged, and thereafter tends to search just ‘one corner’ of the search space. Multiple populations may search multiple corners – but be different evolutionary runs. Maybe you can get the best of both worlds by having multiple sub-populations, with some form of limited breeding between.

EASy 12 October 2009Artificial Life Lecture 225 Genotype Encoding Often genotypes in GA problems have discrete characters from a finite alphabet at each locus. Eg. 0s and 1s for a binary genotype a bit like real DNA which has 4 characters GCAT These often make sense with simple encodings of strategies, or connectivity matrices, or …

EASy 12 October 2009Artificial Life Lecture 226 Coding for Real Numbers But sometimes you want to solve a problem with real numbers -- where a solution may include Obvious solution 1: binary encoding in a suitable number of bits. For 8-bit accuracy, specify max and min possible values of the variable to be coded. Divide this range by 256 points. Then genes to can be decoded as 8-bit numbers, interpolated into this range.

EASy 12 October 2009Artificial Life Lecture 227 Coding for Many Real numbers For eg 10 such real-valued variables, stick 10 such genes together into a genotype 80 bits long. You may only need 4-bit or 6-bit accuracy, or whatever is appropriate to your problem. A problem with binary encoding is that of ' Hamming cliffs ‘ An 8-bit binary gene encodes the next value to yet despite being close in real values, these genes lie 8 mutations apart (a Hamming distance of 8 bits)

EASy 12 October 2009Artificial Life Lecture 228 Gray Coding This is a 1-1 mapping which means that any 2 adjoining numbers are encoded by genes only 1 mutation apart (tho note reverse is not true!) -- no Hamming Cliffs Rule of thumb to translate binary to Gray: Start from left, copy the first bit, thereafter when digit changes write 1 otherwise write 0. Example with 3 bit numbers :-- Bin Actual Gray

EASy 12 October 2009Artificial Life Lecture 229 Other Evolutionary Algorithms Note that GAs are just one type of evolutionary algorithm, and possibly not the best for particular purposes, including for encoding real numbers. GAs were invented by John Holland around 1960s Others you will come across include: EP Evolutionary Programming originally Fogel Owens and Walsh, now David Fogel = Fogel Jr.

EASy 12 October 2009Artificial Life Lecture 230 And more … ES Evolution Strategies invented in Germany Rechenberg, Hans-Paul Schwefel Especially for optimisation, real numbers GP Genetic Programming Developed by John Koza (earlier version by N Cramer). Evolving programs, usually Lisp-like, wide publicity.

EASy 12 October 2009Artificial Life Lecture 231 Which is best ? Is there a universal algorithm ideal for all problems -- NO !! (cf 'No Free Lunch Theorem, Wolpert and MacReady) Are some algorithms suitable for some problems -- PROBABLY YES. Is this a bit of a Black Art, aided by gossip as to what has worked well for other people -- YES!

EASy 12 October 2009Artificial Life Lecture 232 Recommendation … For Design Problems, encoding discrete symbols eg binary, rather than reals, my own initial heuristic is: GA (usually steady state rather than generational…) selection: linear rank based, slope 2.0 to 0.0 sexual, uniform recombination mutation rate very approx 1 mutation per (non-junk part of) genotype Elitism not necessary population size In fact I always use a version of the Microbial one-liner GA (Lec 3) But others will disagree...

EASy 12 October 2009Artificial Life Lecture 233 Sources of Information David Goldberg 1989 "Genetic Algorithms in Search, Optimization and Machine Learning" Addison Wesley Melanie Mitchell and Stephanie Forrest "Genetic Algorithms and Artificial Life". Artificial Life v1 no3 pp , Melanie Mitchell "An Intro to GAs" MIT Press 1998 Z Michalewicz "GAs + Data Structures = Evolution Programs" Springer Verlag 1996

EASy 12 October 2009Artificial Life Lecture 234 More … plus many many more sources eg… news group comp.ai.genetic Be aware that there are many different opinions – and a lot of ill- informed nonsense. Make sure that you distinguish GAs from EP ES GP.

EASy 12 October 2009Artificial Life Lecture 235 Advance Notice: Next Lecture Tue Oct 13 th : Lecture 3 “More on Evolutionary Algorithms”, including the Microbial GA in one line of code.

EASy 12 October 2009Artificial Life Lecture 236 General Stuff Information on lectures and seminars here: Alergic talks, typically Wed 16:30 in ARUN-401, first one this week - -- opening session, new and existing researchers Other discussion groups: Life and Mind, etc … … COGS talks: Check out details for this week’s seminars