Umeå University Department of Computing Science Emergent systems Spring-13 Evolutionary methods and game theory http://www.cs.umu.se/kurser/5DV017 Last time ❒ Genetics and evolution ❒ Genetic algorithms 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU Outline for today ❒ How do GA’s work? ❒ Evolutionary computation ❍ Overview ❒ Genetic programming ❒ Aspects of evolution ❒ Classifier systems ❒ General on cooperation ❒ Game theory 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU 1
GA – The Schema Theorem (Holland, 1975) ❒ How do genetic algorithm’s work? ❒ Schema ❍ “Building blocks” ❍ Bit strings of 0, 1, * ❍ E.g. H = 1 ****1 • H = “Hyper plane” (“planes” of various dimensions) • Represents all strings that start and end with 1 • 111111 is an instance of H 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU GA – The Schema Theorem (2) ❒ There are 2 n possible bit strings of length n , and thus 2^2 n possible subsets of strings, but there are only 3 n possible schemas ❍ Every possible subset of n –bit strings can not be describe as a schema ❒ Any given bit string of length n is an instance of 2 n different schemas ❍ Each population of n strings contains instances of between 2 n and n x 2 n different schemas ❍ That is, in each generation, while the GA is explicitly evaluating the fitness of the n strings, it is actually implicitly estimating the average fitness of a much larger number of schemas 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU GA – The Schema Theorem (3) ❒ The formulas… ❍ See the excerpt ❒ The schema theorem describes the growth of a schema from one generation to the next ❒ Short, low-order schemas is favored ❒ Implicit parallelism ❍ Many schemas is simultaneously implicitly evaluated ❒ Mutation prevents the loss of diversity at a given bit position 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU 2
Evolutionary Computation - History ❒ AI and ALife ❍ Alan Turing, John von Neumann, Norbert Wiener ❍ Self-replicate and adaptivity ❒ Evolutionary programming ❍ Fogel, Owens, and Walsh (1966) ❍ Differs from genetic algorithms in three ways: • Representation: not constrained to be a string • No crossover • Different form of mutation, and typically reduced rate of mutation during a run ❒ Evolution strategies ❍ Rechenberg (1965,1973), Schwefel (1975,1977) ❍ Independently developed ❍ Slightly different way of selection and mutation compared to EP ❍ Recombination is possible 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU Evolutionary Computation - History ❒ Genetic algorithms ❍ John Holland (1960s) ❒ Classifier Systems ❍ John Holland (1976 ?) ❍ A cross between a Post production system, a genetic algorithm, and a market economy ❍ A hybrid nature: Both evolution and learning ❒ Genetic programming ❍ John Koza (1992) ❍ Evolving of whole programs ❍ Resembles GA, but program fragments are used instead of strings ❍ LISP 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU The No Free Lunch Theorem ❒ ”The NFL theorem states that over all possible search spaces, all methods perform equally well, including the simple technique of randomly guessing.” – Flake ❒ No single method of optimization is best for all applications ❒ Evolutionary algorithms performs relatively well when: ❍ there is a large number of parameters to be determined ❍ the surface of solutions is complex, having many intermediate optima 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU 3
Genetic Programming ❒ An attempt to deal with one of the central questions in computer science (posed by Arthur Samuel in 1959), namely ❍ How can computers learn to solve problems without being explicitly programmed? In other words, how can computers be made to do what needs to be done, without being told exactly how to do it? ❒ Any computer program can be graphically depicted as an rooted point-labeled tree with ordered branches ❒ The search space in genetic programming is the space of all possible computer programs composed of functions and terminals appropriate to the problem domain 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU Genetic Programming - Steps ❒ In applying genetic programming to a problem, there are five major preparing steps: ❍ The set of terminals ❍ The set of primitive functions ❍ The fitness measure ❍ The parameters for controlling the run ❍ The method for designating a result and the criterion for terminating a run ❒ Start with an initial population of randomly generated computer programs 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU Genetic Programming - Example ❒ Koza, Rice, and Roughgarden (1992) ❒ Foraging strategies of Anolis lizards ❒ Questions: ❍ ”What makes for an optimal foraging strategy?” ❍ ”How can an evolutionary process assemble strategies that require complex calculations from simple components?” 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU 4
Genetic Programming - Example ❒ Four variables: ❍ The abundance a of insects ❍ The sprint velocity v of the lizard ❍ The coordinate x , y of the insect in the lizard’s view ❒ A strategy is a function of these variables that returns 1 or -1 ❒ The goal: A function that maximizes food capture per unit time 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU Genetic Programming - Example ❒ 10 x 20 meter viewing area (fig 1a) ❍ Region 1: Insects always escape ❍ Region 2: Insects never escape ❍ Region 3: Insects escape with probability zero on the x axis and linearly increasing with the angle to a maximum of 0.5 on the y axis ❒ Result, the best individual at generation ❍ 0 (fig 1b) ❍ 12 (fig 1c) ❍ 46 (fig 1d) 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU Genetic Algoritms – Example: Coevolution ❒ Hillis (1990) ❒ Host-parasite coevolution ❒ Adaptation in a static environment results in ❍ loss of diversity ❍ overfit solutions ❒ Problem: ❍ Evolving minimal sorting networks for sorting lists with a fixed number n of elements ❍ Ex: (3,8), (14,8), (4,9), ... ❍ With n = 16, best known solution is 60 comparisons 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU 5
GA – Example: Coevolution ❒ Hillis used a GA ❒ Two criteria for networks in the population ❍ Small size, implicitly favored through the encoding ❍ Correctness, explicitly through the fitness function ❒ The fitness of a network, equal to the percentage of correctly sorted cases ❒ Spatial implementation, each individual were placed on a two-dimensional lattice ❒ Result (with static environment): ❍ The GA got stuck on local optima ❍ 65 comparisons 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU GA – Example: Coevolution ❒ Reason: ❍ After a while the test cases were not challenging enough ❒ Solution: ❍ Let the test cases evolve ❍ The network’s fitness was the percentage of test cases in the parasite that it sorted correctly ❍ The fitness of the parasite was the percentage of its test cases that the network sorted incorrectly ❒ New result: ❍ 61 comparisons 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU The Blind Watchmaker ❒ 40% of all Americans (25% of college- educated Americans) do not believe in Darwinian evolution (M. Mitchell, 1999) ❒ Only 40% of all Americans accept the evolution theory (Aftonbladet, 090201) ❒ Richard Dawkins (1996) ❒ ”Biomorphs” ❍ A way to teach how evolution works ❒ Variants ❍ SimLife ❍ Creatures 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU 6
Lamarckian Evolution ❒ ”... the evolution of traits that are modified through experience and passed on, in their modified form, to the genotype of the next generation” – M. Mitchell ❒ Not possible in natural systems ❒ But artificial systems can use it ❍ Needs a mean for adapting within a generation ❍ and a way of passing new gains to the genotype of the next generation 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU Lamarckian Evolution ❒ Often more effective than Darwin evolution in static environments ❍ Each individual can try out many possibilities in each generation ❒ But, not so effective when the environment is dynamic 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU Classifier Systems ❒ Adaptation ❍ Learning – in the lifetime of the agent ❍ Evolution – across generations ❒ What about adaptation in systems between learning and evolution ❍ Culture ❍ Social ❍ Economic ❒ Classifier systems combine ❍ Genetic algorithms ❍ Environmental feedback ❍ Simple reinforcement learning 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU 7
Feedback and Control ❒ Visible features usually correspond to a subset of environment ❒ Reinforcement ❍ What differs adaptive systems from non-adaptive ❒ Delayed rewards and punishments ❒ How does one find the optimal controller? 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU Classifier Systems ❒ Rules ❍ if condition then action ❒ Classifier systems ❍ Are mostly used to control-like problems ❍ Almost never ”programmed” 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU Classifier Systems ❒ A classifier system consist of ❍ List of classifiers • condition : message : strength • Ex: 1#0#:1001:37 ❍ List of messages • Messages describe the ”current” environment • Temporary storage space • Actions to take ❍ Detectors • Sensory organs, post on the message list ❍ Effectors • Can be used to modify the environment 18/2 - 13 Emergent Systems, Jonny Pettersson, UmU 8
Recommend
More recommend