Machine Evolution
Chapter 4.
2
Overview
 Introduction to Evolutionary Computation
– Biological Background
– Evolutionary Computation
 Genetic Algorithm
 Genetic Programming
 Summary
– Applications of EC
– Advantage & disadvantage of EC
 Further Information
3
Biological Basis
 Biological systems adapt themselves to a new
environment by evolution.
– Generations of descendants are produced that
perform better than do their ancestors.
 Biological evolution
– Production of descendants changed from their
parents
– Selective survival of some of these descendants to
produce more descendants
4
Evolutionary Computation
 What is the Evolutionary Computation?
– Stochastic search (or problem solving) techniques
that mimic the metaphor of natural biological
evolution.
 Metaphor
EVOLUTION
Individual
Fitness
Environment
PROBLEM SOLVING
Candidate Solution
Quality
Problem
5
General Framework of EC
Generate Initial Population
Evaluate Fitness
Select Parents
Generate New Offspring
Termination Condition?
Yes
No
Fitness Function
Crossover, Mutation
Best Individual
6
Geometric Analogy - Mathematical Landscape
7
Paradigms in EC
 Evolutionary Programming (EP)
– [L. Fogel et al., 1966]
– FSMs, mutation only, tournament selection
 Evolution Strategy (ES)
– [I. Rechenberg, 1973]
– Real values, mainly mutation, ranking selection
 Genetic Algorithm (GA)
– [J. Holland, 1975]
– Bitstrings, mainly crossover, proportionate selection
 Genetic Programming (GP)
– [J. Koza, 1992]
– Trees, mainly crossover, proportionate selection
8
(Simple) Genetic Algorithm (1)
 Genetic Representation
– Chromosome
 A solution of the problem to be solved is normally
represented as a chromosome which is also called an
individual.
 This is represented as a bit string.
 This string may encode integers, real numbers, sets, or
whatever.
– Population
 GA uses a number of chromosomes at a time called a
population.
 The population evolves over a number of generations
towards a better solution.
9
Genetic Algorithm (2)
 Fitness Function
– The GA search is guided by a fitness function which
returns a single numeric value indicating the fitness of
a chromosome.
– The fitness is maximized or minimized depending on
the problems.
– Eg) The number of 1's in the chromosome
Numerical functions
10
Genetic Algorithm (3)
 Selection
– Selecting individuals to be parents
– Chromosomes with a higher fitness value will have a
higher probability of contributing one or more
offspring in the next generation
– Variation of Selection
 Proportional (Roulette wheel) selection
 Tournament selection
 Ranking-based selection
11
Genetic Algorithm (4)
 Genetic Operators
– Crossover (1-point)
 A crossover point is selected at random and parts of the two
parent chromosomes are swapped to create two offspring with
a probability which is called crossover rate.
 This mixing of genetic material provides a very efficient and
robust search method.
 Several different forms of crossover such as k-points, uniform
12
Genetic Algorithm (5)
– Mutation
 Mutation changes a bit from 0 to 1 or 1 to 0 with a
probability which is called mutation rate.
 The mutation rate is usually very small (e.g., 0.001).
 It may result in a random search, rather than the guided
search produced by crossover.
– Reproduction
 Parent(s) is (are) copied into next generation without
crossover and mutation.
13
Example of Genetic Algorithm
14
Genetic Programming
 Genetic programming uses variable-size tree-
representations rather than fixed-length strings of
binary values.
 Program tree
= S-expression
= LISP parse tree
 Tree = Functions (Nonterminals) + Terminals
15
GP Tree: An Example
 Function set: internal nodes
– Functions, predicates, or actions which take one or
more arguments
 Terminal set: leaf nodes
– Program constants, actions, or functions which take
no arguments
S-expression: (+ 3 (/ ( 5 4) 7))
Terminals = {3, 4, 5, 7}
Functions = {+, , /}
16
Setting Up for a GP Run
 The set of terminals
 The set of functions
 The fitness measure
 The algorithm parameters
– population size, maximum number of generations
– crossover rate and mutation rate
– maximum depth of GP trees etc.
 The method for designating a result and the criterion
for terminating a run.
17
Crossover: Subtree Exchange
+
b
 
a b
+
b
+

a
+

a b

 
a b
+
b
+

a
b


 
a b
18
Mutation

a b
+
b
/

a
+

b
+
b
/

a
-
b a
19
Example: Wall-Following Robot
 Program Representation in GP
