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

Similar documents
Evolutionary computation

Evolutionary computation

Evolutionary Computation

Chapter 8: Introduction to Evolutionary Computation

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

Lecture 22. Introduction to Genetic Algorithms

CSC 4510 Machine Learning

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

Fundamentals of Genetic Algorithms

Lecture 9 Evolutionary Computation: Genetic algorithms

Introduction to Evolutionary Computation

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

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

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

Genetic Algorithms & Modeling

Evolutionary Design I

Crossover Techniques in GAs

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

Data Warehousing & Data Mining

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

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

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

Individual learning and population evolution

Genetic Algorithm for Solving the Economic Load Dispatch

GENETIC ALGORITHM FOR CELL DESIGN UNDER SINGLE AND MULTIPLE PERIODS

The Story So Far... The central problem of this course: Smartness( X ) arg max X. Possibly with some constraints on X.

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

Lecture 06: Niching and Speciation (Sharing)

Local Search & Optimization

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

DETECTING THE FAULT FROM SPECTROGRAMS BY USING GENETIC ALGORITHM TECHNIQUES

Matt Heavner CSE710 Fall 2009

Evolutionary Algorithms

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

Using Evolutionary Techniques to Hunt for Snakes and Coils

how should the GA proceed?

Local Search & Optimization

Genetic Algorithms: Basic Principles and Applications

Genetic Algorithms. Donald Richards Penn State University

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

biologically-inspired computing lecture 18

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

State of the art in genetic algorithms' research

Genetic Algorithm: introduction

Evolutionary Computation: introduction

Complex Systems Theory and Evolution

Local and Stochastic Search

Lecture 15: Genetic Algorithms

CHAPTER 4 INTRODUCTION TO DISCRETE VARIABLE OPTIMIZATION

Evolutionary Games and Computer Simulations

Determination of Optimal Tightened Normal Tightened Plan Using a Genetic Algorithm

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

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

Haploid & diploid recombination and their evolutionary impact

Sorting Network Development Using Cellular Automata

Binary Particle Swarm Optimization with Crossover Operation for Discrete Optimization

COMBINATION OF TAGUCHI METHOD AND ARTIFICIAL INTELLIGENCE TECHNIQUES FOR THE OPTIMAL DESIGN OF FLAT-PLATE COLLECTORS

Using Genetic Algorithm for classification of flower plants

Local Beam Search. CS 331: Artificial Intelligence Local Search II. Local Beam Search Example. Local Beam Search Example. Local Beam Search Example

Computational statistics

Zebo Peng Embedded Systems Laboratory IDA, Linköping University

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

Genetic Engineering and Creative Design

Geometric Semantic Genetic Programming (GSGP): theory-laden design of variation operators

Dynamics and Chaos. Melanie Mitchell. Santa Fe Institute and Portland State University

Lecture 5: Linear Genetic Programming

Haploid-Diploid Algorithms

LOCAL SEARCH. Today. Reading AIMA Chapter , Goals Local search algorithms. Introduce adversarial search 1/31/14

Artificial Intelligence Methods (G5BAIM) - Examination

Parallel Genetic Algorithms

The European Applied Business Research Conference Rothenburg, Germany 2002

Genetic Algorithm. Outline

Geometric Semantic Genetic Programming (GSGP): theory-laden design of semantic mutation operators

Genetic Algorithms and Genetic Programming Lecture 17

COMP3411: Artificial Intelligence 10a. Evolutionary Computation

EVOLUTION is in essence a two-step process of random

Bounded Approximation Algorithms

Incremental Stochastic Gradient Descent

Evolution Strategies for Constants Optimization in Genetic Programming

Implicit Formae in Genetic Algorithms

A Brief Introduction to Multiobjective Optimization Techniques

CC283 Intelligent Problem Solving 28/10/2013

Competitive Co-evolution

Bounding the Population Size in XCS to Ensure Reproductive Opportunities

Gecco 2007 Tutorial / Grammatical Evolution

Artificial Intelligence (AI) Common AI Methods. Training. Signals to Perceptrons. Artificial Neural Networks (ANN) Artificial Intelligence

