Genetic Programming.

Slides:



Advertisements
Similar presentations
Biologically Inspired AI (mostly GAs). Some Examples of Biologically Inspired Computation Neural networks Evolutionary computation (e.g., genetic algorithms)
Advertisements

Genetic Programming 김용덕 Page 2 Contents What is Genetic Programming? Difference between GP and GA Flowchart for GP Structures in GP.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
Doug Downey, adapted from Bryan Pardo, Machine Learning EECS 349 Machine Learning Genetic Programming.
Intro to AI Genetic Algorithm Ruth Bergman Fall 2002.
Evolutionary Computational Intelligence
Genetic Programming. Agenda What is Genetic Programming? Background/History. Why Genetic Programming? How Genetic Principles are Applied. Examples of.
Genetic Programming Dinesh Dharme Prateek Srivastav Pankhil Chheda
Genetic Algorithms Overview Genetic Algorithms: a gentle introduction –What are GAs –How do they work/ Why? –Critical issues Use in Data Mining –GAs.
Genetic Programming.
Genetic Programming Chapter 6. A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Genetic Programming GP quick overview Developed: USA.
Genetic Algorithm.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Evolution Strategies Evolutionary Programming Genetic Programming Michael J. Watts
Genetic algorithms Prof Kang Li
What is Genetic Programming? Genetic programming is a model of programming which uses the ideas (and some of the terminology) of biological evolution to.
Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!
Introduction to Evolutionary Algorithms Session 4 Jim Smith University of the West of England, UK May/June 2012.
Biological data mining by Genetic Programming AI Project #2 Biointelligence lab Cho, Dong-Yeon
GENETIC ALGORITHM A biologically inspired model of intelligence and the principles of biological evolution are applied to find solutions to difficult problems.
Brief introduction to genetic algorithms and genetic programming A.E. Eiben Free University Amsterdam.
G ENETIC P ROGRAMMING Ranga Rodrigo March 17,
Artificial Intelligence Chapter 4. Machine Evolution.
Chapter 9 Genetic Algorithms.  Based upon biological evolution  Generate successor hypothesis based upon repeated mutations  Acts as a randomized parallel.
Evolutionary Programming
Genetic Programming. GP quick overview Developed: USA in the 1990’s Early names: J. Koza Typically applied to: machine learning tasks (prediction, classification…)
Genetic Algorithms What is a GA Terms and definitions Basic algorithm.
Evolution strategies Chapter 4. A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Evolution Strategies ES quick overview Developed: Germany.
Project 2: Classification Using Genetic Programming Kim, MinHyeok Biointelligence laboratory Artificial.
Genetic Programming A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Chapter 6.
GENETIC PROGRAMMING. THE CHALLENGE "How can computers learn to solve problems without being explicitly programmed? In other words, how can computers be.
Automated discovery in math Machine learning techniques (GP, ILP, etc.) have been successfully applied in science Machine learning techniques (GP, ILP,
D Nagesh Kumar, IIScOptimization Methods: M8L5 1 Advanced Topics in Optimization Evolutionary Algorithms for Optimization and Search.
Genetic Programming COSC Ch. F. Eick, Introduction to Genetic Programming GP quick overview Developed: USA in the 1990’s Early names: J. Koza Typically.
John R. Koza [Edited by J. Wiebe] 1. GENETIC PROGRAMMING 2.
Symbolic Regression via Genetic Programming AI Project #2 Biointelligence lab Cho, Dong-Yeon
Genetic Programming Using Simulated Natural Selection to Automatically Write Programs.
Evolutionary Programming A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Chapter 5.
Genetic Programming. What is Genetic Programming? GP for Symbolic Regression Other Representations for GP Example of GP for Knowledge Discovery Outline.
A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Evolutionary Programming.
Genetic Programming.
Introduction to Genetic Algorithms
Chapter 14 Genetic Algorithms.
Genetic Algorithms Author: A.E. Eiben and J.E. Smith
Selected Topics in CI I Genetic Programming Dr. Widodo Budiharto 2014.
Genetic Algorithms.
Evolutionary Programming
Evolutionary Algorithms Jim Whitehead
Introduction Genetic programming falls into the category of evolutionary algorithms. Genetic algorithms vs. genetic programming. Concept developed by John.
Evolution Strategies Evolutionary Programming
Evolution strategies and genetic programming
Medical Diagnosis via Genetic Programming
Machine Learning Evolutionary Algorithm (2)
GENETIC PROGRAMMING BBB4003.
Optimization and Learning via Genetic Programming
Artificial Intelligence Chapter 4. Machine Evolution
Artificial Intelligence Chapter 4. Machine Evolution
Introduction to Operators
Genetic Algorithms Chapter 3.
Artificial Intelligence Chapter 4. Machine Evolution
Evolutionary Programming
Boltzmann Machine (BM) (§6.4)
Searching for solutions: Genetic Algorithms
Artificial Intelligence Chapter 4. Machine Evolution
Genetic Programming Chapter 6.
Genetic Programming Chapter 6.
Genetic Programming Chapter 6.
Evolution strategies Chapter 4.
GENETIC PROGRAMMING BBB4003.
Beyond Classical Search
Presentation transcript:

Genetic Programming

GP quick overview Developed: USA in the 1990’s Early names: J. Koza Typically applied to: machine learning tasks (prediction, classification…) Attributed features: competes with neural nets and alike needs huge populations (thousands) slow Special: non-linear chromosomes: trees, graphs mutation possible but not necessary (disputed!)

GP technical summary tableau Representation Tree structures Recombination Exchange of subtrees Mutation Random change in trees Parent selection Fitness proportional Survivor selection Generational replacement

GENETIC PROGRAMMING PROCESS

Introductory example: credit scoring Bank wants to distinguish good from bad loan applicants Model needed that matches historical data ID No of children Salary Marital status OK? ID-1 2 45000 Married ID-2 30000 Single 1 ID-3 40000 Divorced …

Introductory example: credit scoring A possible model: IF (NOC < 3) AND (S > 30000) THEN good ELSE bad In general: IF formula THEN good ELSE bad Only unknown is the right formula, hence Our search space (phenotypes) is the set of formulas Natural fitness of a formula: percentage of well classified cases of the model it stands for Natural representation of formulas (genotypes) is: parse trees

Introductory example: credit scoring IF (NOC < 3) AND (S > 30000) THEN good ELSE bad can be represented by the following tree AND S 3 NOC 30000 > <

Tree based representation Trees are a universal form, e.g. consider Arithmetic formula Logical formula Program (x  true)  (( x  y )  (z  (x  y))) i =1; while (i < 20) { i = i +1 }

Tree based representation

Tree based representation (x  true)  (( x  y )  (z  (x  y)))

Tree based representation while (i < 20) { i = i +1 }

SANTA FE ANT TRAIL (An example of GP) The picture at the left shows the Santa Fe Ant Trail. In the picture, the white dot represents the start of the trail and the red dot represents the end. Pink squares represent grid positions with food and green squares represent empty grid positions.

SANTA FE ANT TRAIL The Artificial Ant can use three operations: move, turn-right 90 degrees, turn-left 90 degrees Each of these takes one time unit. Indeed, the Artificial Ant can use one sensing function: food-ahead. It looks into the square it is currently facing and returns true or false depending upon whether that square contains food or is empty respectively. They follow two finite state machines, one if it sees food, another if it does not see food. The Santa Fe Trail consists of 144 squares with 21 turns, and the 89 units of food are distributed non-uniformly along it.

Tree based representation In GA, chromosomes are linear structures (bit strings, integer string, real-valued vectors, permutations) Tree shaped chromosomes are non-linear structures In GA, the size of the chromosomes is fixed Trees in GP may vary in depth and width

Tree based representation Symbolic expressions can be defined by Terminal set T Function set F Trees are made of several nodes. All nodes (except the first, or root node) have one parent and any number of children. In GP, the number of children a node has is called its arity. In GP, nodes with one or more children are called functions and nodes with no children are called terminals. Tree structures are traversed recursively.

In this tree, we have two functions, the plus and times operators In this tree, we have two functions, the plus and times operators. Both of these have arity 2, so they take two arguments. There are three terminals, 3, 2, and x. They simply return values that can be processed. The root node is the plus operator, since it has no parent node. Every node on the tree returns a value if we provide it with a value of x

Offspring creation scheme Compare GA scheme using crossover AND mutation sequentially (be it probabilistically) GP scheme using crossover OR mutation (chosen probabilistically)

Sub-tree Crossover:

GA flowchart GP flowchart

Mutation Most common mutation: replace randomly chosen subtree by randomly generated tree

Mutation cont’d Mutation has two parameters: Probability pm to choose mutation vs. recombination Probability to chose an internal point as the root of the subtree to be replaced Remarkably pm is advised to be 0 (Koza’92) or very small, like 0.05 (Banzhaf et al. ’98) The size of the child can exceed the size of the parent

Recombination Most common recombination: exchange two randomly chosen subtrees among the parents Recombination has two parameters: Probability pc to choose recombination vs. mutation Probability to chose an internal point within each parent as crossover point The size of offspring can exceed that of the parents

Parent 1 Parent 2 Child 1 Child 2

Selection Parent selection typically fitness proportionate Over-selection in very large populations rank population by fitness and divide it into two groups: group 1: best x% of population, group 2 other (100-x)% 80% of selection operations chooses from group 1, 20% from group 2 for pop. size = 1000, 2000, 4000, 8000 x = 32%, 16%, 8%, 4% motivation: to increase efficiency, %’s come from rule of thumb Survivor selection: Typical: generational scheme (thus none) Recently steady-state is becoming popular for its elitism

Initialisation Maximum initial depth of trees Dmax is set Full method (each branch has depth = Dmax): nodes at depth d < Dmax randomly chosen from function set F nodes at depth d = Dmax randomly chosen from terminal set T Grow method (each branch has depth  Dmax): nodes at depth d < Dmax randomly chosen from F  T nodes at depth d = Dmax randomly chosen from T Common GP initialisation: ramped half-and-half, where grow & full method each deliver half of initial population

Bloat Bloat = “survival of the fattest”, i.e., the tree sizes in the population are increasing over time Ongoing research and debate about the reasons Needs countermeasures, e.g. Prohibiting variation operators that would deliver “too big” children Parsimony pressure: penalty for being oversized

Problems involving “physical” environments Trees for data fitting vs. trees (programs) that are “really” executable Execution can change the environment  the calculation of fitness Example: robot controller Fitness calculations mostly by simulation, ranging from expensive to extremely expensive (in time) But evolved controllers are often to very good

Example application: symbolic regression Given some points in R2, (x1, y1), … , (xn, yn) Find function f(x) s.t. i = 1, …, n : f(xi) = yi Possible GP solution: Representation by F = {+, -, /, sin, cos}, T = R  {x} Fitness is the error All operators standard pop.size = 1000, ramped half-half initialisation Termination: n “hits” or 50000 fitness evaluations reached (where “hit” is if | f(xi) – yi | < 0.0001)

Discussion Is GP: The art of evolving computer programs ? Means to automated programming of computers? GA with another representation?