– Functions
 AND (x, y) = 0 if x = 0; else y
 OR (x, y) = 1 if x = 1; else y
 NOT (x) = 0 if x = 1; else 1
 IF (x, y, z) = y if x = 1; else z
– Terminals
 Actions: move the robot one cell to each direction
{north, east, south, west}
 Sensory input: its value is 0 whenever the coressponding
cell is free for the robot to occupy; otherwise, 1.
{n, ne, e, se, s, sw, w, nw}
20
A Wall-Following Program
21
Evolving a Wall-Following Robot
 Experimental Setup
– Population size: 5,000
– Fitness measure: the number of cells next to the wall
that are visited during 60 steps
 Perfect score (320)
– One Run (32)  10 randomly chosen starting points
– Termination condition: found perfect solution
– Selection: tournament selection
22
 Creating Next Generation
– 500 programs (10%) are copied directly into next
generation.
 Tournament selection
– 7 programs are randomly selected from the population 5,000.
– The most fit of these 7 programs is chosen.
– 4,500 programs (90%) are generated by crossover.
 A mother and a father are each chosen by tournament
selection.
 A randomly chosen subtree from the father replaces a
randomly selected subtree from the mother.
– In this example, mutation was not used.
23
Two Parents Programs and Their
Children
24
Result (1)
 Generation 0
– The most fit program (Fitness = 92)
25
Result (2)
 Generation 2
– The most fit program (fitness = 117)
 Smaller than the best one of generation 0, but it does get
stuck in the lower-right corner.
26
Result (3)
 Generation 6
– The most fit program (fitness = 163)
 Following the wall perfectly but still gets stuck in the
bottom-right corner.
27
Result (4)
 Generation 10
– The most fit program (fitness = 320)
 Following the wall around clockwise and moves south to
the wall if it doesn’t start next to it.
28
Result (5)
 Fitness Curve
– Fitness as a function of generation number
 The progressive (but often small) improvement from
generation to generation
29
Applications of EC
 Numerical, Combinatorial Optimization
 System Modeling and Identification
 Planning and Control
 Engineering Design
 Data Mining
 Machine Learning
 Artificial Life
30
Advantages of EC
 No presumptions w.r.t. problem space
 Widely applicable
 Low development & application costs
 Easy to incorporate other methods
 Solutions are interpretable (unlike NN)
 Can be run interactively, accommodate user proposed
solutions
 Provide many alternative solutions
31
Disadvantages of EC
 No guarantee for optimal solution within finite time
 Weak theoretical basis
 May need parameter tuning
 Often computationally expensive, i.e. slow
32
Further Information on EC
 Conferences
– IEEE Congress on Evolutionary Computation (CEC)
– Genetic and Evolutionary Computation Conference (GECCO)
– Parallel Problem Solving from Nature (PPSN)
– Int. Conf. on Artificial Neural Networks and Genetic Algorithms
(ICANNGA)
– Int. Conf. on Simulated Evolution and Learning (SEAL)
 Journals
– IEEE Transactions on Evolutionary Computation
– Evolutionary Computation
– Genetic Programming and Evolvable Machines
– Evolutionary Optimization
33
Assignments:
 Draw the tree structure of the program in figure 4.8 on
page 68.
 Write a program to implement the backpropagation
algorithm for a neural network with two hidden
layers ( C++, Matlab ).
Mail your source code to
lqzhang@sjtu.edu.cn

More Related Content

PDF
04 2 machine evolution
PPTX
Genetic programming
PPTX
Optimization Technique Harmony Search
PPTX
Optimization technique genetic algorithm
PDF
Optimizing Mobile Robot Path Planning and Navigation by Use of Differential E...
PPT
PPSN 2004 - 3rd session
PPTX
Introduction to particle swarm optimization
PDF
Continuous Adaptation via Meta Learning in Nonstationary and Competitive Envi...
04 2 machine evolution
Genetic programming
Optimization Technique Harmony Search
Optimization technique genetic algorithm
Optimizing Mobile Robot Path Planning and Navigation by Use of Differential E...
PPSN 2004 - 3rd session
Introduction to particle swarm optimization
Continuous Adaptation via Meta Learning in Nonstationary and Competitive Envi...

Viewers also liked (6)

PPT
Biology Unit 3 Notes: Cellular Respiration
PPTX
Year 12 biology early comm presentation intro only
PPTX
Unit 4 VCE Biology: Cell membranes &_organelles
PPT
Chapt 2
PPT
Protein Synthesis
PPT
AQA Biology unit 3
Biology Unit 3 Notes: Cellular Respiration
Year 12 biology early comm presentation intro only
Unit 4 VCE Biology: Cell membranes &_organelles
Chapt 2
Protein Synthesis
AQA Biology unit 3
Ad

