Artificial Life Lecture 14 EASy. Genetic Programming. EASy. GP EASy. GP solution to to problem 1. EASy. Picturing a Lisp program EASy

Similar documents
Plan for today GENETIC ALGORITHMS. Randomised search. Terminology: The GA cycle. Decoding genotypes

GENETIC ALGORITHMS. Narra Priyanka. K.Naga Sowjanya. Vasavi College of Engineering. Ibrahimbahg,Hyderabad.

EVOLUTIONARY ALGORITHMS AT CHOICE: FROM GA TO GP EVOLŪCIJAS ALGORITMI PĒC IZVĒLES: NO GA UZ GP

College of information technology Department of software

Optimisation and Operations Research

Computational Intelligence Lecture 20:Intorcution to Genetic Algorithm

Part 1: Motivation, Basic Concepts, Algorithms

Genetic Algorithm: An Optimization Technique Concept

Evolutionary Computation. Lecture 3. Evolutionary Computation. X 2 example: crossover. x 2 example: selection

Introduction to Artificial Intelligence. Prof. Inkyu Moon Dept. of Robotics Engineering, DGIST

Introduction To Genetic Algorithms

Genetic algorithms. History

Genetic Algorithms and Genetic Programming Lecture 14

Evolutionary Computation

10. Lecture Stochastic Optimization

Evolutionary Algorithms - Population management and popular algorithms Kai Olav Ellefsen

GENETIC ALGORITHM BASED APPROACH FOR THE SELECTION OF PROJECTS IN PUBLIC R&D INSTITUTIONS

Evolutionary Algorithms

CSE /CSE6602E - Soft Computing Winter Lecture 9. Genetic Algorithms & Evolution Strategies. Guest lecturer: Xiangdong An

Machine Learning: Algorithms and Applications

Intro. ANN & Fuzzy Systems. Lecture 36 GENETIC ALGORITHM (1)

Evolutionary Computation. Lecture 1 January, 2007 Ivan Garibay

What is Genetic Programming(GP)?

What is Evolutionary Computation? Genetic Algorithms. Components of Evolutionary Computing. The Argument. When changes occur...

Artificial Evolution. FIT3094 AI, A-Life and Virtual Environments Alan Dorin

COMPARATIVE STUDY OF SELECTION METHODS IN GENETIC ALGORITHM

Deterministic Crowding, Recombination And Self-Similarity

Machine Learning. Genetic Algorithms

Machine Learning. Genetic Algorithms

Design and Implementation of Genetic Algorithm as a Stimulus Generator for Memory Verification

The Metaphor. Individuals living in that environment Individual s degree of adaptation to its surrounding environment

VISHVESHWARAIAH TECHNOLOGICAL UNIVERSITY S.D.M COLLEGE OF ENGINEERING AND TECHNOLOGY. A seminar report on GENETIC ALGORITHMS.

Generational and steady state genetic algorithms for generator maintenance scheduling problems

Genetic Algorithms. Moreno Marzolla Dip. di Informatica Scienza e Ingegneria (DISI) Università di Bologna.

Intelligent Techniques Lesson 4 (Examples about Genetic Algorithm)

TIMETABLING EXPERIMENTS USING GENETIC ALGORITHMS. Liviu Lalescu, Costin Badica

Comp215: Genetic Algorithms - Part 1

Genetic Programming for Symbolic Regression

Logistics. Final exam date. Project Presentation. Plan for this week. Evolutionary Algorithms. Crossover and Mutation

Evolutionary Algorithms

Dominant and Recessive Genes in Evolutionary Systems Applied to Spatial Reasoning

Keywords Genetic Algorithm (GA), Evolutionary, Representation, Binary, Floating Point, Operator

What is an Evolutionary Algorithm? Presented by: Faramarz Safi (Ph.D.) Faculty of Computer Engineering Islamic Azad University, Najafabad Branch

CEng 713 Evolutionary Computation, Lecture Notes

From Genetics to Genetic Algorithms

Introduction To Genetic Algorithms

Evolutionary Computation

Genetic Algorithms for Optimizations

An introduction to evolutionary computation

2. Genetic Algorithms - An Overview

Genetic'Algorithms'::' ::'Algoritmi'Genetici'1

Detecting and Pruning Introns for Faster Decision Tree Evolution