An Efficient Selection Strategy for Digital Circuit Evolution

A GA Mechanism for Optimizing the Design of attribute-double-sampling-plan

1. Computação Evolutiva

Evolutionary Game Theory

A Note on Crossover with Interval Representations

A.I.: Beyond Classical Search

Evolution of Genotype-Phenotype mapping in a von Neumann Self-reproduction within the Platform of Tierra

Local Search and Optimization

Revised November 29, 1990 for Proceedings of Second Conference on Artificial Life (AL-2) GENETIC EVOLUTION AND CO-EVOLUTION OF COMPUTER PROGRAMS

An Analysis of Diploidy and Dominance in Genetic Algorithms

Scaling Up. So far, we have considered methods that systematically explore the full search space, possibly using principled pruning (A* etc.).

Schema Theory. David White. Wesleyan University. November 30, 2009

Transcription:

Evolutionary Computation DEIS-Cesena Alma Mater Studiorum Università di Bologna Cesena (Italia) andrea.roli@unibo.it

Evolutionary Computation Inspiring principle: theory of natural selection Species face the problem of searching for beneficial adaptations to the environment. The knowledge that each species has gained is embodied in the makeup of the chromosomes of its members. (Davis, Genetic Algorithms and Simulated Annealing, 1987) Example: rabbits...

Evolutionary Computation Evolutionary Computation (EC) encompasses: Genetic Algorithms Genetic Programming Evolution Strategies Estimation of Distribution Algorithms

Characteristics Robustness Adaptivity Subsymbolic models (no explicit symbolic computation)

Objectives Problem solving Optimization Adaptive systems design Simulation

Some applications System design (e.g., airplanes, electronic circuits, mechanical elements) Neural network training (e.g., robotics) Signal processing (e.g., artificial vision) Optimization (discrete and continuous)

More applications Time series analysis and forecasting (e.g., financial forecasting) Artificial Life (e.g., cellular automata, analysis of complex adaptive systems) Games (e.g., Prisoner s Dilemma) Challenge: find a problem where EC has NOT been applied!

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

A bit of terminology A population is the set of individuals (solutions) Individuals are also called genotypes or chromosomes (if one solution one chromosome) Chromosomes are made of units called genes The domain of values of a gene is composed of alleles (e.g., a binary variable/gene has two alleles)

The Evolutionary Cycle SELECTION PARENTS RECOMBINATION POPULATION MUTATION REPLACEMENT OFFSPRING

Genetic operators Mutation Recombination Selection Replacement/insertion

Genetic operators EC algorithms define a basic computational procedure which uses the genetic operators. The definition of the genetic operators specifies the actual algorithm. The definition of the genetic operators 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

Simple Genetic Algorithm Derived from the natural metaphor Very simple model Programming oriented You can take it as a first step toward evolutionary algorithms in general

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

Example Optimization of a function of integer variable x [0, 100]: binary coding string of 7 bit 4 bits per digit string of 12 bit

Genetic operators (1) 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

Genetic operators (2) Crossover: cross-combination of two chromosomes (loosely resembling human 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

Genetic operators (3) Selection acts in the choice of parents and produces the mating pool. Proportional selection: the probability for an individual to be chosen is proportional to its fitness.

Genetic operators (3) 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 (extremely) expensive, easier theoretical analysis. Disadvantage: we could loose good solutions

High-level algorithm Initialize Population Evaluate Population while Termination conditions not met do while New population not completed do Select two parents for mating Apply crossover Apply mutation to each new individual end while Population New population Evaluate Population end while

Termination conditions The basic question is: when to stop? Execution time limit reached We are satisfied with the solution(s) obtained Stagnation (limit: the population converged to the same individual)

Simple Genetic Algorithm Initialize Population{N pop individuals X 1,..., X Npop } for i = 1 to N pop do X i InitialSolution() {e.g., random} end for Evaluate Population{Individual X i has fitness F i } for i = 1 to N pop do F i Eval(X i ) end for

Simple Genetic Algorithm Select parents: G 1, G 2 {Roulette wheel selection} lung 0 for i = 1 to N pop do {all fitness values are summed up} lung lung + F i end for for m = 1 to 2 do r Random(0,lung); sum 0; i 1 while i < N pop AND sum < r do sum sum + F i ; i i + 1 end while G m X i end for

Apply crossover: from G 1, G 2 we get G 1, G 2 r Random(1,l chromosome ){crossover point} for i = 1 to r 1 do G 1[i] G 1 [i] G 2[i] G 2 [i] end for for i = r to l chromosome do G 1[i] G 2 [i] G 2[i] G 1 [i] end for Simple Genetic Algorithm

Apply mutation to individual X for i = 1 to l chromosome do r Random(0,1) if r p M then Complement X[i] end if end for Simple Genetic Algorithm

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

Fitness Landscape Caution! Different landscapes for different operators In many cases fitness landscapes are dynamic Landscape intuition might be misleading Use of term local optimum used and abused everywhere

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

Why does it work? 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 fit E.g., 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)

