2 what genetic programming isn't: what genetic programming isn't: engineering a breed of...

18

Post on 30-Jan-2016

227 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing
Page 2: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing

22

What Genetic Programming ISN'T:What Genetic Programming ISN'T:Engineering a breed of purple carrots.Engineering a breed of purple carrots.Analyzing the human genomeAnalyzing the human genomeA way to create smarter humans.A way to create smarter humans.

What Genetic Programming IS:What Genetic Programming IS:A way to create smarter computers.A way to create smarter computers.Fun.Fun.

Page 3: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing

33

A big Q in A.I.A big Q in A.I.

"How can computers learn to solve "How can computers learn to solve problems without being explicitly problems without being explicitly programmed?" programmed?"

Arthur Samuel (1959)Arthur Samuel (1959)0 01

0

1 011

Page 4: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing

44

The GP Guide to EvolutionThe GP Guide to Evolution

Charles Darwin

Page 5: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing

55

Charles Darwin Charles Darwin

Page 6: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing

66

Gregor MendelGregor Mendel

“The Father of Genetics”

Page 7: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing

77

““The Code is Alive”The Code is Alive”

Page 8: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing

88

Basic Steps of GPBasic Steps of GP

1.1. Populate Generation 0 with random Populate Generation 0 with random computer programs.computer programs.

1.1. Evaluate how “fit” each program is.Evaluate how “fit” each program is.

2.2. Is the “best-so-far” program “fit Is the “best-so-far” program “fit enough”?enough”?

3.3. Use the “fitness” values to determine Use the “fitness” values to determine which programs will produce offspring, which programs will produce offspring, to create the Next Generation.to create the Next Generation.

2.2. Output the “best-so-far” program.Output the “best-so-far” program.

Page 9: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing

99

PreparationPreparation

Program IngredientsProgram Ingredients(math? “rt 90”? “ifelse”? “fd 1.0”?)(math? “rt 90”? “ifelse”? “fd 1.0”?)

Fitness Measure Fitness Measure How good (attractive) is a program How good (attractive) is a program

(creature)?(creature)?

Parameters Parameters (e.g. pop. size, mutation probability, etc.)(e.g. pop. size, mutation probability, etc.)

Page 10: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing

1010

Example: Symbolic RegressionExample: Symbolic Regression

Given: Some points

Find: f(x) = x2 + x + 1

Ingredients {x, random constants {x, random constants between -5.0 and 5.0}between -5.0 and 5.0}{+, -, *, {+, -, *, (protected division)(protected division)}}

A “program” is a math function.

Page 11: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing

1111

Into the DNA Forest…Into the DNA Forest…

Generation 0

A program is just a tree.

Pop. Size = 4

(x + 1) – 0 1 + (x * x) 2 + 0 x * (-1 – (-2))

Page 12: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing

1212

Fitness MeasureFitness Measure

.67 1.00 1.70 2.67

Page 13: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing

1313

The Birds and the Bytes…The Birds and the Bytes…

3 Fundamental Genetic Operations3 Fundamental Genetic OperationsCloning (Asexual Reproduction)Cloning (Asexual Reproduction)MutationMutationCrossover (Recombination)Crossover (Recombination)

Page 14: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing

1414

CloningCloning

Fitness = .67

Generation 0 Generation 1

COPY

Fitness = .67

Page 15: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing

1515

MutationMutation

Fitness = 1.70

Generation 0 Generation 1

Mutate

Fitness = ?

Page 16: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing

1616

CrossoverCrossover

Crossover

Generation 0 Generation 1

Page 17: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing

1717

Gen 0Gen 0 Gen 1Gen 1

Copy

MutateCrossover

Page 18: 2 What Genetic Programming ISN'T: What Genetic Programming ISN'T: Engineering a breed of purple carrots. Engineering a breed of purple carrots. Analyzing

1818

On to the turtles...On to the turtles...

Genetic Programming in NetLogo...