Date post: | 30-Jan-2016 |
Category: |
Documents |
View: | 222 times |
Download: | 1 times |
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.
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
44
The GP Guide to EvolutionThe GP Guide to Evolution
Charles Darwin
55
Charles Darwin Charles Darwin
66
Gregor MendelGregor Mendel
“The Father of Genetics”
77
““The Code is Alive”The Code is Alive”
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.
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.)
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.
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))
1212
Fitness MeasureFitness Measure
.67 1.00 1.70 2.67
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)
1414
CloningCloning
Fitness = .67
Generation 0 Generation 1
COPY
Fitness = .67
1515
MutationMutation
Fitness = 1.70
Generation 0 Generation 1
Mutate
Fitness = ?
1616
CrossoverCrossover
Crossover
Generation 0 Generation 1
1717
Gen 0Gen 0 Gen 1Gen 1
Copy
MutateCrossover
1818
On to the turtles...On to the turtles...
Genetic Programming in NetLogo...