Blocks World Problem. The CS Terminal Specifies the block at the top of the stack. Example CS evaluates to E Note: Evaluates to nil if the stack is empty.

Slides:



Advertisements
Similar presentations
Decision Structures - If / Else If / Else. Decisions Often we need to make decisions based on information that we receive. Often we need to make decisions.
Advertisements

Genetic Algorithms in Problem Solving EVOLVING COMPUTER PROGRAMS (1) t Evolving Lisp Programs Keplers Third Law: P 2 = cA 3 PROGRAM ORBITAL_PERIORD.
Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
CS Section 600 CS Section 002 Dr. Angela Guercio Spring 2010.
Genetic Algorithms Genetic Programming Ata Kaban School of Computer Science University of Birmingham 2003.
How SAS implements structured programming constructs
Representing Hypothesis Operators Fitness Function Genetic Programming
GP Applications Two main areas of research Testing genetic programming in areas other techniques have been applied to. Applying genetic programming to.
Genetic Programming 김용덕 Page 2 Contents What is Genetic Programming? Difference between GP and GA Flowchart for GP Structures in GP.
1 Lecture 8: Genetic Algorithms Contents : Miming nature The steps of the algorithm –Coosing parents –Reproduction –Mutation Deeper in GA –Stochastic Universal.
Defining functions in lisp In lisp, all programming is in terms of functions A function is something which –takes some arguments as input –does some computing.
Tutorial 12 Working with Arrays, Loops, and Conditional Statements
COMP305. Part II. Genetic Algorithms. Genetic Algorithms.
Week 10 Recap CSE 115 Spring For-each loop When we have a collection and want to do something to all elements of that collection we use the for-each.
Recursion. Objectives At the conclusion of this lesson, students should be able to Explain what recursion is Design and write functions that use recursion.
Doug Downey, adapted from Bryan Pardo, Machine Learning EECS 349 Machine Learning Genetic Programming.
CS 8751 ML & KDDGenetic Algorithms1 Evolutionary computation Prototypical GA An example: GABIL Genetic Programming Individual learning and population evolution.
CHAPTER 7: SORTING & SEARCHING Introduction to Computer Science Using Ruby (c) Ophir Frieder at al 2012.
Genetic Programming.
Genetic Programming Chapter 6. A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Genetic Programming GP quick overview Developed: USA.
Genetic Algorithm.
Decision tree: Example 0 = Not a Saturday, 1 = Saturday Given: rainy, humid, not windy Is it a Saturday? It is a Saturday.
Problems Premature Convergence Lack of genetic diversity Selection noise or variance Destructive effects of genetic operators Cloning Introns and Bloat.
Automatically Defined Functions Used to evolve modular programs Architecture implemented by Koza Architecture implemented by Bruce Function calls A critical.
Engineering 1020 Introduction to Programming Peter King Winter 2010.
ASP.NET Programming with C# and SQL Server First Edition Chapter 3 Using Functions, Methods, and Control Structures.
Iteration Iterative operator: for, du, while. Problem: Infinite and time-consuming iterations. Halting problem: We are not able to determine whether an.
What is Genetic Programming? Genetic programming is a model of programming which uses the ideas (and some of the terminology) of biological evolution to.
Introduction to Evolutionary Algorithms Session 4 Jim Smith University of the West of England, UK May/June 2012.
Interpretation Environments and Evaluation. CS 354 Spring Translation Stages Lexical analysis (scanning) Parsing –Recognizing –Building parse tree.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Engineering Computation with MATLAB Second Edition by David M. Smith.
PHP Conditional Statements Conditional statements in PHP are used to perform different actions based on different conditions. Conditional Statements Very.
The Loop Macro Many of the CL “functions” are actually macros (let, progn, if, etc) The most complicated macro in CL is probably the Loop macro –The Loop.
Saeed Ghanbartehrani Summer 2015 Lecture Notes #5: Programming Structures IE 212: Computational Methods for Industrial Engineering.
Initial Population Generation Methods for population generation: Grow Full Ramped Half-and-Half Variety – Genetic Diversity.
Chapter 3 Functions, Events, and Control Structures JavaScript, Third Edition.
1 Section 2.1 Algorithms. 2 Algorithm A finite set of precise instructions for performing a computation or for solving a problem.
Machine Learning Chapter 9. Genetic Algorithm
Design of Bio-Medical Virtual Instrumentation Tutorial 2.
Chapter 9 Genetic Algorithms.  Based upon biological evolution  Generate successor hypothesis based upon repeated mutations  Acts as a randomized parallel.
Fitness Cases Are input-output pairs describing the output a program should produce given the particular input value. The fitness of an individual is usually.
Project 2: Classification Using Genetic Programming Kim, MinHyeok Biointelligence laboratory Artificial.
Machine Learning A Quick look Sources: Artificial Intelligence – Russell & Norvig Artifical Intelligence - Luger By: Héctor Muñoz-Avila.
Genetic Programming A.E. Eiben and J.E. Smith, Introduction to Evolutionary Computing Chapter 6.
Chapter 9 Genetic Algorithms Evolutionary computation Prototypical GA
Chapter 9 Genetic Algorithms
Introduction Genetic programming falls into the category of evolutionary algorithms. Genetic algorithms vs. genetic programming. Concept developed by John.
Expressions Methods if else Statements Loops Potpourri.
Data Structures Evolution of algorithms for an array-based stack, queue, and linked-list. Evolved data structures used to evolve solutions to problems.
Game Playing Evolve a strategy for two-person zero-sum games. Help the user to determine the next move. Constructing a game tree Each node represents a.
Genetic Programming COSC Ch. F. Eick, Introduction to Genetic Programming GP quick overview Developed: USA in the 1990’s Early names: J. Koza Typically.
Genetic Algorithm Dr. Md. Al-amin Bhuiyan Professor, Dept. of CSE Jahangirnagar University.
Symbolic Regression via Genetic Programming AI Project #2 Biointelligence lab Cho, Dong-Yeon
Perl Chapter 3 Conditional statements. Control Expressions Control expressions – interpreted as T/F (evaluated as strings or numbers) – simple, relational,
Recursion. Objectives At the conclusion of this lesson, students should be able to Explain what recursion is Design and write functions that use recursion.
Evolving Recursive Algorithms The SRF function Automatically defined recursions (ADRs) The recur operator Dealing with infinite and time-consuming recursions.
Selected Topics in CI I Genetic Programming Dr. Widodo Budiharto 2014.
Introduction Genetic programming falls into the category of evolutionary algorithms. Genetic algorithms vs. genetic programming. Concept developed by John.
Tutorial 12 Working with Arrays, Loops, and Conditional Statements
Example of formula (defun roots (a b c) (list
Chapter 3: Decisions and Loops
Stack Data Structure, Reverse Polish Notation, Homework 7
Flow of Control.
Flow of Control.
Arithmetic operations, decisions and looping
Flow of Control.
Logical Operations In Matlab.
John McCarthy Pioneer in AI Also Lisp Formalize common-sense reasoning
Programming Languages
REPETITION Why Repetition?
Presentation transcript:

Blocks World Problem

The CS Terminal Specifies the block at the top of the stack. Example CS evaluates to E Note: Evaluates to nil if the stack is empty.

The TB Terminal Indicates which block on the stack is at the top of a number of correctly ordered blocks. Example: TB evaluates to R Note: Evaluates to nil if the stack is empty or there are no correctly ordered blocks on the stack.

The NN Terminal Indicates the next block from the table that must be placed on TB on the stack. Example NN evaluates to E Note: Evaluates to nil if the table is empty or TB is nil and the stack is not empty.

The MB Operator Takes a block label, X, as input. If the block is on the table the block is moved to the top of the stack and a value of true is returned else a value of false is returned. A value false is returned if: The table is empty X is already on the stack X is nil

MB Example MB N

The MT Operator Takes a block label, X, as an argument. If X is on the stack the first element of the stack is moved to the table and a value of true is returned else a value of false is returned. A value of false is returned if The stack is empty. If X is already on the table. If X is nil.

MT Example MT S

The DU Operator This function takes two arguments. The first represents the code that must be executed for a number of iterations. The second is a condition specifying when the iteration must stop. Maximum number of iterations per individual: 100 Maximum number of iterations per DU instance: 25 This function returns a value of true if the entire loop is performed and is not terminated due to either of the limits being exceeded otherwise it returns a value of false.

Other Operators NOT Takes a single argument and performs the function of the logical not. If its argument is a block label returns a value of true if the label is nil. EQ Takes two arguments and performs the function of the logical equal.

Fitness cases Ten cases consisting of 0 to nine blocks already in the correct order. Eight fitness cases where there is exactly one block in the wrong order on top of the remaining correctly ordered blocks on the stack. A hundred and forty eight cases where blocks are correctly ordered in the stack and the a random number in the interval 2-8 blocks out- of-order on the stack.

Summary of GP Parameters Function to generate: Induce program that implements a plan to add blocks to a stack so that it spells UNIVERSAL. Terminal set:T = {CS, TB, NN } Function set:F = {MS, MT, DU, NOT, EQ} Number of generations: 51 Population size: 500 Raw fitness:The number of fitness cases for which the stack is correctly constructed.

Summary of GP Parameters Hits criterion:Same as raw fitness Method of selection:Fitness proportionate selection. Initial population generator:The ramped half- and-half method with an initial tree depth of six and a depth limit of seventeen on the size of trees created by the genetic operators. Genetic Operators Crossover - 90% Reproduction - 10%

An Evolved Solution