PLANNING Partial order regression planning Temporal representation 1 Deductive planning in Logic Temporal representation 2.

Slides:



Advertisements
Similar presentations
Language for planning problems
Advertisements

CSE391 – 2005 NLP 1 Planning The Planning problem Planning with State-space search.
Chapter 5 Plan-Space Planning.
Planning II: Partial Order Planning
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
Causal-link Planning II José Luis Ambite. 2 CS 541 Causal Link Planning II Planning as Search State SpacePlan Space AlgorithmProgression, Regression POP.
AR for Horn clause logic Introducing: Unification.
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
Classical Planning via Plan-space search COMP3431 Malcolm Ryan.
Plan Generation & Causal-Link Planning 1 José Luis Ambite.
Best-First Search: Agendas
Planning Planning is fundamental to “intelligent” behaviour. E.g.
All rights reserved ©L. Manevitz Lecture 61 Artificial Intelligence Planning System L. Manevitz.
Planning Russell and Norvig: Chapter 11 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2003/ home.htm.
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.
Artificial Intelligence II S. Russell and P. Norvig Artificial Intelligence: A Modern Approach Chapter 11: Planning.
1 Classical STRIPS Planning Alan Fern * * Based in part on slides by Daniel Weld.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
1.2 Row Reduction and Echelon Forms
Linear Equations in Linear Algebra
Artificial Intelligence 2005/06
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Planning Russell and Norvig: Chapter 11. Planning Agent environment agent ? sensors actuators A1A2A3.
Planning Problem Solving  Planning –Action Centred –More flexible decision strategies A Representation for Planning –Add & Delete Lists Planning Techniques.
1 Lecture 12 example (from slides prepared by Prof. J. Rosenchein)
Artificial Intelligence 2005/06 Planning: STRIPS.
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
Intro to AI Fall 2002 © L. Joskowicz 1 Introduction to Artificial Intelligence LECTURE 12: Planning Motivation Search, theorem proving, and planning Situation.
Lesson 6. Refinement of the Operator Model This page describes formally how we refine Figure 2.5 into a more detailed model so that we can connect it.
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.
Relaxation and Hybrid constraint processing Different relaxation techniques Some popular hybrid techniques.
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.
CPS 270: Artificial Intelligence Planning Instructor: Vincent Conitzer.
1 Search vs. planning Situation calculus STRIPS operators Search vs. planning Situation calculus STRIPS operators.
For Friday No reading Homework: –Chapter 11, exercise 4.
CPS 570: Artificial Intelligence Planning Instructor: Vincent Conitzer.
Automated Planning and Decision Making Prof. Ronen Brafman Automated Planning and Decision Making Partial Order Planning Based on slides by: Carmel.
Ch. 13 Ch. 131 jcmt CSE 3302 Programming Languages CSE3302 Programming Languages (notes?) Dr. Carter Tiernan.
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
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
Problem Reduction So far we have considered search strategies for OR graph. In OR graph, several arcs indicate a variety of ways in which the original.
Intro to Planning Or, how to represent the planning problem in logic.
1 CMSC 471 Fall 2004 Class #21 – Thursday, November 11.
Planning I: Total Order Planners Sections
Planning in FOL Systems sequences of actions to achieve goals.
Artificial Intelligence 2004 Planning: Situation Calculus Review STRIPS POP Hierarchical Planning Situation Calculus (John McCarthy) situations.
Causal-link planning 1 Jim Blythe. 2 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning The planning problem Inputs: 1. A description of the world.
Ch. 11 – Planning Supplemental slides for CSE 327 Prof. Jeff Heflin.
1 1.2 Linear Equations in Linear Algebra Row Reduction and Echelon Forms © 2016 Pearson Education, Ltd.
CSE573 Autumn /11/98 Planning Administrative –PS3 due 2/23 –Midterm Friday Last time –regression planning algorithm –introduction to plan-space.
An Introduction to Artificial Intelligence CE 40417
L9. Planning Agents L7_exAnswer and explanation Review
Introduction Contents Sungwook Yoon, Postdoctoral Research Associate
AI Planning.
Planning José Luis Ambite.
L11. Planning Agents and STRIPS
Linear Equations in Linear Algebra
Class #20 – Wednesday, November 5
Graphplan/ SATPlan Chapter
CS344 : Introduction to Artificial Intelligence
Russell and Norvig: Chapter 11 CS121 – Winter 2003
Prof. Pushpak Bhattacharyya, IIT Bombay
Linear Equations in Linear Algebra
Presentation transcript:

PLANNING Partial order regression planning Temporal representation 1 Deductive planning in Logic Temporal representation 2

2 The task of planning  Given:  a description of an initial state of the world  a description of a desired state of the world  a set of actions:  with their preconditions that should hold in the world  with their effects on the world  Find:  a sequence of actions that transform the initial state into the final one.

Partial order regression planning The STRIPS approach

4 State descriptions in STRIPS  Only ground facts are used.  Example: the blocks world:  States of the world are represented individually in logic:  Meaning: there is NO representation of how one state relates to the next  Nor any representation of time!

5

6 Action description in STRIPS  Effects:  two sets of ground facts:  Preconditions:  a set of ground facts that need to be true in the state for the action to be applicable.  the delete list: –need to be removed from the previous state  the add list: –need to be added to the previous state

7 Example: Some operator patterns:  Action1: “move block x from block y to block z” Preconditions If on(x,y) clear(x) clear(x) clear(z) clear(z) Add list Add on(x,z) clear(y) clear(y) Delete list Delete on(x,y) clear(z) clear(z)

8 Example: Operator patterns (2):  Action2: “move block x from block y to Table” If on(x,y) clear(x) clear(x) Add on(x,Table) clear(y) clear(y) Delete on(x,y)

9 Example: Operator patterns (3):  Action3: “move block x from Table to block z”  Note: actual operators are ground instances of these! If on(x,Table) clear(x) clear(x) clear(z) clear(z) Add on(x,z) Delete on(x,Table) clear(z) clear(z)

10 What about using search in forward chaining on this?  This is similar to Automated Reasoning: bottom-up inference is not goal directed, top-down reasoning is!  See example:  Such search is NOT goal directed!  No information on what state to reach

11

12 Backward chaining:  Forward chaining would be progression:  move from initial state to goal state  Example: limited to 1 goal fact!  and only 1 possible path explored  Planning as regression:  start from the goal state and reason backwards to the initial state

13

14

15

16

17

18

19

20 Regression planning: goal reduction.  Select an atomic goal that still needs to be established  Find an operator that establishes it (  add list)  Add the operator to the plan and add an ESTABLISH link between operator and goal.  In general: complex goals are decomposed into atomic ones that themselves are reduced to new goals.  Is somewhat similar to ‘top-down’ goal-directed reasoning in AR.

21 Principle of least commitment (1)  Establish links only impose a partial order:  they do NOT impose that first operator needs to occur EXACTLY before second operator  BUT they are protected links:  NO operator may be scheduled between them that UNDOES the established property !  Clue: do not decide on a choice before it is necessary!

22 High-level algorithm Initialize: operators: = empty; operators: = empty; establishes:= empty; establishes:= empty; before:= empty; before:= empty; complete:= false; blocked:= false; Case: before has loop: blocked:= true; Case: before has loop: blocked:= true; While not(complete) and not(blocked) do Case: O  operators threatens Case: O  operators threatens E(O1,O2)  establishes: E(O1,O2)  establishes: add B(O,O1) OR add B(O2,O) add B(O,O1) OR add B(O2,O) to before; to before; … … … … … …

23 … … … … … … End-While End-While Case: O  operators has unsatisfied Case: O  operators has unsatisfied condition: condition: find O’  operators find O’  operators OR add O’ to operators OR add O’ to operators AND install establishes and AND install establishes and before links before links Otherwise: complete:= true; Otherwise: complete:= true; High-level algorithm (continued)

24 Some comments:  The algorithm is imprecise:  The Case for threatens links can be activated infinitely often for the same link  should test whether it has been dealt with

25 High-level algorithm Initialize: operators: = empty; operators: = empty; establishes:= empty; establishes:= empty; before:= empty; before:= empty; complete:= false; blocked:= false; Case: before has loop: blocked:= true; Case: before has loop: blocked:= true; While not(complete) and not(blocked) do Case: O  operators threatens Case: O  operators threatens E(O1,O2)  establishes: E(O1,O2)  establishes: add B(O,O1) OR add B(O2,O) add B(O,O1) OR add B(O2,O) to before; to before; … … … … … …

26 Some comments:  The algorithm is imprecise:  The Case for threatens links can be activated infinitely often for the same link  should test whether it has been dealt with  The initial situation and goal situation are not explicitly present  and, the initial situation is not considered for unsatisfied conditions  add the initial and goal situation to operators in the Initialization –initial operator has no conditions, just adds initial situation –final operator adds/deletes nothing, just has a condition part.

