Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1....

44
Genetic Algorithms and Genetic Programming Michael Herrmann [email protected], phone: 0131 6 517177, Informatics Forum 1.42 Lecture 10: (27/10/09) More recent trends and Practical issues in Evolutionary Computation

Transcript of Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1....

Page 1: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

Genetic Algorithms and Genetic Programming

Michael [email protected], phone: 0131 6 517177, Informatics Forum 1.42

Lecture 10: (27/10/09)

More recent trends and Practical issues in Evolutionary Computation

Page 2: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

Overview1. Introduction: History2. The genetic code3. The canonical genetic algorithm4. Examples & Variants of GA5. The schema theorem6. Hybrid algorithms7. Evolutionary robotics8. Genetic Programming9. Genetic Programming II10. Recent and Practical issues

Page 3: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

Overview

Multiobjective OptimizationFitness-distance correlationsNo-free-lunch theorem for GAPractical issues

Page 4: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

GA for Multiobjective Optimization:Combination of fitness functions

C. M. Fonseca &P. J. Fleming (1995) An Overview of Evolutionary Algorithms in Multiobjective Optimization

Page 5: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

Multiobjective optimizationx* is Pareto optimal for a class offitness functions fi if there exists no x with

for all i)()( *xfxf ii ≥

or, equivalently, x* is not dominated byany other x.

Example: A machine is characterized by power and torque. A machine is better if -- at equal torque -- its power is higher. Unless a comparison between the two quanitities is possible, all machines along the red margin are (Pareto) optimal

Page 6: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

GA for Multiobjective optimization

Problems:Selection of fit individuals?Elitism?Pareto-optimal diversity?Speed?

BenefitsCollective search required for sampling the Pareto setNon-connected Pareto sets are OKIncorporation of constraints in fitness function

Page 7: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

Kalyanmoy Deb, Amrit Pratap, Sameer Agarwal and T. Meyarivan (2000) A Fast Elitist Multi-Objective Genetic Algorithm: NSGA-II, IEEE Transact. Evolutionary Computation 6,182-197.

conventional algorithm(also GA-style)

NSGA-II

Page 8: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

How does it work?Non-dominated sorting genetic algorithm (NSGA)Selection by non-dominated sortingPreserving diversity along the non-dominated frontUse two populations P and P’

“being dominated by”, denotes a partial order induced by a set of fitness functions

Complexity per step: O(MN2)

Page 9: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

“Ranking” 1. front

3. front

2. front

Page 10: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

Preserving diversity

New distance measure: first rank, then lowest density:

values of m-th fitness function

Page 11: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

NSGA-II

mainloop

Page 12: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

Performance

For comparison: (1 parent, 1 child) Pareto-archived Evolution Strategy (PAES by Knowles and Corne)

left: Performance similar, NSGA-II has better distributionright: Even spread of the solution is a further goal that here compromises Pareto optimality of NSGA-II. (optimality is towards down and left)

Page 13: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

(f1,…,fn)(d1,…,dn)

, i.e. the smaller the distance the higher the fitness

Page 14: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 15: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 16: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

Deceptive fitness functions

A sub-schema is more specific then a schema(i.e. as a subset it is smaller then the superset)A schema is deceptive if the sub-schema that contains the deceptive attractor is no worse than all other sub-schemata in the schemaA fitness function is fully deceptive if all schemas are deceptive (e.g. f(x)=(#1’s) if x≠0 and f(0)=n+1)FDC may not be a good indicator of deceptiveness forthe following functions: f(x)=max{(#1’s), (#0’s)}+εI(x=0)

n/2 +ε

(#1’s)

n/2

n/2

f

Page 17: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 18: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

Objectives:Visualization and prediction of difficulty of a problem based on the prediction of GA behaviour on a number of reasonably well-studied problemsAre the predicted results reproducible?“Surprises” when using royal road fitness functionsEffect of differences in coding and representationConnection between GAs and heuristic search

Fitness-Distance Correlation

Previous slide: T Jones, S Forrest (1995) Fitness distance correlation as a measure of problem difficulty for genetic algorithms. Neural Information Processing Systems.

Page 19: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

GA and GPGenetic Algorithms and Genetic Programming are related fieldsGAs use a fixed length linear representationGP uses a variable size tree representation(variable length means variable length up to some fixed limit)Representations and genetic operators of GA and GP appear different, (ultimately they are populations of bit strings in the computer’s memory)The important difference lies in the interpretation of the representation: 1-to-1 mapping between the description of an object and the object itself (GA) or a many-to-1 mapping (GP)No Free Lunch theorem is valid for 1-to-1 mappings but not for many-to-1 mappings Many of the empirical results discovered in one field apply to the other field e.g. maintaining high diversity in a population improves performance

Woodward (2003)

Page 20: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

No-Free-Lunch TheoremsStatement: − Averaged over all problems− For any performance metric related to number of

distinct data points− All non-revisiting black-box algorithms will display

the same performanceImplications− If a new black box algorithm is good for one

problem → it is probably poor for another one− There are as many deceptive as easy fitness

functions− Makes sense not to use “black-box algorithms”

Ongoing work showing counterexamples given specific constraints

Wolpert & Macready (1997) No Free Lunch Theorems for Optimization IEEE Transact Evolutionary Computation 1, 67

Page 21: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

Next (fifth) tutorials: Pragmatics of GA designWork yourself through slides 21-44. At the tutorials some exam-style questions will be available for you to be answered in class.

Page 22: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 23: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 24: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 25: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 26: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 27: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 28: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 29: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 30: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 31: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 32: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 33: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 34: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 35: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 36: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 37: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 38: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 39: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 40: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 41: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 42: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 43: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &
Page 44: Genetic Algorithms and Genetic Programming Lecture 10: … · 2009-10-27 · Overview 1. Introduction: History 2. The genetic code 3. The canonical genetic algorithm 4. Examples &

Next (fifth) tutorials: Pragmatics of GA designWork yourself through slides 21-44. At the tutorials some exam-style questions will be available for you to be answered in class.