SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Downloaden Sie, um offline zu lesen
THE WAY OFTHE
COMBINATOR
Bill Worzel billwzel@gmail.com
Evolution Enterprises http://evolver.biz
GPTheory and Practice 08 May 2014
Ann Arbor, MI
THE SKGP
• 15 years ago we developed what was then a novel approach
to GP using combinators
• Strongly typed, efficient, powerful, reusable code
• Algorithm can become superlinear in parallel application
because of code reuse
COMBINATORS
• Applicative algebra, derived from Lambda calculus,
binds left-to-right
• Sxyz -> xz(yz)
• Kxy -> x
• Ix -> x
• Bxyz -> x(yz)
• Cxyz -> xzy
• Yx -> x(Yx)Combinators Functions Quickly
VARIABLE ABSTRACTION
• D.A.Turner showed that removing bound variables using
combinators could produce an efficient computing system
(Turner 1979, A New Implementation Technique for Applicative
Languages, Software–Practice and Experience, vol 9, 31-49 )
• Essentially this used the fact we can create expressions that
are variable free using combinators to create a highly efficient
computer system (Clarke 1980)
THE SKGP
• Implements programs as graphs using combinators with
GP to produce pure functional (combinator) expressions
• Uses strong typing similar to (Yu 1997, 1998)
EVALUATING COMBINATOR
EXPRESSION
Example:
‘S(S(K +)(K 1))I’
is a curried
function that
adds 1 to what
it is applied to
so S(S(K +)(K
1)I applied to 3
is:
S(S(K +)(K 1))I 3
S(K +)(K 1)3(I 3)
K+3((K 1)3)(I 3)
+K 1 3 (I 3)
+ 1 (I 3)
+ 1 3
4
COMBINATORS FUNCTIONS
QUICKLY BECOME COMPLEX
Here is the function for factorial:
def fac = S(S(S(K cond)(S(S(K =)(K 0)))I))(K 1))(S(S(K *)I)
(S(K fac)(S(S(K -)I)(K 1))))
Evaluation is left as an “exercise to the reader.”
COMBINATOR GRAPHS
• Combinator expressions
represented as graphs
• + 1 2
• fxyz
• Sfgx -> fx(gx)
TYPING GP
• The SKGP is strongly typed so that it is always “type coherent”
• Based on Hindley/Milner type system as described in (Yu
1997) but for combinators instead of lambda expressions
• Type is checked during graph creation and resolved at time of
mutation and crossover - static typing
• If cannot resolve type, back out and try again by creating a
new subtree
• Strongly typed system will always terminate with same type
(halting problem?)
ESCAPINGTHE BOTTLE
• (Daida 2003) describes limitation
of standard GP in how trees grow
• Presents evidence that GP can be
limited in its search ability without
structure altering operators
• Combinators have the property
of being ‘structure altering
operators’
Daida, unpublished based on Daida 2004
Demonstrating Constraints to Diversity with a
Tunably Difficulty Problem for Genetic Programming
CHURCH-ROSSERTHEOREM
• The Church-RosserTheorem says pure function evaluation
can be order independent: Regardless of order of evaluation,
result will be the same
• Because of this, each functional piece, when evaluated, can be
stored for re-use since order of evaluation does not matter
• Normally this is inefficient since some pieces are not used
• Because GP shares pieces across generations, reuse gives
super-linear speed up: you don’t have to recompute each
component
REAL WORLD GP USING SKGP
• (Briggs 2006) shows such a system benchmarks well
(regression, parity, stack & queue evolution)
• What about real world problems?
• Process control program for manufacturing process
• Modeling chemical kinetics for NASA
• Bladder cancer analysis differentiating nodal metastatic
cancer from non-metastatic cancer
• Colon cancer prognostic
FUTURE DIRECTIONS
• Reuse of combinator
expressions across
generations via caching
mechanism
• Solving the ‘Y problem’
• Adding chromosome
structure

Weitere ähnliche Inhalte

Andere mochten auch

Billion Dollar Startup Advice from Y Combinator
Billion Dollar Startup Advice from Y CombinatorBillion Dollar Startup Advice from Y Combinator
Billion Dollar Startup Advice from Y CombinatorJim Rettew
 
Денис Гурський
Денис ГурськийДенис Гурський
Денис ГурськийSmartLviv
 
Final nzl incubation 23 sepv2
Final nzl incubation 23 sepv2Final nzl incubation 23 sepv2
Final nzl incubation 23 sepv2Hanisevae Visanti
 