27 Blocks example:  Initial operator: If Add on(A,C) on(C,Table) clear(A) on(D,B) on(B,Table) clear(D) on(D,B) on(B,Table) clear(D)Delete  Final operator: If on(A,B) on(B,C) on(B,C)AddDelete

28 Further refinement: backtracking:  When it exits the While loop because blocked = true (there is a before loop), then don’t terminate, but backtrack over operator choices.

29 High-level algorithm Initialize: operators: = empty; operators: = empty; establishes:= empty; establishes:= empty; before:= empty; before:= empty; complete:= false; blocked:= false; Case: before has loop: blocked:= true; Case: before has loop: blocked:= true; While not(complete) and not(blocked) do Case: O  operators threatens Case: O  operators threatens E(O1,O2)  establishes: E(O1,O2)  establishes: add B(O,O1) OR add B(O2,O) add B(O,O1) OR add B(O2,O) to before; to before; … … … … … …

30 … … … … … … End-While End-While Case: O  operators has unsatisfied Case: O  operators has unsatisfied condition: condition: find O’  operators find O’  operators OR add O’ to operators OR add O’ to operators AND install establishes and AND install establishes and before links before links Otherwise: complete:= true; Otherwise: complete:= true; High-level algorithm (continued)

31 Further refinement: backtracking:  When it exits the While loop because blocked = true (there is a before loop), then don’t terminate, but backtrack over operator choices.  Note: no point in backtracking over selection of unsatisfied pre-conditions:  they ALL need to be satisfied anyway at the end

32 … … … … … … End-While End-While Case: O  operators has unsatisfied Case: O  operators has unsatisfied condition: condition: find O’  operators find O’  operators OR add O’ to operators OR add O’ to operators AND install establishes and AND install establishes and before links before links Otherwise: complete:= true; Otherwise: complete:= true; High-level algorithm (continued)

33 Further refinement: backtracking:  When it exits the While loop because blocked = true (there is a before loop), then don’t terminate, but backtrack over operator choices.  Note: no point in backtracking over selection of unsatisfied pre-conditions:  they ALL need to be satisfied anyway at the end  PS: note how this is similar to the ‘top-down’ automated reasoning techniques.  (backtrack over previous clause selections, not over previous atom selections).

34 Least commitment(2): plan with operator patterns  Key point:  Use operator patterns:  move x from y to Table  move x from Table to y  move x from y to z  instead of explicit operators:  move A from B to Table  move A from Table to B  move A from B to C  Avoids to make choices when the information to decide upon various alternatives is not yet there!

35 Blocks example: on(A,Table) goal on(A,B)clear(A)on(B,Table) initial on(A,B)clear(A)on(B,Table)on(A,Table) if on(A,y) clear(A) clear(A) add clear(y) on(A,Table) on(A,Table) delete on(A,y) on(A,B)clear(A)on(B,Table) on(A,Table) establishes unification: {x/A) if on(x,y) clear(x) clear(x) add clear(y) on(x,Table) on(x,Table) delete on(x,y) move x from y to Table establishes unification: {y/B)

36 Change in the algorithm: Case: O  operators has unsatisfied condition: condition: find O’  operators find O’  operators OR add O’ to operators OR add O’ to operators AND install establishes and AND install establishes and before links before links  O and O’ are (partially instantiated) operator patterns now  The unsatisfied needs to be unifiable with an element of the add list of O’ now (not be identical)  The unifier needs to be applied on the entire set of operators constructed so far!

37 When is there a threat?  Example: on(A,B)on(B,D)clear(A)clear(B) clear(C)on(B,Table) if on(A,C) clear(A) clear(A) add clear(C) on(A,y) on(A,y) delete on(A,C) clear(y) clear(y) move A from C to y establishes if on(B,z) clear(B) clear(B) add clear(z) on(B,Table) on(B,Table) delete on(B,z) move B from z to Table establishes establishes threat? establishes

38 Dealing with possible threats 1) Ignore them, until they become instantiated to real threats.  Example: only if ‘delete clear(y)’ becomes ‘delete clear(B)’ we consider it a threat  Optimization: at least check whether there is still a consistent value for the variables (Ex.: y can still be assigned value D) 2) Introduce inequality constraints and replace unification by constraint solving  Example: constraint y  B + unification must now also respect the inequalities 3) Choose a value for y  Ex.: assign y = D.