CPSC 322 Introduction to Artificial Intelligence November 19, 2004.

Slides:



Advertisements
Similar presentations
Planning.
Advertisements

ARTIFICIAL INTELLIGENCE: THE MAIN IDEAS Nils J. Nilsson OLLI COURSE SCI 102 Tuesdays, 11:00 a.m. – 12:30 p.m. Winter Quarter, 2013 Higher Education Center,
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
TWEAK solving the Sussman anomaly ON(A,B) ON(B,C) ON(C,A) ONTABLE(A) ONTABLE(B) CLEAR(C) CLEAR(B) ARMEMPTY STACK(A,B) STACK(B,C) Two step additions to.
Planning Chapter 10.
Artificial Intelligence University Politehnica of Bucharest Adina Magda Florea
Planning Planning is fundamental to “intelligent” behaviour. E.g.
All rights reserved ©L. Manevitz Lecture 61 Artificial Intelligence Planning System L. Manevitz.
Sussman anomaly - analysis The start state is given by: ON(C, A) ONTABLE(A) ONTABLE(B) ARMEMPTY The goal by: ON(A,B) ON(B,C) This immediately leads to.
Planning Russell and Norvig: Chapter 11 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2003/ home.htm.
Artificial Intelligence II S. Russell and P. Norvig Artificial Intelligence: A Modern Approach Chapter 11: Planning.
1 Chapter 4 State-Space Planning. 2 Motivation Nearly all planning procedures are search procedures Different planning procedures have different search.
Planning Some material adapted from slides by Tim Finin,Jean-Claude Latombe, Lise Getoor, and Marie desJardins.
1 Classical STRIPS Planning Alan Fern * * Based in part on slides by Daniel Weld.
CPSC 322 Introduction to Artificial Intelligence November 24, 2004.
Artificial Intelligence Chapter 11: Planning
Planning Russell and Norvig: Chapter 11. Planning Agent environment agent ? sensors actuators A1A2A3.
OnT-A onT-B onT-C cl-A cl-C cl-B he Pick-A Pick-B Pick-C onT-A onT-B onT-C cl-A cl-C cl-B he h-A h-B h-C ~cl-A ~cl-B ~cl-C ~he st-A-B st-A-C st-B-A st-B-C.
CPSC 322 Introduction to Artificial Intelligence November 26, 2004.
1 Planning Adapted from Tim Finin, UMBC, Marie desJardins Some material adopted from notes by Andreas Geyer-Schulz and Chuck Dyer.
A: A Unified Brand-name-Free Introduction to Planning Subbarao Kambhampati Jan 28 th My lab was hacked and the systems are being rebuilt.. Homepage is.
CSE 574: Planning & Learning Subbarao Kambhampati 1/17: State Space and Plan-space Planning Office hours: 4:30—5:30pm T/Th.
1 Lecture 12 example (from slides prepared by Prof. J. Rosenchein)
Planning Where states are transparent and actions have preconditions and effects Notes at
Intro to AI Fall 2002 © L. Joskowicz 1 Introduction to Artificial Intelligence LECTURE 12: Planning Motivation Search, theorem proving, and planning Situation.
1 Pertemuan 17 Planning Matakuliah: T0264/Intelijensia Semu Tahun: Juli 2006 Versi: 2/1.
1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington.
Dynamic Bayesian Networks CSE 473. © Daniel S. Weld Topics Agency Problem Spaces Search Knowledge Representation Reinforcement Learning InferencePlanningLearning.
Planning Where states are transparent and actions have preconditions and effects Notes at
AI Principles, Lecture on Planning Planning Jeremy Wyatt.
PLANNING Partial order regression planning Temporal representation 1 Deductive planning in Logic Temporal representation 2.
An Introduction to Artificial Intelligence CE Chapter 11 – Planning Ramin Halavati In which we see how an agent can take.
1 07. The planning problem 2  Inputs: 1. A description of the world state 2. The goal state description 3. A set of actions  Output: A sequence of actions.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
April 3, 2006AI: Chapter 11: Planning1 Artificial Intelligence Chapter 11: Planning Michael Scherger Department of Computer Science Kent State University.
CS344 : Introduction to Artificial Intelligence
22/11/04 AIPP Lecture 16: More Planning and Operators1 More Planning Artificial Intelligence Programming in Prolog.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 07 : Planning.
Planning, page 1 CSI 4106, Winter 2005 Planning Points Elements of a planning problem Planning as resolution Conditional plans Actions as preconditions.
1 Search vs. planning Situation calculus STRIPS operators Search vs. planning Situation calculus STRIPS operators.
PLANNING He whose undertakings are all devoid of plan and desire for results, and whose actions are burnt by the fire of knowledge, him the sages call.
1 Chapter 16 Planning Methods. 2 Chapter 16 Contents (1) l STRIPS l STRIPS Implementation l Partial Order Planning l The Principle of Least Commitment.
Introduction to Planning Dr. Shazzad Hosain Department of EECS North South Universtiy
Advanced Problem Solving Systems: Planning Lecture Module 8.
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
1/16 Planning Chapter 11- Part1 Author: Vali Derhami.
Intro to Planning Or, how to represent the planning problem in logic.
Towards Model-lite Planning A Proposal For Learning & Planning with Incomplete Domain Models Sungwook Yoon Subbarao Kambhampati Supported by DARPA Integrated.
Artificial Intelligence 2004 Planning: Situation Calculus Review STRIPS POP Hierarchical Planning Situation Calculus (John McCarthy) situations.
CS621: Artificial Intelligence Pushpak Bhattacharyya Computer Science and Engineering Department IIT Bombay Lecture 19: Hidden Markov Models.
1 Planning Chapter 10 Some material adopted from notes by Tim Finin, Marie desJardins Andreas Geyer-Schulz, and Chuck Dyer.
1 Planning Some material adopted from notes by Andreas Geyer-Schulz and Chuck Dyer.
An Introduction to Artificial Intelligence CE 40417
Planning Chapter 16.
L9. Planning Agents L7_exAnswer and explanation Review
Combined Lecture CS621: Artificial Intelligence (lecture 19) CS626/449: Speech-NLP-Web/Topics-in-AI (lecture 20) Hidden Markov Models Pushpak Bhattacharyya.
Introduction Contents Sungwook Yoon, Postdoctoral Research Associate
Introduction Defining the Problem as a State Space Search.
CS344 : Introduction to Artificial Intelligence
AI Planning.
L11. Planning Agents and STRIPS
Planning Chapter
CPSC 322 Introduction to Artificial Intelligence
CS344 : Introduction to Artificial Intelligence
Chapter 2 Representations for Classical Planning
Russell and Norvig: Chapter 11 CS121 – Winter 2003
CMSC 471 Fall 2002 Class #20/21/23 – Wednesday, November 6 / Monday, November 11 / Monday, November 18.
L9. STRIPS Examples Recursive STRIPS Block world
Prof. Pushpak Bhattacharyya, IIT Bombay
Presentation transcript:

CPSC 322 Introduction to Artificial Intelligence November 19, 2004

Actions and Planning There are a number of situations where you’d like your man-made artifacts to have some ability to make a plan and then act according to the plan

Actions and Planning Planners that can do stuff like this....

Actions and Planning...have their beginnings in stuff like this...

Actions and Planning So we’ll start at the beginning, and try to figure out how to get a computer to generate a plan to get from here.... B A

Actions and Planning...to here... A B

Actions and Planning...and finally to here A B

Actions and Planning Then you can scale this up to build your own autonomous vehicle, no? A B

Search in more robust problems As we’ve seen in our little forays into language processing and rule-based systems, the solution is still search, but the nature of the search changes... Required knowledge gets bigger Our operators become more complex We mix our representation schemes

Search and planning If we add to that bigger, more complicated domain the notion of an intelligent agent (a robot) that acts in and changes its world......along with the reality that the agent’s actions can be expensive, irrevocable, and maybe even fatal......we then think about these problems and their solutions as “planning” instead of “search”. It’s still search, but the nature of the problem is different.

Planning So planning is about computing some or all the steps of a solution to a problem before executing any of them in the real world. The sequence of steps that gets the agent from a start state to a goal state is a plan.

Planning Good planning requires lots of knowledge: Current state Goal state Operators when to use them (preconditions) how they change the world (postconditions) Knowledge of the entire problem domain in advance (a “map” of the entire “terrain”, for instance)

Planning This last nugget is problematic: Knowledge of the entire problem domain in advance (a “map” of the entire “terrain”, for instance) because for all that knowledge to remain useful, the agent has to accurately track what is changed by an action as well as what isn’t.