Similar to 04 1 evolution (20)

PPTX
Genetic Algorithm
PDF
CSA 3702 machine learning module 4
PDF
3_GO_Olesya_Genetic_AlgorithmsOPTIMZTION.p.pdf
PPTX
genetic programming
PPTX
WIX3001 Lecture 6 Principles of GA.pptx
PDF
Data Science - Part XIV - Genetic Algorithms
PPTX
Introduction to Genetic Algorithm
PDF
Evolutionary (deep) neural network
PPT
Evolutionary algorithms
PPTX
GA of a Paper 2012.pptx
PPTX
genetic algorithm with solved examples and applications
PDF
A Review On Genetic Algorithm And Its Applications
PPT
Genetic algorithm
PPT
evolutionary algo's.ppt
PPTX
Introduction to genetic programming
PPT
Genetic_Algorithms.ppt
PPT
Genetic_Algorithms_genetic for_data .ppt
PPT
Genetic_Algorithms.ppt
PDF
Introduction to Genetic Algorithms 2014
PPT
Genetic Algorithms-1.ppt
Genetic Algorithm
CSA 3702 machine learning module 4
3_GO_Olesya_Genetic_AlgorithmsOPTIMZTION.p.pdf
genetic programming
WIX3001 Lecture 6 Principles of GA.pptx
Data Science - Part XIV - Genetic Algorithms
Introduction to Genetic Algorithm
Evolutionary (deep) neural network
Evolutionary algorithms
GA of a Paper 2012.pptx
genetic algorithm with solved examples and applications
A Review On Genetic Algorithm And Its Applications
Genetic algorithm
evolutionary algo's.ppt
Introduction to genetic programming
Genetic_Algorithms.ppt
Genetic_Algorithms_genetic for_data .ppt
Genetic_Algorithms.ppt
Introduction to Genetic Algorithms 2014
Genetic Algorithms-1.ppt
Ad

More from Tianlu Wang (20)

PDF
L7 er2
PDF
L8 design1
PDF
L9 design2
PDF
14 pro resolution
PDF
13 propositional calculus
PDF
12 adversal search
PDF
11 alternative search
PDF
10 2 sum
PDF
22 planning
PDF
21 situation calculus
PDF
20 bayes learning
PDF
19 uncertain evidence
PDF
18 common knowledge
PDF
17 2 expert systems
PDF
17 1 knowledge-based system
PDF
16 2 predicate resolution
PDF
16 1 predicate resolution
PDF
15 predicate
PDF
09 heuristic search
PDF
08 uninformed search
L7 er2
L8 design1
L9 design2
14 pro resolution
13 propositional calculus
12 adversal search
11 alternative search
10 2 sum
22 planning
21 situation calculus
20 bayes learning
19 uncertain evidence
18 common knowledge
17 2 expert systems
17 1 knowledge-based system
16 2 predicate resolution
16 1 predicate resolution
15 predicate
09 heuristic search
08 uninformed search

Recently uploaded (20)

