1 Lecture 12 example (from slides prepared by Prof. J. Rosenchein)

Slides:



Advertisements
Similar presentations
Planning Graphs * Based on slides by Alan Fern, Berthe Choueiry and Sungwook Yoon.
Advertisements

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.
Chapter 4 - Planning 4.1 State Space Planning 4.2 Partial Order Planning 4.3Planning in the Real World Part II: Methods of AI.
Planning Chapter 10.
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.
1  Planning (under complete Knowledge) Intro to Artificial Intelligence.
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.
CLASSICAL PLANNING AND GRAPHPLAN Classes 17 and 18 All slides created by Dr. Adam P. Anthony.
1 Classical STRIPS Planning Alan Fern * * Based in part on slides by Daniel Weld.
EXAMPLE OF PARTIAL ORDER PLANNING. Action Recipes: Action: Stack(x,y) Prec: Clear(x) ^ Clear(y) ^ OnTable(x) Effect: ~Clear(y) ^ ~OnTable(x) ^ On(x,y)
Artificial Intelligence 2005/06
CPSC 322 Introduction to Artificial Intelligence November 19, 2004.
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.
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 Action Planning (Where logic-based representation of knowledge makes search problems more interesting) R&N: Chap. 11, Sect. 11.1–4.
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:
Nonlinear Planning Lecture Module 9. Nonlinear Planning with Goal Set Generate a plan by doing some work on one goal, then some on another and then some.
Planning Chapter Some material adopted from notes by Andreas Geyer-Schulz and Chuck Dyer.
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.
1 CMSC 671 Fall 2010 Class #12/13 – Wednesday, October 13/ Monday, October 18 Some material adapted from slides by Jean-Claude Latombe / Lise Getoor.
Planning, page 1 CSI 4106, Winter 2005 Planning Points Elements of a planning problem Planning as resolution Conditional plans Actions as preconditions.
Artificial Intelligence Chapter 22 Planning Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
CPS 270: Artificial Intelligence Planning Instructor: Vincent Conitzer.
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.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
1 Planning Chapter 10 Some material adopted from notes by Tim Finin, Marie desJardins Andreas Geyer-Schulz, and Chuck Dyer.
CPS 570: Artificial Intelligence Planning Instructor: Vincent Conitzer.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
1/16 Planning Chapter 11- Part1 Author: Vali Derhami.
Towards Model-lite Planning A Proposal For Learning & Planning with Incomplete Domain Models Sungwook Yoon Subbarao Kambhampati Supported by DARPA Integrated.
Intelligent Systems Planning.
Planning in FOL Systems sequences of actions to achieve goals.
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.
Planning Chapter Some material adopted from notes by Andreas Geyer-Schulz and Chuck Dyer.
An Introduction to Artificial Intelligence CE 40417
Fast Propositional Algorithms for Planning
Planning Chapter 16.
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
CMSC 471 Fall 2011 Class #16 Tuesday, October 25, 2011 Planning
AI Planning.
Planning Chapter and Chuck Dyer
Planning Chapter
© James D. Skrentny from notes by C. Dyer, et. al.
CPSC 322 Introduction to Artificial Intelligence
CS344 : Introduction to Artificial Intelligence
Class #15 / 16 – Tuesday, October 20 / Thursday, October 22
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.
Prof. Pushpak Bhattacharyya, IIT Bombay
Presentation transcript:

1 Lecture 12 example (from slides prepared by Prof. J. Rosenchein)

2 STRIPS Planning: the basic idea Place goal on goal stack: Goal1 Considering top Goal1, place onto it its subgoals: Goal1 GoalS1-2 GoalS1-1 Then try to solve subgoal GoalS1-2, and continue…

3 Stack Manipulation Rules If on top of goal stack:Then do: Compound or single goal matching the current state description. Remove it. Compound goal not matching the current state description. 1. Keep original compound goal on stack; 2. List the unsatisfied component goals on the stack in some new order. Single-literal goal not matching the current state description. Find rule whose instantiated add-list includes the goal, and 1. Replace the goal with the instantiated rule; 2. Place the rule’s instantiated precondition formula on top of stack Rule 1. Remove rule from stack; 2. Update database using rule; 3. Keep track of rule (for solution) NothingStop

4 Detailed example a c b a c b start: goal 1. Place on stack original goal: Stack: on(a,c) on(c,b) clear(b) on(c,a) clear(c) ontable(a) ontable(b) handempty Database:

5 2. Since top goal is unsatisfied compound goal, list its unsatisfied subgoals on top of it: Stack: on(a,c) on(c,b) on(a,c) on(c,b) clear(b) on(c,a) clear(c) ontable(a) ontable(b) handempty Database (unchanged):