When does it work well? 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 Theoretical models Cons: Coding Too simple genetic operators

A recipe The ingredients to prepare a GA: Solution coding (e.g., bit strings, programs, arrays of real variables, etc.) Define a way of evaluating solutions (e.g., objective function value, result of a program, behavior of a system, etc.) Define recombination operators (crossover, mutation) Define the selection and replacement/insertion mechanisms

Toward less simple GA Recombination: Multi-point crossover (recombination of more than 2 pieces of chromosomes) Multi-parent crossover (an individual is generated by more than 2 parents) Uniform crossover (children created by randomly shuffling the parent variables at each site)

Multi-point crossover 1 1 0 1 1 0 0 1 0 1 1 1 1 0 1 1 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 0 0 1 0

Multi-parent crossover 1 1 0 1 1 0 1 1 0 1 1 1 1 0 1 1 0 0 0 0 0 0 1 0 1 0 1 1 0 0 1 0 1 1 0 0 0 0 0 1 1 1 1 1 0 1 1 0 1 1 1 1 0 0 1 0 0 1 1 0

Toward less simple GA Mutation: Learning applied to modify the chromosome In optimization, hill-climbing or more complex local search algorithms can be applied Interesting topic: Evolution & Learning, www.cogs.susx.ac.uk/users/ezequiel/alife-page/evolearn.html

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)

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 (see next example).

Eight Queens Place 8 queens on a 8 8 chessboard in such a way that the queens cannot attack each other.

Eight Queens Genotype: a permutation of the numbers 1 through 8 3 2 4 6 5 8 7 1

Eight Queens Mutation: exchanging two numbers 1 2 1 3 5 4 8 7 1 2 4 3 5 1 8 7

Eight Queens Crossover: combining 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

Eight 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)

Genetic Programming Individuals are trees which encode programs. + 1 2 IF > 3 4 T 6 Fitness given by the evaluation of the program behavior (based upon some defined criteria)

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

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

Operators Selection and replacement Fitness is evaluated depending on the application. For assembler worms the fitness can be the memory they occupied. For controllers, the fitness can be the percentage of correct actions

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.

EC and Artificial Life Tierra Artificial evolution of computer programs (T. Ray, early 90s) Environment: virtual computer Individuals: self-replicating assembler programs Resources: CPU time and memory

Tierra Results of evolution: several kinds of nontrivial behaviors and dynamics parasites immunity to parasites circumvention of immunity to parasites social individuals... and others

EC and Games 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 Action of A \ Action of B Cooperate Defect Cooperate +5 10 Defect +10 0

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 If DC then C If DD then D the string is CDCD

Classifier Systems Systems composed of rules like IF [conditions] THEN [actions] IF (sensor1 is active) THEN (move) IF (sensor3 is inactive and sensor4 is active) THEN (stop) IF (sensor4 is inactive) THEN (turn right) Rules are usually coded as bitstrings and evolved by means of usual application of EC operators.

Classifier Systems CLASSIFIER SYSTEM MESSAGES REINFORCE ACTIONS ENVIRONMENT

Classifier Systems

Some references 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.