Planning That hasn’t been a problem for us so far, because our domains have been so small. When you’re searching through possible changes to the 8-tile puzzle, you keep track of what changed and what didn’t by generating a copy of the entire domain with the changes represented explicitly. But what if the domain is, say, all the geological and topographic features of the surface of Mars for a 20km radius?

Planning This is ok... 8-tile puzzle v.1 8-tile puzzle v.2 8-tile puzzle v.3 8-tile puzzle v.4 slide left slide up slide right

Planning This is nasty... mars surface v.1 mars surface v.2 mars surface v.3 mars surface v.4 go forward 1m pick up rock turn right...and it has a name

The frame problem With massive amounts of knowledge to deal with... mars surface v.1 mars surface v.2 mars surface v.3 mars surface v.4 go forward 1m pick up rock turn right...how do you concisely specify what doesn’t change when an action is performed?

A simple solution to the frame problem One way to solve this problem: Represent the initial state of the planning problem as you’d expect (lists of facts, relations, etc.) Represent subsequent states not as copies of the initial state with small changes, but as the sequence of actions that get you from the initial state to that new state Each action carries with it a list of things that the action changes when it’s applied to a state an add list says what’s added to the description a delete list says what’s taken away

STRIPS in the blocks world This approach was first used by the people who built the robot Shakey (you saw Shakey in the movie) to navigate from room to room. The representation for actions and the algorithm for planning with that representation is collectively called STRIPS (STanford Research Institute Problem Solver) Here’s an application of STRIPS to a simpler blocks world problem (which doesn’t really justify the use of this approach but it’s easy to follow)

STRIPS: relations in blocks world the objects are a table, a gripper arm, and some blocks the relations that can exist between the objects are: on(X,Y) - block X is on block Y ontable(X) - block X is on the table clear(X) - there is nothing on top of block X holding(X) - the arm is holding block X armempty - the arm is holding nothing

The start state B A ontable(a) ontable(b) clear(a) clear(b) armempty

The goal state ontable(b) clear(a) armempty on(a,b) A B

STRIPS: actions in blocks world stack(X,Y) - place block X on block Y. The arm must already be holding X and the top of Y must be clear unstack(X,Y) - pick up block X from its current position on top of block Y. The arm must be empty and the top of block X must be clear. pickup(X) - pick up block X from the table and hold it. The arm must be empty and the top of X must be clear. putdown(X) - put block X down on the table. The arm must have been holding X.

STRIPS: actions as lists stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: ontable(b) clear(a) armempty on(a,b) plan:

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: ontable(b) clear(a) armempty on(a,b) plan: if a goal is fulfilled in the current state, then don’t worry about it

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: ontable(b) clear(a) armempty on(a,b) plan: if a goal is fulfilled in the current state, then don’t worry about it

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: on(a,b) plan: if a goal is fulfilled in the current state, then don’t worry about it

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: on(a,b) plan: for remaining goals, reduce difference between goal and current state

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: on(a,b) plan: find an action with add list that contains goal...

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: clear(b) holding(a) plan: post that action’s preconditions as new goals...

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: clear(b) holding(a) plan: stack(a,b) post that action as a step in the plan...

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: clear(b) holding(a) plan: stack(a,b) if a goal is fulfilled in the current state, then don’t worry about it

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: clear(b) holding(a) plan: stack(a,b) if a goal is fulfilled in the current state, then don’t worry about it

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: holding(a) plan: stack(a,b) if a goal is fulfilled in the current state, then don’t worry about it

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: holding(a) plan: stack(a,b) for remaining goals, reduce difference between goal and current state

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: holding(a) plan: stack(a,b) find an action with add list that contains goal...

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: clear(a) ontable(a) armempty plan: stack(a,b) post that action’s preconditions as new goals...

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: clear(a) ontable(a) armempty plan: pickup(a) stack(a,b) post that action as a step in the plan...

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: clear(a) ontable(a) armempty plan: pickup(a) stack(a,b) if a goal is fulfilled in the current state, then don’t worry about it

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: clear(a) ontable(a) armempty plan: pickup(a) stack(a,b) if a goal is fulfilled in the current state, then don’t worry about it

Finding the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: plan: pickup(a) stack(a,b) all the goals have been fulfilled...we now have our plan

Executing the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: plan: pickup(a) stack(a,b) are the preconditions for the first step true? yes