6 3. Since top goal is unsatisfied single- literal goal, find rule whose instantiated add-list includes the goal, and: a. Replace the goal with the instantiated rule; b. Place the rule’s instantiated precondition formula on top of stack Stack: on(a,c) on(c,b) on(a,c) stack(c,b) holding(c) clear(b) clear(b) on(c,a) clear(c) ontable(a) ontable(b) handempty Database (unchanged):

7 4. Since top goal is unsatisfied compound goal, list its subgoals on top of it: Stack: on(a,c) on(c,b) on(a,c) stack(c,b) holding(c) clear(b) holding(c) clear(b) on(c,a) clear(c) ontable(a) ontable(b) handempty Database (unchanged):

8 5. Single goal on top of stack matches data base, so remove it: Stack: on(a,c) on(c,b) on(a,c) stack(c,b) holding(c) clear(b) holding(c) clear(b) on(c,a) clear(c) ontable(a) ontable(b) handempty Database (unchanged):

9 6. Since top goal is unsatisfied single- literal goal, find rule whose instantiated add-list includes the goal, and: a. Replace the goal with the instantiated rule; b. Place the rule’s instantiated precondition formula on top of stack on(c,a)  clear(c)  handempty Stack: on(a,c) on(c,b) on(a,c) stack(c,b) holding(c) clear(b) unstack(c) Database: (unchanged)

10 7. Compound goal on top of stack matches data base, so remove it: clear(b) on(c,a) clear(c) ontable(a) ontable(b) handempty Database (unchanged): Stack: on(a,c) on(c,b) on(a,c) stack(c,b) holding(c) clear(b) unstack(c)

11 8. Top item is rule, so: a. Remove rule from stack; b. Update database using rule; c. Keep track of rule (for solution) Stack: on(a,c) on(c,b) on(a,c) stack(c,b) holding(c) clear(b) clear(b) ontable(a) ontable(b) holding(c) clear(a) Database: Solution: {unstack(c)}

12 9. Compound goal on top of stack matches data base, so remove it: Stack: on(a,c) on(c,b) on(a,c) stack(c,b) clear(b) ontable(a) ontable(b) holding(c) clear(a) Database (unchanged): Solution: {unstack(c)}

Top item is rule, so: a. Remove rule from stack; b. Update database using rule; c. Keep track of rule (for solution) Stack: on(a,c) on(c,b) on(a,c) ontable(a) ontable(b) handempty clear(a) clear(c) on(c,b) Database: Solution: {unstack(c), stack(c,b)}

Since top goal is unsatisfied single- literal goal, find rule whose instantiated add-list includes the goal, and: a. Replace the goal with the instantiated rule; b. Place the rule’s instantiated precondition formula on top of stack Stack: on(a,c) on(c,b) stack(a,c) ontable(a) ontable(b) handempty clear(a) clear(c) on(c,b) Database (unchanged): Solution: {unstack(c), stack(c,b)} holding(a) clear(c)

Since top goal is unsatisfied compound goal, list its unsatisfied subgoals on top of it: Stack: on(a,c) on(c,b) stack(a,c) ontable(a) ontable(b) handempty clear(a) clear(c) on(c,b) Database (unchanged): holding(a) clear(c) holding(a) Solution: {unstack(c), stack(c,b)}

Since top goal is unsatisfied single-literal goal, find rule whose instantiated add-list includes the goal, and: a. Replace the goal with the instantiated rule; b. Place the rule’s instantiated precondition formula on top of stack Stack: on(a,c) on(c,b) stack(a,c) holding(a) clear(c) pickup(a) ontable(a)  clear(a)  handempty Database: (unchanged) Solution: {unstack(c), stack(c,b)}

Compound goal on top of stack matches data base, so remove it: Stack: on(a,c) on(c,b) stack(a,c) holding(a) clear(c) pickup(a) ontable(a) ontable(b) handempty clear(a) clear(c) on(c,b) Database (unchanged): Solution: {unstack(c), stack(c,b)}

Top item is rule, so: a. Remove rule from stack; b. Update database using rule; c. Keep track of rule (for solution) Stack: on(a,c) on(c,b) stack(a,c) holding(a) clear(c) ontable(b) on(c,b) clear(c) holding(a) Database: Solution: {unstack(c), stack(c,b), pickup(a)}

Compound goal on top of stack matches data base, so remove it: Stack: on(a,c) on(c,b) stack(a,c) ontable(b) on(c,b) clear(c) holding(a) Database (unchanged): Solution: {unstack(c), stack(c,b), pickup(a)}

