Evolutionary computation

Similar documents
Evolutionary Computation. DEIS-Cesena Alma Mater Studiorum Università di Bologna Cesena (Italia)

Evolutionary computation

Evolutionary Computation

Chapter 8: Introduction to Evolutionary Computation

Lecture 9 Evolutionary Computation: Genetic algorithms

The Role of Crossover in Genetic Algorithms to Solve Optimization of a Function Problem Falih Hassan

CSC 4510 Machine Learning

V. Evolutionary Computing. Read Flake, ch. 20. Genetic Algorithms. Part 5A: Genetic Algorithms 4/10/17. A. Genetic Algorithms

IV. Evolutionary Computing. Read Flake, ch. 20. Assumptions. Genetic Algorithms. Fitness-Biased Selection. Outline of Simplified GA

V. Evolutionary Computing. Read Flake, ch. 20. Assumptions. Genetic Algorithms. Fitness-Biased Selection. Outline of Simplified GA

Fundamentals of Genetic Algorithms

Lecture 22. Introduction to Genetic Algorithms

Search. Search is a key component of intelligent problem solving. Get closer to the goal if time is not enough

Evolutionary Algorithms

Crossover Techniques in GAs

Evolutionary Algorithms: Introduction. Department of Cybernetics, CTU Prague.

Genetic Algorithms & Modeling

Stochastic Search: Part 2. Genetic Algorithms. Vincent A. Cicirello. Robotics Institute. Carnegie Mellon University

Evolutionary Design I

Introduction to Evolutionary Computation

Lecture 15: Genetic Algorithms

Reproduction- passing genetic information to the next generation

[Read Chapter 9] [Exercises 9.1, 9.2, 9.3, 9.4]

Evolutionary Computation: introduction

Evolutionary Functional Link Interval Type-2 Fuzzy Neural System for Exchange Rate Prediction

The European Applied Business Research Conference Rothenburg, Germany 2002

NEUROEVOLUTION. Contents. Evolutionary Computation. Neuroevolution. Types of neuro-evolution algorithms

Data Warehousing & Data Mining

Evolutionary Algorithms: Introduction. The Czech Institute of Informatics, Robotics and Cybernetics CTU Prague

Evolving more efficient digital circuits by allowing circuit layout evolution and multi-objective fitness

Computational statistics

Development. biologically-inspired computing. lecture 16. Informatics luis rocha x x x. Syntactic Operations. biologically Inspired computing

how should the GA proceed?

Intelligens Számítási Módszerek Genetikus algoritmusok, gradiens mentes optimálási módszerek

Parallel Genetic Algorithms. Master s Thesis Laurens Jan Pit 30/08/95 Department of Computer Science Leiden University

Theory a well supported testable explanation of phenomenon occurring in the natural world.

Genetic Algorithms: Basic Principles and Applications

GENETIC ALGORITHM FOR CELL DESIGN UNDER SINGLE AND MULTIPLE PERIODS

Complexity in social dynamics : from the. micro to the macro. Lecture 4. Franco Bagnoli. Lecture 4. Namur 7-18/4/2008

Evolutionary Games and Computer Simulations

Haploid & diploid recombination and their evolutionary impact

Genetic Algorithms. Donald Richards Penn State University

Genetic Engineering and Creative Design

State of the art in genetic algorithms' research

Genetic Algorithm for Solving the Economic Load Dispatch

biologically-inspired computing lecture 18

1. T/F: Genetic variation leads to evolution. 2. What is genetic equilibrium? 3. What is speciation? How does it occur?

NUMERICAL SOLUTION FOR FREDHOLM FIRST KIND INTEGRAL EQUATIONS OCCURRING IN SYNTHESIS OF ELECTROMAGNETIC FIELDS

Competitive Co-evolution

Parallel Genetic Algorithms

Improving Coordination via Emergent Communication in Cooperative Multiagent Systems: A Genetic Network Programming Approach

Local Search & Optimization

Matt Heavner CSE710 Fall 2009

Statistical Models in Evolutionary Biology An Introductory Discussion

An Analysis of Diploidy and Dominance in Genetic Algorithms

Individual learning and population evolution

