Download presentation
Presentation is loading. Please wait.
Published byPatrick Paul Modified over 9 years ago
1
Strongly Formed Genetic Programming 06/19/2013
2
Agenda Strongly formed genetic programming (SFGP) Where it fits Current progress Next steps
3
SFGP GP for evolving programs [Castle2012] Uses basic programming constructs to generate code for a given problem Extends previous work in Strongly Typed Genetic Programming [Montana1995] Nodes specify data-type constraints on inputs Removes need for closure No restraint on tree structure as typical grammars Data-type constraints provide structure No control structure found in imperative programming constructs
4
SFGP Extends STGP by imposing extra node restrictions Node must define: Data-type (integer, float, etc.) Node-type Allowable child terminals or non-terminals For example, Assignment node must have a first child that is both an integer and a variable Must be satisfied throughout evolutionary process
5
SFGP Extends STGP by imposing extra node restrictions Node must define: Data-type (integer, float, etc.) Node-type Allowable child terminals or non-terminals For example, Assignment node must have a first child that is an integer and a variable Must be satisfied throughout evolutionary process Assignment Integer Variable Integer Expression int var = 5;
6
SFGP Extends STGP by imposing extra node restrictions Node must define: Data-type (integer, float, etc.) Node-type Allowable child terminals or non-terminals For example, Assignment node must have a first child that is an integer and a variable Must be satisfied throughout evolutionary process For Loop Integer Variable Code Block Integer Expression for (int i = 0; i < 20; ++i) { Code Block } IteratorUpper Bound
7
SFGP Types Top-level Subroutine CodeBlock Statement Loop ForLoop ForEachLoop IfStatement Assignment Expression Add Subtract Multiply And Or Not Literal Variable
8
Where it Fits Tree halves One half provides role transformations One half provides code generation Using SFGP, we will generate the code for the composition strategies Advantage of SFGP is that we can output into any language Also high level representations of nodes, as we had before Initial approach had some roadblocks with post-processing for generating quality code Allow algorithm to take control
9
Where it Fits WRAPPER Code Generation Role Transformations
10
Current Progress Implementing vanilla SFGP Creating new primitives and functionality in Puppy Running into some issues At 12:30am, I realized… STGP is already a part of OpenBEAGLE proper
11
Next Steps Migrate to OpenBEAGLE and get sample programs up and running Customize for our needs Migrate and merge role transformations
12
Sample Output from Puppy Best individual at generation 50 is: (CODEBLOCK (OR (CODEBLOCK X X (VARIABLE X)) (ASSIGNMENT X (SUBROUTINE X X))) (LITERAL (LOOP (MULTIPLY X X) (ASSIGNMENT X X))) (IFSTATEMENT X (ADD X X))) =================== CODEBLOCK VARIABLE OR ASSIGNMENT SUBROUTINE CODEBLOCK MULTIPLY LOOP ASSIGNMENT LITERAL IFSTATEMENT ADD ===================
13
Frameworks SFGP – EpochX Java Framework http://www.epochx.org/ OpenBEAGLE Provides STGP support (must be extended for SFGP) SPAMBASE example uses STGP Stable release (3.0.3) has a run-time error Alpha build runs properly (4.0.0 – Alpha 2) http://code.google.com/p/beagle/downloads/list
14
New References [Castle2012] T. Castle and C. G. Johnson. Evolving high-level imperative program trees with strongly formed genetic programming. In Proceedings of the 15th European Conference on Genetic Programming, EuroGP 2012, volume 7244 of LNCS, pages 1–12. Springer, Apr. 2012. [Montana1995] Montana, D.J.: Strongly typed genetic programming. Evolutionary Computation 3 (1995) 199-230
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.