CSE 471-Project 3 Regression Planner using A* Sreelakshmi Vaddi.

Slides:



Advertisements
Similar presentations
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 2 - Search.
Advertisements

CS344: Principles of Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 7, 8, 9: Monotonicity 16, 17 and 19 th Jan, 2012.
Language for planning problems
CSE391 – 2005 NLP 1 Planning The Planning problem Planning with State-space search.
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
Greedy best-first search Use the heuristic function to rank the nodes Search strategy –Expand node with lowest h-value Greedily trying to find the least-cost.
P3 / 2004 Register Allocation. Kostis Sagonas 2 Spring 2004 Outline What is register allocation Webs Interference Graphs Graph coloring Spilling Live-Range.
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
CLASSICAL PLANNING What is planning ?  Planning is an AI approach to control  It is deliberation about actions  Key ideas  We have a model of the.
1 CS 201 Compiler Construction Machine Code Generation.
1 Graphplan José Luis Ambite * [* based in part on slides by Jim Blythe and Dan Weld]
C Chuen-Liang Chen, NTUCS&IE / 321 OPTIMIZATION Chuen-Liang Chen Department of Computer Science and Information Engineering National Taiwan University.
Plan Generation & Causal-Link Planning 1 José Luis Ambite.
1 Disjoint Sets Set = a collection of (distinguishable) elements Two sets are disjoint if they have no common elements Disjoint-set data structure: –maintains.
Planning CSE 473 Chapters 10.3 and 11. © D. Weld, D. Fox 2 Planning Given a logical description of the initial situation, a logical description of the.
Project 1: Background Informed search : 8- puzzle world BFS, DFS and A* algorithms Heuristics : Manhattan distance, Number of misplaced tiles Lisp programming.
12/3CSE NP-complete CSE Algorithms NP Completeness Approximations.
Nov 14 th  Homework 4 due  Project 4 due 11/26.
CSE 341 Lecture 6 exceptions; higher order functions; map, filter, reduce Ullman 5.2, 5.4 slides created by Marty Stepp
Planning II CSE 473. © Daniel S. Weld 2 Logistics Tournament! PS3 – later today Non programming exercises Programming component: (mini project) SPAM detection.
1 Heuristic Search 4 4.0Introduction 4.1An Algorithm for Heuristic Search 4.2Admissibility, Monotonicity, and Informedness 4.3Using Heuristics in Games.
1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington.
Planning II CSE 573. © Daniel S. Weld 2 Logistics Reading for Wed Ch 18 thru 18.3 Office Hours No Office Hour Today.
Classical Planning Chapter 10.
Tree.
1 Road Map Associative Container Impl. Unordered ACs Hashing Collision Resolution Collision Resolution Open Addressing Open Addressing Separate Chaining.
Greedy algorithms David Kauchak cs161 Summer 2009.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
Recursive Data Structures and Grammars  Themes  Recursive Description of Data Structures  Recursive Definitions of Properties of Data Structures  Recursive.
Searching Given distinct keys k 1, k 2, …, k n and a collection of n records of the form »(k 1,I 1 ), (k 2,I 2 ), …, (k n, I n ) Search Problem - For key.
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 3 - Search.
Introduction to Artificial Intelligence Class 1 Planning & Search Henry Kautz Winter 2007.
Types of Algorithms. 2 Algorithm classification Algorithms that use a similar problem-solving approach can be grouped together We’ll talk about a classification.
Recursive Data Structures and Grammars  Themes  Recursive Description of Data Structures  Recursive Definitions of Properties of Data Structures  Recursive.
Intro to Planning Or, how to represent the planning problem in logic.
Classical Planning Chapter 10 Mausam / Andrey Kolobov (Based on slides of Dan Weld, Marie desJardins)
M180: Data Structures & Algorithms in Java Trees & Binary Trees Arab Open University 1.
LINKED LISTS Midwestern State University CMPS 1053 Dr. Ranette Halverson 1.
Graphplan: Fast Planning through Planning Graph Analysis Avrim Blum Merrick Furst Carnegie Mellon University.
Planning I: Total Order Planners Sections
BINARY TREES Objectives Define trees as data structures Define the terms associated with trees Discuss tree traversal algorithms Discuss a binary.
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 17– Theorems in A* (admissibility, Better performance.
Heuristic Search Planners. 2 USC INFORMATION SCIENCES INSTITUTE Planning as heuristic search Use standard search techniques, e.g. A*, best-first, hill-climbing.
XML Schema – XSLT Week 8 Web site:
Classical Planning via State-space search
Binary search tree. Removing a node
Lecture 22 Binary Search Trees Chapter 10 of textbook
Trees.
Planning AIMA: 10.1, 10.2, Follow slides and use textbook as reference
Chapter 8 – Binary Search Tree
Problem Reduction -AND-OR Graph -AO* Search CSE 402 K3R23/K3R20.
Class #17 – Thursday, October 27
Planning José Luis Ambite.
Tree A tree is a data structure in which each node is comprised of some data as well as node pointers to child nodes
Graphplan/ SATPlan Chapter
CS 201 Compiler Construction
Assignment 7. Functional implementation of linked listed
Class #19 – Monday, November 3
CSE (c) S. Tanimoto, 2001 Search-Introduction
CSE (c) S. Tanimoto, 2002 State-Space Search
Trees.
Graphplan/ SATPlan Chapter
Trees-2, Graphs Data Structures with C Chpater-6 Course code: 10CS35
Graphplan/ SATPlan Chapter
Trees.
GraphPlan Jim Blythe.
CS621: Artificial Intelligence
CSE (c) S. Tanimoto, 2004 State-Space Search
Allegro CL Certification Program
Presentation transcript:

CSE 471-Project 3 Regression Planner using A* Sreelakshmi Vaddi

Example: Regression planner operator O1 prec: P Eff: R, ~S operator O2 prec: Q Eff: S operator O3 prec: P Eff: M operator O4 prec: R,S Eff: P,Q,R,S operator O5 prec: R,S Eff: P Initial: {P,Q} Goal: {P,Q,R,S} PQRS PQR RS QRS PQ O2 O4 O5 O1 G=0 h=0 G=1 h=1 H0: USING SET DIFFERENCE HEURISTIC – A* Goal: {P,Q} Initial: {P,Q,R,S} G=1 h=2 G=1 h=1 G=2 h=0 Number of elements {curr state MINUS Goal}

Example: Regression planner operator O1 prec: P Eff: R, ~S operator O2 prec: Q Eff: S operator O3 prec: P Eff: M operator O4 prec: R,S Eff: P,Q,R,S operator O5 prec: R,S Eff: P PQRS PQR RS QRS PQ O2 O4 O5 O1 G=0 h=0 G=1 h=1 H1: Heuristic function that computes the cost of a set as the sum of the levels of the individual elements of the set - A* Goal: {P,Q} Initial: {P,Q,R,S} G=1 h=2 G=1 h=2 G=2 h=0 P -> 0, Q -> 0, R -> 1, S-> 1 SUM (set-level-val-without-mutex (each condition))

Example: Regression planner operator O1 prec: P Eff: R, ~S operator O2 prec: Q Eff: S operator O3 prec: P Eff: M operator O4 prec: R,S Eff: P,Q,R,S operator O5 prec: R,S Eff: P PQRS PQR RS QRS PQ O2 O4 O5 O1 G=0 h=0 G=1 h=1 H2: Heuristic function that computes the cost of a set as the level at which that particular set occurs first– A* Goal: {P,Q} Initial: {P,Q,R,S} G=1 h=1 G=1 h=1 G=2 h=0 PQRS -> 1, PQR -> 1, RS -> 1, QRS-> 1, PQ->0 set-level-val-without-mutex (list of all conditions)

Example: Regression planner operator O1 prec: P Eff: R, ~S operator O2 prec: Q Eff: S operator O3 prec: P Eff: M operator O4 prec: R,S Eff: P,Q,R,S operator O5 prec: R,S Eff: P PQRS PQR RS QRS PQ O2 O4 O5 O1 G=0 h=0 G=1 h=1 H3: Heuristic function that computes the cost of a set as the level at which that particular set occurs first without any mutexes– A* Goal: {P,Q} Initial: {P,Q,R,S} G=1 h=2 G=1 h=2 G=2 h=0 PQRS -> 2, PQR -> 1, RS -> 2, QRS-> 2, PQ->0 set-level-val-with-mutex (list of all conditions)

What you need to get started Load the code given to you on Allegro You need not touch/modify this code at all Loading instructions on project webpage :problems file + graph plan code You will need from Project 1 – A* search Node structure Children function A* main function Trace path Display stats part Puzzle children F-value fn NEW FUNCTIONS: Heuristics: H0,H1,H2,H3 Goalp: (Actually initialp)

Heuristics and Goalp functions H0: Number of elements {curr state MINUS Goal} H1: SUM (set-level-val-without-mutex (each condition)) H2: set-level-val-without-mutex (list of all conditions) H3: set-level-val-with-mutex (list of all conditions) Goalp: find if current state is equal to the goal state Eg: {PQR} = {PQ} FALSE

Puzzle Children Function Generates the children of current state, by checking if there is an operator applicable to current state When can you apply an op to state s? None of effects of op negate conditions in S (Reason why we don’t apply O1 in Eg) At least one effect of op is in S (Reason why we don’t apply O3 in Eg) And May be more conditions Negative literals Op-adds, op-deletes

Puzzle Children Function Contd New state generation? op-preconditions U (parent state – op-effects) IMPORTANT: Handling negative literals ‘P is (:NOT (P)) (So check car of every condition to see if its negative literal and then *special*) Op-deletes, op-adds can be useful than op-effects PQR on o1 ? (operator O1 prec: P Eff: R, ~S) {p} U {{p,q,r}-{r,~s}}={p,q}

Useful functions-Graph Plan code (get-ground-operators ‘Eg-problem) : returns O1..O5 (op-name op1) : returns (UNSTACK A A) (op-preconditions op1) ((ON A A) (CLEAR A) (ARM-EMPTY)) (op-effects op1) ((HOLDING A) (CLEAR A) (:NOT (CLEAR A)) (:NOT (ARM-EMPTY)) (:NOT (ON A A))) (op-adds op1) ((HOLDING A) (CLEAR A)) (op-deletes op1) ((CLEAR A) (ARM-EMPTY) (ON A A))

Useful functions-Graph Plan code (problem-init 'class-problem) : Initial state of the problem ((OBJECT A) (OBJECT B) (ON-TABLE A) (ON-TABLE B) (CLEAR A) (CLEAR B) (ARM-EMPTY)) (problem-goal 'class-problem) : Goal state of the problem ((:NOT (CLEAR B)) (ARM-EMPTY)) Heuristic Functions (Compute-pg problem) : Has to be called in the beginning of every problem so that you can call all the above functions as well as heuristic functions.

Other functions Lisp set operations (list1 list2 :test #’equal) Set Difference Union Intersection

Possible Program Flow Call compute-gp, get-ground-operators, problem-init, problem-goal Make goal node from problem-init Call A*(list goal-node, goalp,…) Change puzzle-children function as discussed above Write Goalp function Write heuristic functions calling set-level functions from the given code

Progression Planner - Simpler When an OP can apply to state S? S contains OP-preconditions New child state (S Union OP-effects) Rest remain same And don’t forget to change the compute- pg code part as said by Dr.Rao in project description

Example: Progression planner operator O1 prec: P Eff: R, ~S operator O2 prec: Q Eff: S operator O3 prec: P Eff: M operator O4 prec: R,S Eff: P,Q,R,S operator O5 prec: R,S Eff: P Initial: {P,Q} Goal: {P,Q,R,S} PQRS PQR PQS PQM PQ O2 O3 O1 G=0 h=0 G=1 h=1 H0: Using Set difference heuristic G=1 h=1 G=1 h=2 G=0 h=0 O2 on PQ? Child : {P,Q} U {Q,S}={P,S} O4,O5 on PQ? NO R Not in PQ, S not in PQ