Sorting Network Development Using Cellular Automata

Computational intelligence methods

Symbolic Computation using Grammatical Evolution

Comparison of Evolutionary Methods for. Smoother Evolution. 2-4 Hikaridai, Seika-cho. Soraku-gun, Kyoto , JAPAN

Adaptive Generalized Crowding for Genetic Algorithms

Determination of Optimal Tightened Normal Tightened Plan Using a Genetic Algorithm

Haploid-Diploid Algorithms

A GENETIC ALGORITHM FOR FINITE STATE AUTOMATA

Bounding the Population Size in XCS to Ensure Reproductive Opportunities

Repeated Occurrences of the Baldwin Effect Can Guide Evolution on Rugged Fitness Landscapes

Microevolution Changing Allele Frequencies

Genetic Algorithms and Genetic Programming Lecture 17

Genetic Algorithm. Outline

Chapter 5 Evolution of Biodiversity

Genetic Learning of Firms in a Competitive Market

CS 331: Artificial Intelligence Local Search 1. Tough real-world problems

Complex Systems Theory and Evolution

Gecco 2007 Tutorial / Grammatical Evolution

Evolution of Neural Networks in a Multi-Agent World

Binary Particle Swarm Optimization with Crossover Operation for Discrete Optimization

Metaheuristics and Local Search

Mechanisms of Evolution

The Genetic Algorithm is Useful to Fitting Input Probability Distributions for Simulation Models

Major questions of evolutionary genetics. Experimental tools of evolutionary genetics. Theoretical population genetics.

Finding the Best Biological Pairwise Alignment Through Genetic Algorithm Determinando o Melhor Alinhamento Biológico Através do Algoritmo Genético

Mechanisms of Evolution Microevolution. Key Concepts. Population Genetics

Evolutionary Algorithms for the Design of Orthogonal Latin Squares based on Cellular Automata

DETECTING THE FAULT FROM SPECTROGRAMS BY USING GENETIC ALGORITHM TECHNIQUES

Evolution Strategies for Constants Optimization in Genetic Programming

Evolutionary Game Theory

THE EVOLUTION OF POPULATIONS THE EVOLUTION OF POPULATIONS

Using Genetic Algorithms to Develop Strategies for the Prisoners Dilemma

Evolution & Natural Selection

COMP3411: Artificial Intelligence 10a. Evolutionary Computation

Local Search & Optimization

Interplanetary Trajectory Optimization using a Genetic Algorithm

Genetic Algorithm: introduction

NOTES Ch 17: Genes and. Variation

Neural Systems and Artificial Life Group, Institute of Psychology, National Research Council, Rome. Evolving Modular Architectures for Neural Networks

Parallel/Distributed Evolutionary Computation The influence of spatial interaction in evolutionary behaviour

e.g. population: 500, two alleles: Red (R) and White (r). Total: 1000 genes for flower color in the population

AGENDA Go Over DUT; offer REDO opportunity Notes on Intro to Evolution Cartoon Activity

Zebo Peng Embedded Systems Laboratory IDA, Linköping University

Darwin s Observations & Conclusions The Struggle for Existence

Transcription:

Evolutionary computation Andrea Roli andrea.roli@unibo.it Dept. of Computer Science and Engineering (DISI) Campus of Cesena Alma Mater Studiorum Università di Bologna

Outline 1 Basic principles 2 Genetic algorithms Simple genetic algorithm Extensions of the SGA 3 Genetic programming 4 Notable examples GA and games Evolutionary robotics Automated design 5 References

Inspiring principle Evolutionary Computation is inspired by natural selection Three observations: Adaptation: organisms are suited to their habitats Inheritance: offspring resemble their parents Natural selection: new, adapted types of organisms emerge and those that fail to change adequately are subject to extinction

Key concepts The fittest individuals have a high chance of having a numerous offspring. The children are similar, but not equal, to the parents. The traits characterizing the fittest individuals spread across the population, generation by generation. EC techniques are not meant to simulate the biological evolutionary processes, but rather aimed at exploiting these key concepts for problem solving.

Evolutionary Computation Evolutionary Computation encompasses: Genetic algorithms Genetic programming Evolution strategies Estimation of distribution algorithms...

