Strongly Formed Genetic Programming 06/19/2013. Agenda Strongly formed genetic programming (SFGP) Where it fits Current progress Next steps.

Slides:



Advertisements
Similar presentations
AP Computer Science Anthony Keen. Computer 101 What happens when you turn a computer on? –BIOS tries to start a system loader –A system loader tries to.
Advertisements

CPSC 388 – Compiler Design and Construction
Introduction to Compilation of Functional Languages Wanhe Zhang Computing and Software Department McMaster University 16 th, March, 2004.
Translator Architecture Code Generator ParserTokenizer string of characters (source code) string of tokens abstract program string of integers (object.
GENETICA The problem-solving approach proposed here, largely based on the previous remarks, is implemented through the computer language GENETICA. GENETICA.
INF 212 ANALYSIS OF PROG. LANGS Type Systems Instructors: Crista Lopes Copyright © Instructors.
Chapter 5: Elementary Data Types Properties of types and objects –Data objects, variables and constants –Data types –Declarations –Type checking –Assignment.
CS 330 Programming Languages 10 / 16 / 2008 Instructor: Michael Eckmann.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Common Sub-expression Elim Want to compute when an expression is available in a var Domain:
1 Chapter 4 Language Fundamentals. 2 Identifiers Program parts such as packages, classes, and class members have names, which are formally known as identifiers.
Cse321, Programming Languages and Compilers 1 6/19/2015 Lecture #18, March 14, 2007 Syntax directed translations, Meanings of programs, Rules for writing.
Environments and Evaluation
Direction of analysis Although constraints are not directional, flow functions are All flow functions we have seen so far are in the forward direction.
1 Arithmetic in C. 2 Type Casting: STOPPED You can change the data type of the variable in an expression by: (data_Type) Variable_Name Ex: int a = 15;
Direction of analysis Although constraints are not directional, flow functions are All flow functions we have seen so far are in the forward direction.
What is Neutral? Neutral Changes and Resiliency Terence Soule Department of Computer Science University of Idaho.
Moving To Code 3 More on the Problem-Solving Process §The final step in the problem-solving process is to evaluate and modify (if necessary) the program.
Programming Languages 2nd edition Tucker and Noonan Chapter 6 Types I was eventually persuaded of the need to design programming notations so as to maximize.
Cs164 Prof. Bodik, Fall Symbol Tables and Static Checks Lecture 14.
CS0007: Introduction to Computer Programming Introduction to Arrays.
Automatic Complexity Analysis of Simple Imperative Programs Zachi Mann.
Genetic Programming.
Slides are based on Negnevitsky, Pearson Education, Lecture 10 Evolutionary Computation: Evolution strategies and genetic programming n Evolution.
Programming Languages CPS120: Introduction to Computer Science Lecture 5.
UNIT 3 TEMPLATE AND EXCEPTION HANDLING. Introduction  Program errors are also referred to as program bugs.  A C program may have one or more of four.
CPSC 388 – Compiler Design and Construction Parsers – Context Free Grammars.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
Composition Steps 01/10/2013. Agenda Retooling note Define composition Wrapper without function pointer Compositions (thus far) Evolutionary computation.
CS1022 Computer Programming & Principles Lecture 1.2 A brief introduction to Python.
Different Varieties of Genetic Programming Je-Gun Joung.
JAVA 0. HAFTA Algorithms FOURTH EDITION Robert Sedgewick and Kevin Wayne Princeton University.
Computer Science and Mathematical Basics Chap. 3 발표자 : 김정집.
Interpretation Environments and Evaluation. CS 354 Spring Translation Stages Lexical analysis (scanning) Parsing –Recognizing –Building parse tree.
410/510 1 of 18 Week 5 – Lecture 1 Semantic Analysis Compiler Construction.
Group 4 Java Compiler Group Members: Atul Singh(Y6127) Manish Agrawal(Y6241) Mayank Sachan(Y6253) Sudeept Sinha(Y6483)
1 Status Update September 17 th, 2014 Erik Fredericks.
8 1 Chapter 8 Advanced SQL Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
1 Grammar Refactoring December 13 th, 2013 Erik Fredericks.
Algorithm Design.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
CPS 506 Comparative Programming Languages Syntax Specification.
 Overview of technical progress  Grammar-based implementation.
CS536 Semantic Analysis Introduction with Emphasis on Name Analysis 1.
Chapter 3 Syntax, Errors, and Debugging Fundamentals of Java.
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
Compiler Design Introduction 1. 2 Course Outline Introduction to Compiling Lexical Analysis Syntax Analysis –Context Free Grammars –Top-Down Parsing –Bottom-Up.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
1 A Simple Syntax-Directed Translator CS308 Compiler Theory.
 Fall Chart 2  Translators and Compilers  Textbook o Programming Language Processors in Java, Authors: David A. Watts & Deryck F. Brown, 2000,
Introduction Genetic programming falls into the category of evolutionary algorithms. Genetic algorithms vs. genetic programming. Concept developed by John.
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
Turtle: A Constraint Imperative Programming Language Martin Grabmüller and Petra Hofstedt Fakultät IV – Elektrotechnik und Informatik.
Chapter 1 Java Programming Review. Introduction Java is platform-independent, meaning that you can write a program once and run it anywhere. Java programs.
Genetic Programming Using Simulated Natural Selection to Automatically Write Programs.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
Genetic Programming. What is Genetic Programming? GP for Symbolic Regression Other Representations for GP Example of GP for Knowledge Discovery Outline.
Software Engineering Algorithms, Compilers, & Lifecycle.
Estimation of Distribution Algorithm and Genetic Programming Structure Complexity Lab,Seoul National University KIM KANGIL.
Arithmetic Instructions. Integer and Float Conversions.
Syntax(1). 2 Syntax  The syntax of a programming language is a precise description of all its grammatically correct programs.  Levels of syntax Lexical.
GP FOR ADAPTIVE MARKETS Jake Pacheco 6/11/2010. The Goal  Produce a system that can create novel quantitative trading strategies for the stock market.
Algorithms Take a look at the worksheet. What do we already know, and what will we have to learn in this term?
Manipulating Pictures, Arrays, and Loops part 3
Java Programming Review 1
Introduction to Data Structure
Revision of C++.
Parsing with IRONY Roman Ivantsov, MCSD
Assignment #3 Programming Language, Spring 2003
Presentation transcript:

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 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

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

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;

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

SFGP Types Top-level Subroutine CodeBlock Statement Loop ForLoop ForEachLoop IfStatement Assignment Expression Add Subtract Multiply And Or Not Literal Variable

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

Where it Fits WRAPPER Code Generation Role Transformations

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

Next Steps Migrate to OpenBEAGLE and get sample programs up and running Customize for our needs Migrate and merge role transformations

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 ===================

Frameworks SFGP – EpochX Java Framework 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)

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 [Montana1995] Montana, D.J.: Strongly typed genetic programming. Evolutionary Computation 3 (1995)