[InDMF 2013] Indra Purnama - Incubator Role in Startup Industry
[InDMF 2013] Indra Purnama - Incubator Role in Startup Industry[InDMF 2013] Indra Purnama - Incubator Role in Startup Industry
[InDMF 2013] Indra Purnama - Incubator Role in Startup IndustrySegitiga.Net
 
Technology business incubator
Technology business incubatorTechnology business incubator
Technology business incubatorRajni Ranjan
 
Nurturing The Start Up Company
Nurturing The Start Up CompanyNurturing The Start Up Company
Nurturing The Start Up Companyignatiadis
 
The Personal incubation Philosophy of Candace Ngina Brathwaite Babson MBA and...
The Personal incubation Philosophy of Candace Ngina Brathwaite Babson MBA and...The Personal incubation Philosophy of Candace Ngina Brathwaite Babson MBA and...
The Personal incubation Philosophy of Candace Ngina Brathwaite Babson MBA and...Candace Ngina Brathwaite
 
Hans Y Combinator Presentation on Lessons from China for Global Entrepreneurs
Hans Y Combinator Presentation on Lessons from China for Global EntrepreneursHans Y Combinator Presentation on Lessons from China for Global Entrepreneurs
Hans Y Combinator Presentation on Lessons from China for Global EntrepreneursGGV Capital
 
The Startup Factories: The Rise of Accelerator Programs
The Startup Factories: The Rise of Accelerator ProgramsThe Startup Factories: The Rise of Accelerator Programs
The Startup Factories: The Rise of Accelerator ProgramsVasily Ryzhonkov
 
Incubator models
Incubator modelsIncubator models
Incubator modelsNIABI
 

Andere mochten auch (10)

Billion Dollar Startup Advice from Y Combinator
Billion Dollar Startup Advice from Y CombinatorBillion Dollar Startup Advice from Y Combinator
Billion Dollar Startup Advice from Y Combinator
 
Денис Гурський
Денис ГурськийДенис Гурський
Денис Гурський
 
Final nzl incubation 23 sepv2
Final nzl incubation 23 sepv2Final nzl incubation 23 sepv2
Final nzl incubation 23 sepv2
 
[InDMF 2013] Indra Purnama - Incubator Role in Startup Industry
[InDMF 2013] Indra Purnama - Incubator Role in Startup Industry[InDMF 2013] Indra Purnama - Incubator Role in Startup Industry
[InDMF 2013] Indra Purnama - Incubator Role in Startup Industry
 
Technology business incubator
Technology business incubatorTechnology business incubator
Technology business incubator
 
Nurturing The Start Up Company
Nurturing The Start Up CompanyNurturing The Start Up Company
Nurturing The Start Up Company
 
The Personal incubation Philosophy of Candace Ngina Brathwaite Babson MBA and...
The Personal incubation Philosophy of Candace Ngina Brathwaite Babson MBA and...The Personal incubation Philosophy of Candace Ngina Brathwaite Babson MBA and...
The Personal incubation Philosophy of Candace Ngina Brathwaite Babson MBA and...
 
Hans Y Combinator Presentation on Lessons from China for Global Entrepreneurs
Hans Y Combinator Presentation on Lessons from China for Global EntrepreneursHans Y Combinator Presentation on Lessons from China for Global Entrepreneurs
Hans Y Combinator Presentation on Lessons from China for Global Entrepreneurs
 
The Startup Factories: The Rise of Accelerator Programs
The Startup Factories: The Rise of Accelerator ProgramsThe Startup Factories: The Rise of Accelerator Programs
The Startup Factories: The Rise of Accelerator Programs
 
Incubator models
Incubator modelsIncubator models
Incubator models
 

Ähnlich wie Gptp 2014 way of the combinator

Implementing Operations to combine Feature Models: The Partial lntersection Case
Implementing Operations to combine Feature Models: The Partial lntersection CaseImplementing Operations to combine Feature Models: The Partial lntersection Case
Implementing Operations to combine Feature Models: The Partial lntersection CaseJaime Chavarriaga
 
Genetic programming
Genetic programmingGenetic programming
Genetic programmingYun-Yan Chi
 
What To Leave Implicit
What To Leave ImplicitWhat To Leave Implicit
What To Leave ImplicitMartin Odersky
 
A Mixed Discrete-Continuous Attribute List Representation for Large Scale Cla...
A Mixed Discrete-Continuous Attribute List Representation for Large Scale Cla...A Mixed Discrete-Continuous Attribute List Representation for Large Scale Cla...
A Mixed Discrete-Continuous Attribute List Representation for Large Scale Cla...jaumebp
 