Main applications System design Neural network training Signal processing Optimization (discrete and continuous) Time series analysis and forecasting Artificial Life Games

Genetic Algorithms The Metaphor BIOLOGICAL EVOLUTION ARTIFICIAL SYSTEMS Individual A possible solution Fitness Quality Environment Problem

The Evolutionary Cycle SELECTION PARENTS POPULATION RECOMBINATION MUTATION REPLACEMENT/INSERTION OFFSPRING

Main genetic operators Recombination: combines the genetic material of the parents. Mutation: introduce variability in the genotypes. Selection: acts in the choice of parents whose genetic material is then reproduced with variations. Replacement/insertion: defines the new population from the new and the old one. EC algorithms define a basic computational procedure which uses the genetic operators. The definition of the genetic operators specifies the actual algorithm and depends upon the problem at hand.

Genetic Algorithms Developed by John Holland (early 70) with the aim of: Understand adaptive processes of natural systems Design robust (software) artificial systems Directly derived from the natural metaphor Very simple model Programming oriented

A bit of terminology A population is the set of individuals (possible solutions) Individuals are also called genotypes Chromosomes are made of units called genes The domain of values of a gene is composed of alleles (e.g., binary variable gene with two alleles)

Simple Genetic Algorithm Solutions are coded as bit strings CHROMOSOME Integer 0 1 1 0 0 1 0 1 1 1 GENE GENOTYPE Real Plan Rules... PHENOTYPE

Encoding examples Optimization of a function of integer variable x [0, 100]. Possible encodings: binary coding string of 7 bit; 4 bits per digit string of 12 bit. Optimization of a function of real variable y [0, 1[. Possible encoding: binary coding string

SGA genetic operators (1) Recombination or Crossover: cross-combination of two chromosomes (loosely resembling biological crossover) 0 1 1 0 0 1 0 1 1 1 0 1 1 0 0 1 0 0 1 0 1 1 0 1 0 0 0 0 1 0 1 1 0 1 0 0 0 1 1 1

SGA genetic operators (2) Mutation: each gene has probability p M of being modified ( flipped ) 0 1 1 0 0 1 0 1 1 1 0 1 1 0 0 1 0 0 1 1

SGA genetic operators (3) Proportional selection: the probability for an individual to be chosen is proportional to its fitness. Usually represented as a roulette wheel. 5% 10% 10% 25% 50% I 1 50 I 2 25 I 3 10 I 4 10 I 5 5

Genetic operators (4) Generational replacement: The new generation replaces entirely the old one. Advantage: very simple, computationally not expensive, easier theoretical analysis. Disadvantage: it might be that good solutions are not maintained in the new population.

SGA: High-level algorithm Initialize Population Evaluate Population while Termination conditions not met do while New population not completed do Select two parents for mating Copy their chromosomes {the parents are not deleted from the population} Apply crossover to produce two new individuals Apply mutation to each new individual end while Population New population Evaluate Population end while

Termination conditions Execution time limit reached. Satisfactory solution(s) have been obtained. Stagnation (limit case: the population converged to the same individual)

Example by hand 1/6 Problem: find the chromosome with minimal distance from 11... 1 The fitness is given by the number of bits with value 1 (one among many possible ways for defining it) Note: often, the fitness is normalised, so as to manage numbers in [0, 1]

Example by hand 2/6 We tackle the problem with a SGA with the following setting: length of chromosome n = 8 populations size popsize = 4 One-point crossover (always applied) Mutation: each bit has a probability p m of being flipped. We set p m = 1/n such that we have on average one flip per chromosome (there are of course many other ways to define it) Selection: proportional New generation obtained with generational replacement (according to the SGA scheme, the new population is the offspring)

Example by hand 3/6 Initial random population: 00010110 00011100 11001011 00001001 Evaluation (with fitness and corresponding probabilities): 00010110 : 3 : 3/13 00011100 : 3 : 3/13 11001011 : 5 : 5/13 00001001 : 2 : 2/13

Generate two new chromosomes: Example by hand 4/6 1) Select two chromosomes with a proportional rule: 00010110 : 3 : 3/13 11001011 : 5 : 5/13 2)Apply crossover (random crossover point): 000101.10 000101.11 -> 110010.11 110010.10 3)Apply mutation 00010111 -> 01010111 11001010 -> 01000010

