Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Evolutionary Algorithms Session 4 Jim Smith University of the West of England, UK May/June 2012.

Similar presentations


Presentation on theme: "Introduction to Evolutionary Algorithms Session 4 Jim Smith University of the West of England, UK May/June 2012."— Presentation transcript:

1 Introduction to Evolutionary Algorithms Session 4 Jim Smith University of the West of England, UK May/June 2012

2 Example of learning models from data – Continuous Representations – Tree-based Representations Practical session with Genetic Programming 2 Overview

3 Real valued problems Many problems occur as real valued problems, e.g. continuous parameter optimisation f :  n   Illustration: Ackley’s function (often used in EC) 3

4 Floating point mutations 4 Each gene is changed independently: x -> x’ by adding a random number Simple Uniform mutation: x’ = Rand[LB,UB]. Analogous to bit-flipping or resetting, loses all sense of locality, no exploitation Most common method to use a Gaussian distribution and then restrict to range [LB,UB].

5 Crossover operators for real valued GAs Discrete: – each gene in offspring comes from one of its parents with equal probability. Intermediate – exploits idea of creating children “between” parents (hence a.k.a. arithmetic recombination) – ith gene of offspring =  parent1 i + (1 -  ) parent2 i where  : 0    1. – The parameter  can be: constant: uniform arithmetical crossover variable (e.g. depend on the age of the population) picked at random every time 5

6 6 Demo2: Es for moving targets

7 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 }

8 Tree based representation

9 (x  true)  (( x  y )  (z  (x  y)))

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

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

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

13 Mutation cont’d Mutation has two parameters: – Probability p m to choose mutation vs. recombination – Probability to chose an internal point as the root of the subtree to be replaced Remarkably p m 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

14 Recombination Most common recombination: exchange two randomly chosen subtrees among the parents Recombination has two parameters: – Probability p c 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

15 Child 2 Parent 1Parent 2 Child 1

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

17 EAsare widely used to search sets of possible: – Designs e.g. optimisation – Sequences e.g path finding, scheduling,… – Models – e.g. data mining / machine learning Much of their strength comes from lack of assumptions. Lots of free implementations mean you can focus on: – representing your problem – Giving fitness to a solution 17 Summary

18 www.bit.uwe.ac.uk/~jsmith/UNESPcourse/EC4.html Using EAs to build a model from data: – Given a set of labelled data (experiences, stimulus- response, cause-effect,...) task is to find a model that maps inputs onto the right outputs – learning to recognise things, characterising opponents, diagnostic support,... So we can then use it to for future data – Predicting weather, stock market, … – Classifying images, fraud, … 18 Practical Activity:


Download ppt "Introduction to Evolutionary Algorithms Session 4 Jim Smith University of the West of England, UK May/June 2012."

Similar presentations


Ads by Google