evolutionary robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ genotype' phenotype'...

46
Evolutionary Robotics

Upload: others

Post on 29-Sep-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Evolutionary Robotics

Page 2: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Genetic Algorithm

• Let’s evolve a pancake recipe

• Need:• representation/encoding• mutation• fitness function• selection

Page 3: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Genetic Algorithm

• Representation/Encoding• binary

- 0001110101010101010111010101010

• real- 3.4, 0.2, -5.6, ....

• What do we need to represent?

Page 4: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Genetic Algorithm

• Mutation• binary

- per site vs. per genome rate

• real:- uniform/gaussian/other

- gaussian: variance?

• note: mutations usually “deleterious”• good rule of thumb: 1 genomic

Page 5: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Genetic Algorithm

• Fitness Function• options?

Page 6: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Genetic Algorithm

• Selection• options?

Page 7: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Concepts

• Many terms and concepts you should learn

• Mostly applies to all optimization, AI, machine learning

• Tend to use biological language

• Equip your conceptual toolbox

Page 8: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Fitness Landscapes

• Sewall Wright (1932)

• Terms• Higher= better

- Peaks, Valleys, Plateaus, Global/Local Optima

• Lower= better- Minima, Basins, Global/Local Minima

Genotype

Fitn

ess

Page 9: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Fitness Landscape

•Sewall Wright (1932)

•Walk around (via mutation/permutation)

•neighboring solutions have similar values

fitness valley

fitness peak

note: often inverted

Page 10: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Smooth Rugged More Rugged

Fitness Landscapes

Very Rugged

Page 11: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Needle In Haystack

Fitness Landscapes

Page 12: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Selection Options

Selection: • Truncation• Fitness Proportional• Tournament• Random

Page 13: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Selection: • Truncation• Fitness Proportional• Tournament• Random

Selection Options

Page 14: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Selection: • Truncation• Fitness Proportional• Tournament• Random

Selection Options

Page 15: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Selection: • Truncation• Fitness Proportional• Tournament• Random

Selection Options

Page 16: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Fitness Landscapes & Selection

Selection: • Truncation• Fitness Proportional• Tournament• Random

!

Note: they all have parameters

Page 17: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Epistasis

• aka “Interaction Effects”

geneA, geneB, geneC

geneA, geneX, geneY

geneA increases fitness

geneA decreases fitness

Page 18: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Pleiotropy

geneA

Pale Skin

Red Hair

Freckles

Page 19: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Crossover

• Exchanging DNA between organisms• Note: Horizontal Gene Transfer is another means of exchange

Page 20: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Crossover

Can combine good “building blocks”

geneA, geneB, geneC, geneD, geneE, geneF, geneG

geneA’, geneB, geneC’, geneD, geneE’, geneF, geneG’

Mom

Dad

geneA’, geneB, geneC’, geneD, geneE, geneF, geneG

geneA’, geneB, geneC’, geneD, geneE’, geneF, geneG

Mom

Dad

Page 21: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Crossover

Can reduce “genetic load”: deleterious mutations

geneA, geneB, geneC, geneD, geneE, geneF, geneG

geneA’, geneB, geneC’, geneD, geneE’, geneF, geneG’

Mom

Dad

geneA’, geneB, geneC’, geneD, geneE, geneF, geneG

geneA, geneB, geneC, geneD, geneE’, geneF, geneG’

Mom

Dad

Page 22: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Crossover

• Kinds• One-point• Two-point• Uniform

Page 23: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Building Blocks

• How are they affected by crossover?• one point• two point• uniform

geneA’, geneB, geneC’, geneD, geneE , geneF, geneG

geneA , geneB, geneC , geneD, geneE’, geneF, geneG’

sub-solution

sub-solution

Page 24: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Crossover

Misevic et al. Proc. Royal Society. 2006

Page 25: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Nature’s Encoding

Page 26: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Evolutionary Algorithms (EAs)

Encode Problem

Generate Population

Score PopulationSelect Parents

mutation and/or recombination

1 2 3 4 W L.2 .1 .5 .2 1 .9

genome

Page 27: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Encodings

how information is stored in a genome + process that produces phenotype

gattaca ccatgat tggacct

Page 28: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Direct vs. Generative Encodings