PPTX
writing ppt.pptxfbfbfghbfghbfgbfgbhbfdhgbfdhgd
PDF
Kalahloom craft research project paper nift
PPTX
LNF 2.0_TrainingSession 123449389489489489489
PDF
Close Enough S3 E1 "Where the Buffalo Roam"
PPTX
arts-history-and-development-week-7.1.pptx
PPTX
Camera Mode DSLR Camera mode and its function
PPT
History of Photography: Advent of color and Digital1951_to_present.ppt
PPTX
Lagura-Gender & Developmentkmkmkmkmkmk.pptx
PPT
Postmodernism In Post-World War IIEurope.ppt
PPTX
OJT Experience at Suvechhya Electrical Engineering.pptx
PPTX
global-warming-ppt and its causes. It is good
PPTX
Classification of human activities.pptx ankit
PPTX
Indian Knowledge System . More information in the Indiaa
PPTX
Soft_Skills_Training_4_Month_Agenda_80_Slides.pptx
PPTX
PRACTICAL_RESEARCH_2_Q1_WEEK_11_PR2.pptx
PPTX
Q1-W5-MAPEH-MATATAG.pptx QUARTER 1 WEEK 5 MAPEH FOUR
PDF
bell hooks - Black Looks_ Race and Representation -South End Press (1999).pdf
PPTX
PPT 1 - Preamble - SPI PPT 2024.bfghfghfhfhfghfggfdgd
PPTX
SOCSCI-III-XI-SIRIUS.pptxaaaaaaaaaaaaaaa
PDF
Digitech_RP200_UsersGuide.pdfjjjjjjjjgfccfg
writing ppt.pptxfbfbfghbfghbfgbfgbhbfdhgbfdhgd
Kalahloom craft research project paper nift
LNF 2.0_TrainingSession 123449389489489489489
Close Enough S3 E1 "Where the Buffalo Roam"
arts-history-and-development-week-7.1.pptx
Camera Mode DSLR Camera mode and its function
History of Photography: Advent of color and Digital1951_to_present.ppt
Lagura-Gender & Developmentkmkmkmkmkmk.pptx
Postmodernism In Post-World War IIEurope.ppt
OJT Experience at Suvechhya Electrical Engineering.pptx
global-warming-ppt and its causes. It is good
Classification of human activities.pptx ankit
Indian Knowledge System . More information in the Indiaa
Soft_Skills_Training_4_Month_Agenda_80_Slides.pptx
PRACTICAL_RESEARCH_2_Q1_WEEK_11_PR2.pptx
Q1-W5-MAPEH-MATATAG.pptx QUARTER 1 WEEK 5 MAPEH FOUR
bell hooks - Black Looks_ Race and Representation -South End Press (1999).pdf
PPT 1 - Preamble - SPI PPT 2024.bfghfghfhfhfghfggfdgd
SOCSCI-III-XI-SIRIUS.pptxaaaaaaaaaaaaaaa
Digitech_RP200_UsersGuide.pdfjjjjjjjjgfccfg