Top item is rule, so: a. Remove rule from stack; b. Update database using rule; c. Keep track of rule (for solution) Stack: on(a,c) on(c,b) ontable(b) on(c,b) on(a,c) clear(a) handempty Database: Solution: {unstack(c), stack(c,b), pickup(a), stack(a,c)}

Compound goal on top of stack matches data base, so remove it: Stack: ontable(b) on(c,b) on(a,c) clear(a) handempty Database (unchanged): Solution: {unstack(c), stack(c,b), pickup(a), stack(a,c)} 19. Stack is empty, so stop.

22 Example revisited a c b a c b start goal: In solving this problem, we took some shortcuts—we branched in the right direction every time. In practice, searching can be guided by: 1. Heuristic information (e.g., try to achieve “holding(X)” last) 2. Detecting unprofitable paths (e.g., when the newest goal set has become a superset of the original goal set) 3. Considering useful operator side effects (by scanning down the stack).

23 Sometimes even this doesn’t help… a c b a c b i:g: on(c,a) ontable(a) ontable(b) armempty on(a,b) on(b,c) It could try on(b,c) first, then on(a,b) —but it will find that the first goal has been undone. So the first goal will be added back onto the stack and solved.

24 The final sequence is inefficient: a c b start pickup(b) stack(b,c) unstack(b,c) putdown(b) unstack(c,a) putdown(c) pickup(a) stack(a,b) unstack(a,b) putdown(a) pickup(b) stack(b,c) pickup(a) stack(a,b) a c b 1. Trying the goals in the other order doesn’t help much. 2. We can remove adjacent operators that undo each other. goal

25 What we really want is to: 1. Begin work on on(a,b) by clearing a (i.e., putting c on table) 2. Achieve on(b,c) by stacking b on c 3. Achieve [finish] on(a,b) by stacking a on b. a c b a c b goal We couldn’t do this using a stack, but we can if we use a set of goals. start

26 Backward Nonlinear Planning Plan from the goal set using STRIPS rules in the backward direction… on(b,c) on(a,b) holding(a) clear(b) on(b,c) holding(b) clear(c) on(a,b) ontable(a) clear(a) handempty on(b,c) clear(b) holding(b) clear(c) holding(a) clear(b) handempty clear(x) on(x,b) on(b,c) holding(a) handempty clear(a) on(a,b) on(b,c) stack(b,c) stack(a,b) pickup(a) stack(b,c) unstack(x,b) unstack(a,b) x = impossible condition xx = superset of original set x xxxx preconditions

27 Eventually we get back to our initial state, having found our plan operators “backwards” But we left out one detail: REGRESSION. What we had been doing was copying the whole goal set to the new node (with just one goal being replaced by the operator’s preconditions): ex: on(a,b) on(b,c) clear(b) holding(a) on(b,c) stack(a,b)

28 The asumption is that stack(a,b) doesn’t affect on(b,c), which is correct; but the assumption isn’t always true: ontable(a) clear(a) handempty on(b,c) clear(b) ontable(a) on(X,a) clear(X) false on(b,c) clear(b) unstack(X,a) There’s no way we can have handempty immediately after an unstack.

29 So instead of directly copying the “non-selected” goals into the goal set, we apply REGRESSION. “When we regress a goal through an operator, we are trying to determine what must be true before the operator is performed in order for the goal to be satisfied afterward.” regression[on(a,b), pickup(c)]=on(a,b) regression[on(a,b), stack(a,b)]=true regression[handempty,pickup(a)]=false Ex:

30 General rule for STRIPS operators (G=goal, O=operator): G regressed through O is 1. true if G is part of O’s add-list 2. false if G is part of O’s delete-list 3. G otherwise. If using G’s and O’s with uninstantiated variables, replace G by G[u] and O by O[u] above, where u is a substitution instance. Goal sets with false can never be satisfied. A specific goal that regresses to true can be removed from the goal set.

31 Regressing through incompletely instantiated rules Ex: unstack(X,Y) P & D: handempty, clear(X), on(X,Y) A: holding(X), clear(Y) Consider the case of regressing through unstack(b,Y): 1. Regressing holding(b) yields true 2. Regressing handempty yields false 3. Regressing ontable(c) yields ontable(c) 4. Regressing clear(Y) yields (Y= c) clear(c); i.e., we produce two alternative sub-goal expressions, one with the preconditions of unstack(b,c), the other with the uninstantiated preconditions of unstack(b,Y) conjoined with ~(Y = c)

32 Example of regression planning

33

34