Immune Programming. Payman Samadi. Supervisor: Dr. Majid Ahmadi. March Department of Electrical & Computer Engineering University of Windsor

ESQUIVEL S.C., LEIVA H. A., GALLARD, R.H.

Gene Fragment Programming Master thesis

Feature Selection for Predictive Modelling - a Needle in a Haystack Problem

A Gene Based Adaptive Mutation Strategy for Genetic Algorithms

Adaptive Mutation with Fitness and Allele Distribution Correlation for Genetic Algorithms

Modularity, Product Innovation, and Consumer Satisfaction: An Agent-Based Approach

Evolutionary Algorithms - Introduction and representation Jim Tørresen

FacePrints, Maze Solver and Genetic algorithms

Genetic Algorithms and Shape Grammars

AGENT-BASED SIMULATION OF PRODUCT INNOVATION: MODULARITY, COMPLEXITY AND DIVERSITY

Introduction to Genetic Algorithm (GA) Presented By: Rabiya Khalid Department of Computer Science

Genetic Algorithms and Genetic Programming Lecture 13

Processor Scheduling Algorithms in Environment of Genetics

Selecting Genetic Algorithm Operators for CEM Problems

On the Evolutionary Behavior of Genetic Programming with Constants Optimization

Genetic Algorithm and Application in training Multilayer Perceptron Model

Genetic Algorithm. Presented by Shi Yong Feb. 1, 2007 Music McGill University

Energy management using genetic algorithms

GENETIC ALGORITHMS. Introduction to Genetic Algorithms

Short-term forecasting of GDP via evolutionary algorithms using survey-based expectations. Oscar Claveria Enric Monte Salvador Torra

IMPLEMENTATION OF AN OPTIMIZATION TECHNIQUE: GENETIC ALGORITHM

The genetic algorithm is simplied to a minimal form which retains selection, recombination

Genetic Algorithms. Part 3: The Component of Genetic Algorithms. Spring 2009 Instructor: Dr. Masoud Yaghini

Genetic Algorithm: A Search of Complex Spaces

Genetic algorithms and code optimization. A quiet revolution

Automated Test Case Generation: Metaheuristic Search

Comparative Study of Different Selection Techniques in Genetic Algorithm

CapSel GA Genetic Algorithms.

Genetic Algorithm for Variable Selection. Genetic Algorithms Step by Step. Genetic Algorithm (Holland) Flowchart of GA

Chapter 18. Meeting 18, Approaches: Genetic Algorithms

APPLICATION OF COMPUTER FOR ANALYZING WORLD CO2 EMISSION

initial set of random solutions called population satisfying boundary and/or system

Introduction Evolutionary Algorithm Implementation

Changing Mutation Operator of Genetic Algorithms for optimizing Multiple Sequence Alignment

PDGA: the Primal-Dual Genetic Algorithm

EMM4131 Popülasyon Temelli Algoritmalar (Population-based Algorithms) Introduction to Meta-heuristics and Evolutionary Algorithms

An introduction to genetic algorithms for neural networks

A Genetic Algorithm on Inventory Routing Problem

Grammatical Evolution. Santa Fe (Degeneracy) Santa Fe (No Degeneracy) Symbolic Regression (Degeneracy) Symbolic Regression (No Degeneracy)

Novel Encoding Scheme in Genetic Algorithms for Better Fitness

Genetic Algorithms and Genetic Programming Lecture 2. Syllabus Reminder. Admin Reminder

Using Multi-chromosomes to Solve. Hans J. Pierrot and Robert Hinterding. Victoria University of Technology

Genetic Algorithms. Lecture Overview. A Brief History. Evolutionary Computation. Biological Systems: A rough guide. Biological Systems: A rough guide

[Sharma* et al., 5(6): June, 2016] ISSN: IC Value: 3.00 Impact Factor: 4.116

Performance Analysis of Multi Clustered Parallel Genetic Algorithm with Gray Value

DEVELOPMENT OF MULTI-OBJECTIVE SIMULATION-BASED GENETIC ALGORITHM FOR SUPPLY CHAIN CYCLIC PLANNING AND OPTIMISATION

b. (3 points) The expected frequencies of each blood type in the deme if mating is random with respect to variation at this locus.

Transcription:

Artificial Life Lecture 14 14 Genetic Programming This will look at 3 aspects of Evolutionary Algorithms: 1) Genetic Programming GP 2) Classifier Systems 3) Species Adaptation Genetic Algorithms -- SAGA GP (a play on General Purpose) is a development of GAs where the genotypes are pretty explicitly pieces of computer code. This has been widely promoted by John Koza, in a series of books and videos, eg: Genetic Programming, John Koza, MIT Press 1992 Followed by volumes II and III Artificial Life Lecture 14 23 November 2009 1 Artificial Life Lecture 14 23 November 2009 2 GP GP solution to to problem 1 At first sight there are a number of problems with evolving program code, including Both these 2 problems were basically cracked in work that predated Koza: (1) How can you avoid genetic operators such as recombination and mutation completely screwing up any half-decent programs that might have evolved? (2) How can you evaluate a possible program, give it a fitness score? N. Cramer A representation for the adaptive generation of simple sequential programs In J Grefenstette (ed) Proc of Int Conf on Genetic Algorithms, Lawrence Erlbaum, 1985. (1) Use LISP-like programs, which can be easily pictured as rooted point-labelled trees with ordered branches. Artificial Life Lecture 14 23 November 2009 3 Artificial Life Lecture 14 23 November 2009 4 Picturing a Lisp program Recombining 2 Lisp programs (OR (AND (NOT D_0) (NOT D_1)) (AND D_0 D_1) AND OR AND Picture each of 2 parent Lisp programs in tree form. Then recombination between 2 parents involves taking their 2 trees, choosing random points to chop off sub-trees, and swapping the sub-trees. NOT NOT D_0 D_1 This maintains the general form of a program, whilst swapping around the component parts of programs. D_0 D_1 Artificial Life Lecture 14 23 November 2009 5 Artificial Life Lecture 14 23 November 2009 6

Mutating a Lisp program GP solution to to problem 2 Mutation in GP is rarely used: "Nonetheless, it is important to recognize that the mutation operator is a relatively unimportant secondary operation in the conventional GA", says Koza (op. cit. p. 105), citing Holland 1975 and Goldberg 1989. How do you measure the fitness of a program? (this was the 2nd problem mentioned earlier) Usually, fitness is measured by considering a fixed number of test-cases where the correct performance of the program is known. When it is used, it operates by randomly choosing a subtree, and replacing it with a randomly generated new subtree. Put a number on the error produced for each test-case, sum up the (absolute) value of these errors => fitness. Artificial Life Lecture 14 23 November 2009 7 Artificial Life Lecture 14 23 November 2009 8 Normalising fitness A typical GP run Often there is some adjustment or normalisation, eg so that normalised fitness nf ranges within bounds 0 < nf < 1, increases for better individuals, and sum(nf)=1. Normalised fitness => fitness-proportionate selection has a large population, size 500 up to 640,000 runs for 51 generations (random initial + 50 more) has 90% crossover -- ie from a population of 500, 450 individuals (225 pairs) are selected (weighted towards fitter) to be parents and 10% selected for straight reproduction (copying) no mutation maximum limit on depths of new trees created selection is fitness-proportionate Artificial Life Lecture 14 23 November 2009 9 Artificial Life Lecture 14 23 November 2009 10 Different problems tackled by by GP Choice of of primitives Koza's GP books detail applications of GP to an enormous variety of problems. Eg finding formulas to fit data control problems (eg PacMan) evolution of subsumption architectures evolution of building blocks (ADF automatic definition of (sub-)functions) etc etc etc In each case the primitives, the basic symbols available to go into the programs, must be carefully chosen to be appropriate to the problem. Eg for PacMan: Advance-to-Pill Retreat-from-Pill Distance-to-Pill...... IFB(C D) IFLTE(A B C D) If monsters blue, do C, otherwise D If A<=B, do C, otherwise do D Artificial Life Lecture 14 23 November 2009 11 Artificial Life Lecture 14 23 November 2009 12

Criticism of of GP Lack of of success with partial recursion GP has been used with some success in a wide range of domains. There are some criticisms: Much of the work is in choice of primitives Successes have not been in General Purpose ('GP') programming -- very limited success with partial recursive programs (eg those with a DO_UNTIL command) The most complex partial recursive program done with GP faster than with random search (as far as I know) is Highest Common Divisor, by Lorenz Huelsbergen. This is a trivial program MOD(r0,r1); MUL(r2,r5); SUB(r1,r0); LSR(r3,r1); DEC(r10); JNZ(r0,-7); CLEAR(r11); OR(r2,r5); MUL(r10,r6); XOR(r5,r1); JNZ(r3,+15); JG(r0,+6); MUL(r4,r8); OR(r2,r5); J(+11); INC(r2); Artificial Life Lecture 14 23 November 2009 13 Artificial Life Lecture 14 23 November 2009 14 ADATE Wide and short, not long and thin Exception to this scepticism about evolving programs ADATE: Automatic Design of Algorithms Through Evolution Roland Olsson http://www-ia.hiof.no/~rolando/adate_intro.html GP practitioners such as Koza typically use very large populations such as 640,000 for only 51 generations. This is closer to random search than to evolution. Very WIDE and SHORT Impressive can e.g. do strstr() Significantly different from GP, and currently is probably the best such system around Artificial Life Lecture 14 23 November 2009 15 Artificial Life Lecture 14 23 November 2009 16 Classifier Systems More Classifier Systems Just a brief mention here of an alternative GA approach to evolving things-a-bit-like-programs. A classifier is an if-then rule such as 001##0:101010 # is interpreted as 'wild card' or 'dont-care' character There is a 'blackboard' with a starting set of strings such as 001000, and a set of classifiers can be applied to the strings on the blackboard. Any that match are replaced by the RHS of the classifiers -- then one starts again looking for new matches. This can be seen as a kind of program, which could (eg) be used for robot or agent control. So for example 001000 or 001110 both match the classifying condition 001##0 on the left. Artificial Life Lecture 14 23 November 2009 17 For further details see Goldberg (1989), or follow up useful citations on the comp.ai.genetics FAQ http://www.cs.cmu.edu/groups/ai/html/faqs/ai/genetic/top.html Artificial Life Lecture 14 23 November 2009 18

SAGA Long and thin, not wide and short SAGA, for Species Adaptation Genetic Algorithms, is in many respects the very opposite of GP. Papers on my web page http://www.informatics.susx.ac.uk/users/inmanh/ Best reference is: I. Harvey (2001): Artificial Evolution: A Continuing SAGA It is intended for very long term evolution, for design problems which inevitably take many many generations, quite possibly through incremental stepping-stones. So in contrast to GP, there is typically a relatively small population (30-100) for many generations (eg 1000s or 10,000s). 'Long and narrow' not 'wide and shallow' The population is very largely 'genetically converged' -- ie all members genetically very similar, like a plant or animal SPECIES. Artificial Life Lecture 14 23 November 2009 19 Artificial Life Lecture 14 23 November 2009 20 Mutation vs. Recombination Convergence (1) Mutation is the main genetic operator, adding diversity and change to the population. The term 'convergence' is often used in a confused way in the GA/GP literature. People fail to realise that it can be applied with at least two different meanings. Recombination is only secondary (though useful). This is completely contrary to the usual emphasis in GP (1) Genetic convergence -- when the genetic 'spread of the population has settled down to its 'normal' value, which is some balance between: selection of the fittest -> reduces spread, and mutation -> increases spread. Artificial Life Lecture 14 23 November 2009 21 Artificial Life Lecture 14 23 November 2009 22 Convergence (2) Monitoring Genetic Convergence (2) convergence of the fitness of the population onto its final value, or (very similarly) convergence of the 'search' of the popn onto its final resting-place. In sense (2) people talk of 'premature convergence', particularly when they are worried about the population converging onto a local optimum in the fitness landscape, one that is very different from the global optimum. A common, completely false, myth is that convergence in sense (1) implies convergence in sense (2). Artificial Life Lecture 14 23 November 2009 23 B is the point of convergence (defn 2), often after 'punctuated equilibria' A is the point of genetic convergence (defn 1), which may well be (surprisingly?) within the first 10 or so generations! Artificial Life Lecture 14 23 November 2009 24

Long term incremental evolution also long term non-incremental evolution SAGA was originally developed with a view to long term incremental evolution, where one would start with (relatively) short genotypes encoding (eg) relatively simple robot control systems... BUT though SAGA was originally developed with the view of long term incremental evolution (where genotype lengths probably increased from short, originally, to long and then even longer )... then over time evolution would move to longer genotypes for more complex control systems. It soon became apparent that the lessons of evolution-witha-genetically-converged species were ALSO applicable to any long term evolution, even if genotype lengths remain the same! In this long term evolution it is clear that the population will be genetically converged for all bar the very start Artificial Life Lecture 14 23 November 2009 25 Artificial Life Lecture 14 23 November 2009 26 Consequences of of convergence (1) Consequences of of convergence (2) It soon became apparent that even with fixed-length genotypes, one still has genetic convergence of the population from virtually the start -- even though this is not widely recognised. Evolution does not stop with a genetically-converged population (GCP) -- eg the human species, and our ancestors, have evolved as a GCP ( or species) for 4 billion years, with incredible changes. Consequences: recombination does not 'mix-and-match building blocks quite as expected -- because typically the bits swapped from mum are very similar to the equivalent from dad. Mutation is the main engine of evolutionary change, and should be set at an appropriate rate which to a first approximation (depending on selection) is: Artificial Life Lecture 14 23 November 2009 27 Artificial Life Lecture 14 23 November 2009 28 Optimal mutation rate for for Binary Genotypes NB: with REAL-valued genotypes it it is is different Binary alphabet or small alphabet eg DNA:- All the above advice is for Binary (or similar) genotypes A mutation at one locus is then a big change at that locus, 0 -> 1 or 1-> 0 So you don t have/need many mutations 1 mutation in the expressed (non-junk) part of the genotype CF phages with 4500 'characters' in genotype have something of the order of 1 mutation per genotype And so do humans with 3,000,000,000 'characters But with real-valued genotypes, mutation at each locus will be a small creep-mutation, eg. 0.510 -> 0.514, or -> 0.504 So you need lots of such small mutations simultaneously, Cheap Method: add a 'creep' amount from suitable range eg [+0.1, -0.1] to *every* value Artificial Life Lecture 14 23 November 2009 29 Artificial Life Lecture 14 23 November 2009 30

More principled method mutating real values Why should there be be an an optimal mut-rate? Construct a vector in some random direction in n-space (where n is number of dimensions on genotype) and mutate by moving a small distance in this direction. HOW? ADD n component vectors, one along each axis, lengths drawn from a Gaussian distrn THEN normalise length of resultant vector to exactly 1.0; THEN multiply vector length by factor drawn from Gaussian distribution mean 0.0 std.dev. 0.1 (or suitable value); THIS is your mutation vector move by this much Artificial Life Lecture 14 23 November 2009 31 Mutation rate too low, in limit zero, would mean no further change, evolution ceases -> no good Mutation rate too high, eg every bit flipped at random, implies random search -> no good. Artificial Life Lecture 14 23 November 2009 32 What decides the ideal rate? So what is is SAGA? Some ideal rate (or range of rates) inbetween -- but where? Very rough version of argument: to a first approximation (tho not a 2nd!) at any stage in evolution some N bits of the genotype are crucial -- any mutations there are probably fatal -- while the rest is junk. The error threshold shows that maximum mutation rate survivable under these circumstances is of the order of 1 mutation in the N bits SAGA is not a specific GA, it is just a set of guidelines for setting the parameters of your GA when used on any long term evolutionary problem -- with or without change in genotype length 1) Expect the population to genetically converge within the very first few generations 2) Mutation is the important genetic operator Artificial Life Lecture 14 23 November 2009 33 Artificial Life Lecture 14 23 November 2009 34 SAGA ctd Any other implications? 3) Set the mutation rate to [if binary genotypes] something of the order of 1 mutation per non-junk element of the genotype. If abnormal selection pressures, for 1 substitute log(s) where S is the expected no. of offspring of the fittest member [real genotypes: different!] 4) Often there is quite a safe range of mutation rates around this value -- ie although it is important to be in the right ballpark, exact value not too critical 5) Recombination generally assists evolution a bit 6) Expect fitness to carry on increasing for many many generations Yes, Neutral Networks may well be crucial -- as covered in a previous lecture and these SAGA ideas on mutation rates are completely consistent with such NNs. Time for Questions? Reminder: Before End of Term, give your feedback on Alife (and other courses) via Study Direct Artificial Life Lecture 14 23 November 2009 35 Artificial Life Lecture 14 23 November 2009 36