Direct Encoding: each genotypic element specifies an independent phenotypic element

Genotype Phenotype leg 1: 2’ leg 2: 2’ leg 3: 2’ leg 4: 2’

Page 29: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Genotype Phenotype leg 1: 2’ leg 2: 2’ leg 3: 2’ leg 4: 2’

Genotype' Phenotype' leg 1: 2’ leg 2: 2’ leg 3: 1’ leg 4: .5’

Direct vs. Generative Encodings

Direct Encoding: each genotypic element specifies an independent phenotypic element

Page 30: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Genotype Phenotype leg 1: 2’ leg 2: 2’ leg 3: 2’ leg 4: 2’

Genotype' Phenotype' leg 1: 2’ leg 2: 2’ leg 3: 1’ leg 4: .5’

X

Direct vs. Generative Encodings

Direct Encoding: each genotypic element specifies an independent phenotypic element

Page 31: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Genotype Phenotype leg 1: 2’ leg 2: 2’ leg 3: 2’ leg 4: 2’

Genotype Phenotype

4x leg: 2’

Genotype' Phenotype' leg 1: 2’ leg 2: 2’ leg 3: 1’ leg 4: .5’

Direct vs. Generative Encodings

X

Direct Encoding: each genotypic element specifies an independent phenotypic element

Generative Encoding: genotypic elements can influence many phenotypic elements

Page 32: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Genotype Phenotype leg 1: 2’ leg 2: 2’ leg 3: 2’ leg 4: 2’

Genotype' Phenotype' leg 1: 2’ leg 2: 2’ leg 3: 1’ leg 4: .5’

Genotype Phenotype

4x leg: 2’

Genotype' Phenotype'

4x leg: 1’

Direct vs. Generative Encodings

X

Direct Encoding: each genotypic element specifies an independent phenotypic element

Generative Encoding: genotypic elements can influence many phenotypic elements

Page 33: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Desirable properties

• Coordinated mutational effects

• Scalability

• Low dimensional search, highly complex phenotype

• Structural Organization

• Regularity...with and without variation

• Modularity

• Hierarchy

Generative Encodings

Page 34: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Regularityreuse of information

compressibility

Lipson (2007)

irregular

less compressible

irregularity

less compressible

Page 35: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Regularity

multiple regularities

Page 36: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Generative EncodingDirect Encoding

Hornby (2005)

Examples of Regularity in Generative Encodings

Page 37: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Previous Work

• Generative outperforms direct on regular problems

• No tests across a continuum of problem regularity

Page 38: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Game Plan

• Case-study: generative encoding vs. direct encoding • as problem regularity varies

• HyperNEAT • Has a good direct encoding control

• Based on an important concept from developmental biology

2011

Page 39: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

• Generative encoding...

• ...where cell fate is a function of geometric position

How nature builds complexity

Page 40: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Development involves producing complex coordinate frames

Sean Carroll: Endless Forms Most Beautiful (2005)

How nature builds complexity

Page 41: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

How nature builds complexity

Page 42: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

encodes phenotypic elements as a function of their geometric location

Compositional Pattern Producing Networks (CPPNs) Stanley 2007

Page 43: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Adapted from: Stanley (2007)

x y

value at x,y

y

x... for all x,y coordinates

genome f(x,y) = fate

Compositional Pattern Producing Networks (CPPNs) Stanley 2007

Page 44: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Adapted from: Stanley (2007)

asymmetry • f(x) left-right • f(y) anterior-posterior symmetry • gaussian(x) proximal-distal repetition • within segment symmetric anterior-posterior

x y

value at x,y

y

x

gaussian(x)

sine(y)

... for all x,y coordinates

Compositional Pattern Producing Networks (CPPNs) Stanley 2007

Page 45: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

picbreeder.org

Compositional Pattern Producing Networks (CPPNs) Stanley 2007

Page 46: Evolutionary Robotics - pdfs.semanticscholar.org€¦ · leg 4: 2’ Genotype' Phenotype' leg 1: 2’! leg 2: 2’! leg 3: 1’! leg 4: .5’ X Direct vs. Generative Encodings Direct

Previous Generative Encodings

Sims 1994

Dawkins 1986Hornby & Pollack 2002