Generate the other two chomosomes: Example by hand 5/6 1) Select two chromosomes with a proportional rule: 11001011 : 5 : 5/13 11001011 : 5 : 5/13 2)Apply crossover (random crossover point): 110.01011 110.01011 -> 110.01011 110.01011 3)Apply mutation 11001011 -> 11001010 11001011 -> 11001111

Example by hand 6/6 New population and its evaluation: 01010111 : 5 : 5/17 01000010 : 2 : 2/17 11001010 : 4 : 4/17 11001111 : 6 : 6/17...and we go on with generations until a termination condition is verified.

Observations Genetic operators are blind with respect to the goal Their role is just to recombine and variate the genetic material so as to explore genetic combinations Favourable genetic variations are likely to be preserved by selection Nevertheless, because of generational replacement, it is possible that good individuals are not kept in the new population. Therefore, a kind of elitism is always used

Why does it work? Intuition: Crossover combines good parts from good solutions (but it might achieve the opposite effect). Mutation introduces diversity. Selection drives the population toward high fitness.

Fitness Landscape Representation of the space of all possible genotypes, along with their fitness.

Fitness Landscape The metaphor of landscape should be taken cum grano salis. One operator, one landscape. In some cases fitness landscapes are dynamic. Landscape intuition might be misleading, because it might implicitly suggest a metric in the search space that actually does not exist.

Schemata and building blocks Holland explains (also theoretically, but with strong hypotheses) why the SGA works Two basic elements: Schemata Building blocks

Schemata A schema is a kind of mask: 001 1 0 The symbol represents a wildcard: both 0 and 1 fits So, 1 0 represents 100 and 110

Building blocks A building block is a pattern of contiguous bits HP: good solutions are composed of good building blocks The crossover puts together short building blocks and destroys large ones

Implicit parallelism Every individual corresponds to a set of schemata The number of the best schemata increases exponentially The solution space is searched through schemata (hence implicit parallelism)

Implicit parallelism A SGA works well if: 1 Short good building blocks (correlate genes are adjacent) 2 Loose interaction among genes (low epistasis)

SGA: pros and cons Pros: Extremely simple. General purpose. Tractable theoretical models. Cons: Coding is crucial. Too simple genetic operators.

A general GA Solution coding (e.g., bit strings, programs, arrays of real variables, etc.) Define a way for evaluating solutions (e.g., objective function value, result of a program, behavior of a system, etc.) Define genetic operators.

Examples of crossover Recombination: Multi-point crossover (recombination of more than 2 pieces of chromosomes) Multi-parent crossover (the genetic material of a new individual is taken from more than 2 parents) Uniform crossover (children created by mixing parent s gene: each parent k is associated a probability g k which is then used to pick the value of gene i in the child)

Toward less simple GA Selection: Different probability distribution (e.g., probability distribution based on the ranking of individuals) Tournament Selection (iteratively pick two or more individuals and put in the mating pool the fittest) New population: Steady state scheme: the new population is composed of the best individuals from the current population and the offspring Elitism: like replacement, but we keep the λ best individuals from the current population (in case of fixed size populations, the worst λ individuals of the offspring are removed)

Ex: real valued variables - Solution: x [a, b], a, b R - Mutation: random perturbation x x ± δ, accepted if x ± δ [a, b] - Crossover: linear combination z = λ 1 x + λ 2 y, with λ 1, λ 2 such that a z b.

Example: permutations - Solution: x = (x 1, x 2,..., x n ) is a permutation of (1, 2,..., n). - Mutation: random exchange of two elements in the n-ple. - Crossover: like 2-point crossover, but avoiding value repetition.

n-queens Place n queens on a n n chessboard in such a way that the queens cannot attack each other.

n-queens Genotype: a permutation of the numbers 1 through n 3 2 4 6 5 8 7 1

n-queens Mutation: swap two numbers 1 2 1 3 5 4 8 7 1 2 4 3 5 1 8 7