Varaiational formulation fem
Varaiational formulation fem Varaiational formulation fem
Varaiational formulation fem Tushar Aneyrao
 
Algorithms and Data Structures
Algorithms and Data StructuresAlgorithms and Data Structures
Algorithms and Data Structuressonykhan3
 
What To Leave Implicit
What To Leave ImplicitWhat To Leave Implicit
What To Leave ImplicitMartin Odersky
 
Improving Software Quality Using Object Oriented Design Principles
Improving Software Quality Using Object Oriented Design PrinciplesImproving Software Quality Using Object Oriented Design Principles
Improving Software Quality Using Object Oriented Design PrinciplesDr. Syed Hassan Amin
 
Case Based Reasoning
Case Based ReasoningCase Based Reasoning
Case Based Reasoningamironline
 
BSSML17 - Logistic Regressions
BSSML17 - Logistic RegressionsBSSML17 - Logistic Regressions
BSSML17 - Logistic RegressionsBigML, Inc
 
Lecture 8 - Feature Engineering and Optimization, a lecture in subject module...
Lecture 8 - Feature Engineering and Optimization, a lecture in subject module...Lecture 8 - Feature Engineering and Optimization, a lecture in subject module...
Lecture 8 - Feature Engineering and Optimization, a lecture in subject module...Maninda Edirisooriya
 
Foundations of Machine Learning - StampedeCon AI Summit 2017
Foundations of Machine Learning - StampedeCon AI Summit 2017Foundations of Machine Learning - StampedeCon AI Summit 2017
Foundations of Machine Learning - StampedeCon AI Summit 2017StampedeCon
 
Booting into functional programming
Booting into functional programmingBooting into functional programming
Booting into functional programmingDhaval Dalal
 
Data Structures 2007
Data Structures 2007Data Structures 2007
Data Structures 2007Sanjay Goel
 
General Tips for participating Kaggle Competitions
General Tips for participating Kaggle CompetitionsGeneral Tips for participating Kaggle Competitions
General Tips for participating Kaggle CompetitionsMark Peng
 

Ähnlich wie Gptp 2014 way of the combinator (20)

Implementing Operations to combine Feature Models: The Partial lntersection Case
Implementing Operations to combine Feature Models: The Partial lntersection CaseImplementing Operations to combine Feature Models: The Partial lntersection Case
Implementing Operations to combine Feature Models: The Partial lntersection Case
 
Genetic programming
Genetic programmingGenetic programming
Genetic programming
 
What To Leave Implicit
What To Leave ImplicitWhat To Leave Implicit
What To Leave Implicit
 
Fuzz2
Fuzz2Fuzz2
Fuzz2
 
A Mixed Discrete-Continuous Attribute List Representation for Large Scale Cla...
A Mixed Discrete-Continuous Attribute List Representation for Large Scale Cla...A Mixed Discrete-Continuous Attribute List Representation for Large Scale Cla...
A Mixed Discrete-Continuous Attribute List Representation for Large Scale Cla...
 
Varaiational formulation fem
Varaiational formulation fem Varaiational formulation fem
Varaiational formulation fem
 
Eurosport's Kodakademi #2
Eurosport's Kodakademi #2Eurosport's Kodakademi #2
Eurosport's Kodakademi #2
 
Algorithms and Data Structures
Algorithms and Data StructuresAlgorithms and Data Structures
Algorithms and Data Structures
 
What To Leave Implicit
What To Leave ImplicitWhat To Leave Implicit
What To Leave Implicit
 
Operations Research
Operations ResearchOperations Research
Operations Research
 
Improving Software Quality Using Object Oriented Design Principles
Improving Software Quality Using Object Oriented Design PrinciplesImproving Software Quality Using Object Oriented Design Principles
Improving Software Quality Using Object Oriented Design Principles
 
Classification.pptx
Classification.pptxClassification.pptx
Classification.pptx
 
Case Based Reasoning
Case Based ReasoningCase Based Reasoning
Case Based Reasoning
 
BSSML17 - Logistic Regressions
BSSML17 - Logistic RegressionsBSSML17 - Logistic Regressions
BSSML17 - Logistic Regressions
 
Lecture 8 - Feature Engineering and Optimization, a lecture in subject module...
Lecture 8 - Feature Engineering and Optimization, a lecture in subject module...Lecture 8 - Feature Engineering and Optimization, a lecture in subject module...
Lecture 8 - Feature Engineering and Optimization, a lecture in subject module...
 