04 1 evolution

  • 2. 2 Overview  Introduction to Evolutionary Computation – Biological Background – Evolutionary Computation  Genetic Algorithm  Genetic Programming  Summary – Applications of EC – Advantage & disadvantage of EC  Further Information
  • 3. 3 Biological Basis  Biological systems adapt themselves to a new environment by evolution. – Generations of descendants are produced that perform better than do their ancestors.  Biological evolution – Production of descendants changed from their parents – Selective survival of some of these descendants to produce more descendants
  • 4. 4 Evolutionary Computation  What is the Evolutionary Computation? – Stochastic search (or problem solving) techniques that mimic the metaphor of natural biological evolution.  Metaphor EVOLUTION Individual Fitness Environment PROBLEM SOLVING Candidate Solution Quality Problem
  • 5. 5 General Framework of EC Generate Initial Population Evaluate Fitness Select Parents Generate New Offspring Termination Condition? Yes No Fitness Function Crossover, Mutation Best Individual
  • 6. 6 Geometric Analogy - Mathematical Landscape
  • 7. 7 Paradigms in EC  Evolutionary Programming (EP) – [L. Fogel et al., 1966] – FSMs, mutation only, tournament selection  Evolution Strategy (ES) – [I. Rechenberg, 1973] – Real values, mainly mutation, ranking selection  Genetic Algorithm (GA) – [J. Holland, 1975] – Bitstrings, mainly crossover, proportionate selection  Genetic Programming (GP) – [J. Koza, 1992] – Trees, mainly crossover, proportionate selection
  • 8. 8 (Simple) Genetic Algorithm (1)  Genetic Representation – Chromosome  A solution of the problem to be solved is normally represented as a chromosome which is also called an individual.  This is represented as a bit string.  This string may encode integers, real numbers, sets, or whatever. – Population  GA uses a number of chromosomes at a time called a population.  The population evolves over a number of generations towards a better solution.
  • 9. 9 Genetic Algorithm (2)  Fitness Function – The GA search is guided by a fitness function which returns a single numeric value indicating the fitness of a chromosome. – The fitness is maximized or minimized depending on the problems. – Eg) The number of 1's in the chromosome Numerical functions
  • 10. 10 Genetic Algorithm (3)  Selection – Selecting individuals to be parents – Chromosomes with a higher fitness value will have a higher probability of contributing one or more offspring in the next generation – Variation of Selection  Proportional (Roulette wheel) selection  Tournament selection  Ranking-based selection
  • 11. 11 Genetic Algorithm (4)  Genetic Operators – Crossover (1-point)  A crossover point is selected at random and parts of the two parent chromosomes are swapped to create two offspring with a probability which is called crossover rate.  This mixing of genetic material provides a very efficient and robust search method.  Several different forms of crossover such as k-points, uniform
  • 12. 12 Genetic Algorithm (5) – Mutation  Mutation changes a bit from 0 to 1 or 1 to 0 with a probability which is called mutation rate.  The mutation rate is usually very small (e.g., 0.001).  It may result in a random search, rather than the guided search produced by crossover. – Reproduction  Parent(s) is (are) copied into next generation without crossover and mutation.
  • 14. 14 Genetic Programming  Genetic programming uses variable-size tree- representations rather than fixed-length strings of binary values.  Program tree = S-expression = LISP parse tree  Tree = Functions (Nonterminals) + Terminals
  • 15. 15 GP Tree: An Example  Function set: internal nodes – Functions, predicates, or actions which take one or more arguments  Terminal set: leaf nodes – Program constants, actions, or functions which take no arguments S-expression: (+ 3 (/ ( 5 4) 7)) Terminals = {3, 4, 5, 7} Functions = {+, , /}
  • 16. 16 Setting Up for a GP Run  The set of terminals  The set of functions  The fitness measure  The algorithm parameters – population size, maximum number of generations – crossover rate and mutation rate – maximum depth of GP trees etc.  The method for designating a result and the criterion for terminating a run.
  • 17. 17 Crossover: Subtree Exchange + b   a b + b +  a +  a b    a b + b +  a b     a b
  • 19. 19 Example: Wall-Following Robot  Program Representation in GP – Functions  AND (x, y) = 0 if x = 0; else y  OR (x, y) = 1 if x = 1; else y  NOT (x) = 0 if x = 1; else 1  IF (x, y, z) = y if x = 1; else z – Terminals  Actions: move the robot one cell to each direction {north, east, south, west}  Sensory input: its value is 0 whenever the coressponding cell is free for the robot to occupy; otherwise, 1. {n, ne, e, se, s, sw, w, nw}
  • 21. 21 Evolving a Wall-Following Robot  Experimental Setup – Population size: 5,000 – Fitness measure: the number of cells next to the wall that are visited during 60 steps  Perfect score (320) – One Run (32)  10 randomly chosen starting points – Termination condition: found perfect solution – Selection: tournament selection
  • 22. 22  Creating Next Generation – 500 programs (10%) are copied directly into next generation.  Tournament selection – 7 programs are randomly selected from the population 5,000. – The most fit of these 7 programs is chosen. – 4,500 programs (90%) are generated by crossover.  A mother and a father are each chosen by tournament selection.  A randomly chosen subtree from the father replaces a randomly selected subtree from the mother. – In this example, mutation was not used.
  • 23. 23 Two Parents Programs and Their Children
  • 24. 24 Result (1)  Generation 0 – The most fit program (Fitness = 92)
  • 25. 25 Result (2)  Generation 2 – The most fit program (fitness = 117)  Smaller than the best one of generation 0, but it does get stuck in the lower-right corner.
  • 26. 26 Result (3)  Generation 6 – The most fit program (fitness = 163)  Following the wall perfectly but still gets stuck in the bottom-right corner.
  • 27. 27 Result (4)  Generation 10 – The most fit program (fitness = 320)  Following the wall around clockwise and moves south to the wall if it doesn’t start next to it.
  • 28. 28 Result (5)  Fitness Curve – Fitness as a function of generation number  The progressive (but often small) improvement from generation to generation
  • 29. 29 Applications of EC  Numerical, Combinatorial Optimization  System Modeling and Identification  Planning and Control  Engineering Design  Data Mining  Machine Learning  Artificial Life
  • 30. 30 Advantages of EC  No presumptions w.r.t. problem space  Widely applicable  Low development & application costs  Easy to incorporate other methods  Solutions are interpretable (unlike NN)  Can be run interactively, accommodate user proposed solutions  Provide many alternative solutions
  • 31. 31 Disadvantages of EC  No guarantee for optimal solution within finite time  Weak theoretical basis  May need parameter tuning  Often computationally expensive, i.e. slow
  • 32. 32 Further Information on EC  Conferences – IEEE Congress on Evolutionary Computation (CEC) – Genetic and Evolutionary Computation Conference (GECCO) – Parallel Problem Solving from Nature (PPSN) – Int. Conf. on Artificial Neural Networks and Genetic Algorithms (ICANNGA) – Int. Conf. on Simulated Evolution and Learning (SEAL)  Journals – IEEE Transactions on Evolutionary Computation – Evolutionary Computation – Genetic Programming and Evolvable Machines – Evolutionary Optimization
  • 33. 33 Assignments:  Draw the tree structure of the program in figure 4.8 on page 68.  Write a program to implement the backpropagation algorithm for a neural network with two hidden layers ( C++, Matlab ). Mail your source code to [email protected]