n-queens Crossover: combine two parents 1 3 5 2 6 4 7 8 1 3 5 4 2 8 7 6 8 7 6 5 4 3 2 1 8 7 6 2 4 1 3 5

n-queens Fitness: penalty of a queen is the number of queens it can check. The fitness of the configuration is the sum of the single penalties.

Genetic Programming Can be seen as a variant of GA: individuals are programs. Used to build programs that solve the problem at hand ( specialized programs). Extended to automatic design in general (e.g., controllers and electronic circuits). Fitness is given by evaluating the performance of the program (based upon some defined criterion).

Genetic Programming In most of the cases, individuals are represented as trees, which encode programs. + 1 2 IF > 3 4 T 6

Operators Mutation: Random selection of a subtree which is substituted by a well formed random generated subtree. + + 1 2 IF 1 2 IF > 3 4 > 3 4 T 6 * 6 Y 2

Crossover: Swap two randomly picked subtrees. Operators + + 1 2 IF 1 2 + > 3 4 5 4 T 6 IF IF < 2 + < 2 IF 5 4 > 3 4 T 6

The realm of GP Black art problems. E.g.,automated synthesis of analog electrical circuits, controllers, antennas, and other areas of design. Programming the unprogrammable, involving the automatic creation of computer programs for unconventional computing devices. E.g.,cellular automata, parallel systems, multi-agent systems, etc.

Coevolution Species evolve in the same environment dynamic environment Two kinds: Competitive Cooperative

Competitive Coevolution Species evolve trying to face each other E.g., prey/predator, herbivore/plants. Applications: ALU design for Cray computer, (pseudo-)random number generator.

Cooperative Coevolution Species evolve complementary capabilities to survive in their environment E.g., host/parasite. Applications: niche genetic algorithms for multi-criteria optimization.

Examples

The Prisoner s Dilemma Axelrod and The Prisoner s Dilemma Game strategies evolved through genetic algorithms. Dynamic environment (a player plays against other different players). Best strategy evolved by GA is the best human strategy. Analysis of the arising of cooperation.

The Prisoner s Dilemma The two players in the game can choose between two moves, either cooperate or defect. Each player gains when both cooperate, but if only one of them cooperates, the other one, who defects, will gain more. If both defect, both lose (or gain very little) but not as much as the cheated cooperator whose cooperation is not returned.

The payoff matrix Cooperate Defect Cooperate R,R S,T Defect T,S P,P T: Temptation to defect R: Reward for mutual cooperation P: Punishment for mutual defection S: Sucker s payoff HP: T > R > P > S ; 2 R > T + S

Problem encoding Suppose that the memory of each player is one previous move. E.g., player A cooperated and player B defected becomes: CD. The strategy is defined with a move for each possible past move. E.g.: If CC then C If CD then D the string is CDCD If DC then C Tit for tat strategy (winner). If DD then D

Evolutionary robotics Robots are controlled by means of neural networks. The neural network is designed by means of an EC technique. The fitness is computed by simulating the robot. The best resulting controller is tested in a real setting.

Evolutionary robotics (taken from D. Floreano and L. Keller, Evolution of Adaptive Behaviour in Robots by Means of Darwinian Selection, PLOS Biology, Jan. 2010, Vol. 8, Issue 1)

NASA antenna design Space Technology 5 Project. Antennas are defined through a LOGO-like programming language. Antenna construction programs are evolved by means of an EC technique.

To know more M.Mitchell. Genetic Algorithms. MIT Press, 1999. Z.Michalewicz. Genetic Algorithms + Data Structures = Evolution Programs, Springer, 1992. D.E.Golberg. Genetic Algorithms in Search, Optimization and Machine Learning. Addison-Wesley, 1989. W.B.Langdon, R.Poli. Foundations of Genetic Programming. Springer, 2001. R. Poli, W.B. Langdon, N.F. McPhee, J. Koza. A Field Guide to Genetic Programming, http://www.gp-field-guide.org.uk/ (free download Creative Commons). S. Nolfi and D. Floreano, Evolutionary robotics. The MIT Press, 2000.