1 / 14

Strongly Formed Genetic Programming

Strongly Formed Genetic Programming. 06/19/2013. Agenda. Strongly formed genetic programming (SFGP) Where it fits Current progress Next steps. SFGP. GP for evolving programs [Castle2012] Uses basic programming constructs to generate code for a given problem

khanh
Download Presentation

Strongly Formed Genetic Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 Assignment • 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 Integer Variable Integer Expression intvar = 5;

  6. SFGP Iterator Upper Bound For Loop • 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 Integer Variable Integer Expression Code Block for (inti = 0; i < 20; ++i) { Code Block }

  7. SFGP Types • Top-level • Subroutine • CodeBlock • Statement • Loop • ForLoop • ForEachLoop • IfStatement • Assignment • Expression • Add • Subtract • Multiply • And • OrNot • 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, EuroGP2012,volume 7244 of LNCS, pages 1–12. Springer, Apr. 2012. • [Montana1995] • Montana, D.J.: Strongly typed genetic programming. Evolutionary Computation 3 (1995) 199-230

More Related