1 (intro to) evolutionary computation lecture 1: overview of ec ata kaban [email protected] axk...
Post on 21-Dec-2015
216 views
TRANSCRIPT
1
(Intro to) Evolutionary Computation
Lecture 1: Overview of EC
http://www.cs.bham.ac.uk/~axk
School of Computer ScienceUniversity of Birmingham
2
Module overview & Assessment
• Lectures & Tutorial Classes• Formative exercises will be handed out during the term• Learning to learn is essential
• Assessment:
– Level 3 (Evo Comp): 100% exam (1.5 hr)
– Level 4 (Intro Evo Comp): 80% exam + 20% course work
• The coursework: 2 pieces of work, worth 10% each
3
Why Evolutionary Computation?
Traditional comp• Fixed & accurate at exact
computation• Inflexible• Limited. Can't cope with:
– Complicated, e.g. non-smooth functions
– objectives that change over time
Exact solution to simplified problem
Evolutionary comp• Yield good quality
approximate solutions to large real world problems
• Flexible• Robust• Time consuming• Appropriate when
traditional methods break down
Approximate solution to real problem
4
What is Evolutionary Computation?
• The study of computational systems that use ideas inspired from natural evolution– The principle of survival
of the fittest
• Stochastic search procedures in large search spaces– general methods for
solving ‘search for solutions’ type of problems
– Can be used in optimisation, learning and design
5
...inspiration from genetics
• DNA (Deoxyribonucleic Acid) = the physical carrier of genetic information
• Chromosomes = a single, very long molecule of DNA• Gene = basic functional block of inheritance (encoding and
directing the synthesis of a protein) • Allele = one of a number of alternative values of a gene• Locus = location of a gene• Genome = the complete collection of genetic material (all
chromosomes together)• Genotype = the particular set of genes contained in a
genome• Phenotype = the manifested characteristics of the
individual; determined by the genotype
6
• The modern study of genetics started in mid 19-th century, with Gregor Mendel’s experiments investigating the inheritance of particular traits in peas – Pure breeding plants
– Cross-fertilised plants (e.g. round seeds & wrinkled seeds)
• Dominant (R) and recessive (r) genes
RR rr
Rr
RrRr
RR rR rr
8
A simple EA• 1. Initialisation: generate an initial population
(generation) P(0) at random; set i0• 2. Iterate:
– A) evaluate the fitness of individuals in P(i)– B) select parents from P(i) based on their fitness– C) generate offspring from the parents using
crossover & mutation to form P(i+1)– D) i i+1
• 3. until some stopping criteria is satisfiedReport statistics: e.g. the best fitness & i,
averaged over several runs!!
9
Toy example
Maximise the fct. f(x)=x2 wrt. X in the interval {0,…,31}.
• Encoding (representation): chromosomes:0=0000, 1=00001, 2=00010, 3=00011,…
phenotype genotype
10
• Generate initial population at random:
01101, 00001, 11000, 10011,…
• Evaluate the fitness according to f(x)
e.g. 01101 = 13 169
• Select 2 individuals for crossover based on their fitness. E.g. using the ‘roulette-wheel sampling’ to implement a fitness-proportionate selection:
parents: 0110|1(=13) 1100|0(=24)
offspring: 0110|0 1100|1
mutated: 01101
parents: 10|011(=13) 11|000(=24)
offspring: 10|000 11|011(=27)
mutated: 00000
jj
ii f
fp
cross-over:
cross-over:
11
Variables to play with
• Designing a sensible representation• Size of the population• Crossover rate: the probability of crossing over the pairs at
a randomly (uniformly) chosen locus (location)• Mutation rate: the probability of mutating a gene (applied
to all genes)• Other representation schemes different types of
crossover & mutation operators• Selection strategies: fitness proportionate selection, also
called ‘roulette wheel sampling’; note that there are better selection schemes than this.
• More variables appear in various versions of EC.
12
Example: Function optimisation
- very frequent problem in many domains
- more examples in the tutorial
14
Example: Searching for a strategy in game playing
• The ‘Prisoner’s dilemma game was ’Invented by Merrill Flood & Melvin Dresher in 1950s
• Studied in game theory, economics, political science
• The story– Alice and Bob arrested, no communication between them
– They are offered a deal: • If any of them confesses & testifies against the other then gets
suspended sentence while the other gets 5 years in prison
• If both confess & testify against the other, they both get 4 years
• If none of them confesses then they both get 2 years
– What is the best strategy for maximising one’s own payoff?
15
• 2 tournaments – participants have sent strategies• Human strategies played against each other• Winner: TIT FOR TAT
– Cooperates as long the other player does not defect
– Defects on defection until the other player begins to cooperate again
• Can GA evolve a better strategy?
16
• Encoding a strategy as a string: – in the case of memory of 1 previous game)– Define a canonical order of casesCase 1: CC CCase 2: CD D string encoding of TFTCase 3: DC CCase 4: DD D
• Results– For a fixed environment formed by 8 human-designed strategies, GA
found better strategy than those (highly adapted to that environment)[memory of 3 previous games, strings of length 70, 40 runs, 50 generations each, population of 20, fitness: avg score over all games played]
– Experiments in changing environment: the evolving strategies played against each other: Found strategies similar in essence with the winner human-designed strategy
– Idealised model of evolution & co-evolution
17
Example: Searching for a computer program (‘Genetic Programming’)
• Extension of GA for evolving computer programs (Koza 1992)
– represent programs as LISP expressions
– e.g.
(IF (GT (x) (0)) (x) (-x)) IF
GT x -x
x 0
19
Further application areas• OptimisationOptimisation
– Combinatorial optimisation: circuit layout, job-shop scheduling• Automatic programmingAutomatic programming
– Evolving computer programs for specific tasks– Designing other computational structures (NNs, cellular automata)
• Machine LearningMachine Learning– classification: evolving rules for learning classifier systems– prediction: predicting protein structure, predicting weather
• EconomicsEconomics– Modelling of bidding strategies– Modelling of the emergence of economic markets
• Immune systemsImmune systems– Discovery of multi-gene families during evolutionary time
• EcologyEcology– Modelling host-parasite coevolution, symbiosis and resource flow
• Population geneticsPopulation genetics– Under what conditions will a gene for recombination be evolutionarily viable
• Evolution and learningEvolution and learning– Studying how individual learning & species evolution affect each other
• Social systemsSocial systems– Evolution of social behavior in insect colonies evolution of cooperation & communication
in multi-agent systems• Etc.Etc.
20
Variants of Evolutionary Algorithms
Different versions appeared independently in mid '60s
• Genetic algorithms (Holland)• Evolutionary programming (Fogel)• Evolution strategies (Rechenberg &
Schwefel)• Genetic programming (Koza)------------------------------------Evolutionary computation: a better term
22
Evolutionary Optimisation
1. Numerical (global) optimisation.2. Combinatorial optimisation (of NP-hard problems).3. Mixed optimisation.4. Constrained optimisation.5. Multiobjective optimisation.6. Optimisation in a dynamic and/or uncertain environment
23
Evolutionary Learning
Evolutionary learning can be used in supervised, unsupervised andreinforcement learning.1. Learning classifier systems (rule-based systems).2. Evolutionary artificial neural networks.3. Evolutionary fuzzy logic systems.4. Co-evolutionary learning.5. Automatic modularisation of machine learning systems by speciation and niching.
24
Machine Learning vs Evolutionary Comp
• Most Machine Learning is concerned with constructing a hypothesis from examples, which generalises well – fast but very biased
• EC is a discovery-search over hypotheses– slow and unbiased
25
Evolutionary Design
EC techniques are particularly good at exploring unconventionaldesigns which are very difficult to obtain by hand.1. Evolutionary design of artificial neural networks.2. Evolutionary design of electronic circuits.3. Evolvable hardware.4. Interactive creative design using evolutionary approaches
27
Summary1. Evolutionary algorithms can be regarded as population-based generate-and-test algorithms.2. Evolutionary computation techniques can be used in optimisation, learning and design.3. Evolutionary computation techniques are flexible and robust.4. Evolutionary computation techniques are definitely useful tools in your toolbox, but there are problems for which other techniques might be more suitable.
28
Readings for This Lecture
1. D. B. Fogel (ed.), Evolutionary Computation: The FossilRecord, IEEE Press, Piscataway, NJ, USA, 1998. (ISBN-10:0780334817, ISBN-13: 978-0780334816)
2. X. Yao, “Evolutionary computation: A gentle introduction,” InEvolutionary Optimization, R. Sarker, M. Mohammadian andX. Yao (eds.), Chapter 2, pp.27-53, Kluwer AcademicPublishers, Boston, 2002. (ISBN 0-7923-7654-4)