Foundations of Machine Learning - StampedeCon AI Summit 2017
Foundations of Machine Learning - StampedeCon AI Summit 2017Foundations of Machine Learning - StampedeCon AI Summit 2017
Foundations of Machine Learning - StampedeCon AI Summit 2017
 
Booting into functional programming
Booting into functional programmingBooting into functional programming
Booting into functional programming
 
Biostatistics ppt.pptx
Biostatistics ppt.pptxBiostatistics ppt.pptx
Biostatistics ppt.pptx
 
Data Structures 2007
Data Structures 2007Data Structures 2007
Data Structures 2007
 
General Tips for participating Kaggle Competitions
General Tips for participating Kaggle CompetitionsGeneral Tips for participating Kaggle Competitions
General Tips for participating Kaggle Competitions
 

Gptp 2014 way of the combinator

  • 1. THE WAY OFTHE COMBINATOR Bill Worzel billwzel@gmail.com Evolution Enterprises http://evolver.biz GPTheory and Practice 08 May 2014 Ann Arbor, MI
  • 2. THE SKGP • 15 years ago we developed what was then a novel approach to GP using combinators • Strongly typed, efficient, powerful, reusable code • Algorithm can become superlinear in parallel application because of code reuse
  • 3. COMBINATORS • Applicative algebra, derived from Lambda calculus, binds left-to-right • Sxyz -> xz(yz) • Kxy -> x • Ix -> x • Bxyz -> x(yz) • Cxyz -> xzy • Yx -> x(Yx)Combinators Functions Quickly
  • 4. VARIABLE ABSTRACTION • D.A.Turner showed that removing bound variables using combinators could produce an efficient computing system (Turner 1979, A New Implementation Technique for Applicative Languages, Software–Practice and Experience, vol 9, 31-49 ) • Essentially this used the fact we can create expressions that are variable free using combinators to create a highly efficient computer system (Clarke 1980)
  • 5. THE SKGP • Implements programs as graphs using combinators with GP to produce pure functional (combinator) expressions • Uses strong typing similar to (Yu 1997, 1998)
  • 6. EVALUATING COMBINATOR EXPRESSION Example: ‘S(S(K +)(K 1))I’ is a curried function that adds 1 to what it is applied to so S(S(K +)(K 1)I applied to 3 is: S(S(K +)(K 1))I 3 S(K +)(K 1)3(I 3) K+3((K 1)3)(I 3) +K 1 3 (I 3) + 1 (I 3) + 1 3 4
  • 7. COMBINATORS FUNCTIONS QUICKLY BECOME COMPLEX Here is the function for factorial: def fac = S(S(S(K cond)(S(S(K =)(K 0)))I))(K 1))(S(S(K *)I) (S(K fac)(S(S(K -)I)(K 1)))) Evaluation is left as an “exercise to the reader.”
  • 8. COMBINATOR GRAPHS • Combinator expressions represented as graphs • + 1 2 • fxyz • Sfgx -> fx(gx)
  • 9. TYPING GP • The SKGP is strongly typed so that it is always “type coherent” • Based on Hindley/Milner type system as described in (Yu 1997) but for combinators instead of lambda expressions • Type is checked during graph creation and resolved at time of mutation and crossover - static typing • If cannot resolve type, back out and try again by creating a new subtree • Strongly typed system will always terminate with same type (halting problem?)
  • 10. ESCAPINGTHE BOTTLE • (Daida 2003) describes limitation of standard GP in how trees grow • Presents evidence that GP can be limited in its search ability without structure altering operators • Combinators have the property of being ‘structure altering operators’ Daida, unpublished based on Daida 2004 Demonstrating Constraints to Diversity with a Tunably Difficulty Problem for Genetic Programming
  • 11. CHURCH-ROSSERTHEOREM • The Church-RosserTheorem says pure function evaluation can be order independent: Regardless of order of evaluation, result will be the same • Because of this, each functional piece, when evaluated, can be stored for re-use since order of evaluation does not matter • Normally this is inefficient since some pieces are not used • Because GP shares pieces across generations, reuse gives super-linear speed up: you don’t have to recompute each component
  • 12. REAL WORLD GP USING SKGP • (Briggs 2006) shows such a system benchmarks well (regression, parity, stack & queue evolution) • What about real world problems? • Process control program for manufacturing process • Modeling chemical kinetics for NASA • Bladder cancer analysis differentiating nodal metastatic cancer from non-metastatic cancer • Colon cancer prognostic
  • 13. FUTURE DIRECTIONS • Reuse of combinator expressions across generations via caching mechanism • Solving the ‘Y problem’ • Adding chromosome structure