Executing the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(a) ontable(b) clear(a) clear(b) armempty goals: plan: pickup(a) stack(a,b) then do what the delete list says to do...

Executing the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(b) clear(a) clear(b) armempty goals: plan: pickup(a) stack(a,b) then do what the delete list says to do...

Executing the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(b) clear(a) clear(b) goals: plan: pickup(a) stack(a,b) then do what the delete list says to do...

Executing the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(b) clear(a) clear(b) goals: plan: pickup(a) stack(a,b) and then do what the add list says to do...

Executing the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: holding(a) ontable(b) clear(a) clear(b) goals: plan: pickup(a) stack(a,b) and then do what the add list says to do...

Executing the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: holding(a) ontable(b) clear(a) clear(b) goals: plan: pickup(a) stack(a,b) are the preconditions for the first step true? yes

Executing the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: holding(a) ontable(b) clear(a) clear(b) goals: plan: pickup(a) stack(a,b) then do what the delete list says to do...

Executing the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: holding(a) ontable(b) clear(a) goals: plan: pickup(a) stack(a,b) then do what the delete list says to do...

Executing the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(b) clear(a) goals: plan: pickup(a) stack(a,b) then do what the delete list says to do...

Executing the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: ontable(b) clear(a) goals: plan: pickup(a) stack(a,b) and then do what the add list says to do...

Executing the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: armempty ontable(b) clear(a) goals: plan: pickup(a) stack(a,b) and then do what the add list says to do...

Executing the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: armempty ontable(b) clear(a) on(a,b) goals: plan: pickup(a) stack(a,b) and then do what the add list says to do...

Executing the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: armempty ontable(b) clear(a) on(a,b) goals: plan: pickup(a) stack(a,b) the plan is finished...how does the resulting state compare to original goal?

Executing the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: armempty ontable(b) clear(a) on(a,b) goals: ontable(b) clear(a) armempty on(a,b) plan: pickup(a) stack(a,b) the plan is finished...how does the resulting state compare to original goal?

Executing the plan stack(X,Y) - preconds: clear(Y) & holding(X) delete: clear(Y) & holding(X) add: armempty & on(X,Y) unstack(X,Y) - preconds: on(X,Y) & clear(X) & armempty delete: on(X,Y) & armempty add: holding(X) & clear(Y) pickup(X) - preconds: clear(X) & ontable(X) & armempty delete: ontable(X) & armempty add: holding(X) putdown(X) - preconds: holding(X) delete: holding(X) add: ontable(X) & armempty start: armempty ontable(b) clear(a) on(a,b) goals: ontable(b) clear(a) armempty on(a,b) plan: pickup(a) stack(a,b) give your robot a cookie

How about some tasty CILOG code? /* This is an implementation of the simple STRIPS planner shown on page 302 of the Computational Intelligence text. launch it with the query: cilog: ask goals(G) & achieve_all(G,init,Plan). Note that the add list is denoted here by "achieves" instead of "add", and that the add and delete lists aren't exactly lists. */ /* stack action */ preconditions(stack(X,Y),[cleartop(Y),holding(X)]). achieves(stack(X,Y),armempty). achieves(stack(X,Y),on(X,Y)). deletes(stack(X,Y),cleartop(Y)). deletes(stack(X,Y),holding(X)).

How about some tasty CILOG code? /* pickup action */ preconditions(pickup(X),[cleartop(X),ontable(X),armempty]). achieves(pickup(X),holding(X)). deletes(pickup(X),ontable(X)). deletes(pickup(X),armempty). /* initial situation */ holds(ontable(a),init). holds(ontable(b),init). holds(cleartop(a),init). holds(cleartop(b),init). holds(armempty,init). achieves(init,X) <- holds(X,init). goals([ontable(b),cleartop(a),armempty,on(a,b)]).

How about some tasty CILOG code? /* the simple STRIPS planner */ remove(X,[X|Y],Y). achieve_all([],W0,W0). achieve_all(Goals,W0,W2) <- remove(G,Goals,Rem_Gs) & achieve(G,W0,W1) & achieve_all(Rem_Gs,W1,W2). achieve(G,W,W) <- holds(G,W). achieve(G,W0,do(Action,W1)) <- achieves(Action,G) & preconditions(Action,Pre) & achieve_all(Pre,W0,W1).