April 3, 2006AI: Chapter 11: Planning1 Artificial Intelligence Chapter 11: Planning.

Slides:



Advertisements
Similar presentations
UNIT-3 PLANNING AI Planning Prepared by N. Sathish Kumar AP
Advertisements

REVIEW : Planning To make your thinking more concrete, use a real problem to ground your discussion. –Develop a plan for a person who is getting out of.
Language for planning problems
CSE391 – 2005 NLP 1 Planning The Planning problem Planning with State-space search.
Planning
1 Planning Chapter CMSC 471 Adapted from slides by Tim Finin and Marie desJardins. Some material adopted from notes by Andreas Geyer-Schulz,
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.
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.
PLANNING Ivan Bratko Acknowledgement: Some of these slides were adapted from D. Nau’s course on planning.
Plan Generation & Causal-Link Planning 1 José Luis Ambite.
Chapter 4 - Planning 4.1 State Space Planning 4.2 Partial Order Planning 4.3Planning in the Real World Part II: Methods of AI.
Artificial Intelligence II S. Russell and P. Norvig Artificial Intelligence: A Modern Approach Chapter 11: Planning.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
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
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
Planning: Part 2 Partial Order Planning COMP151 April 2, 2007.
Artificial Intelligence Chapter 11: Planning
Planning Russell and Norvig: Chapter 11. Planning Agent environment agent ? sensors actuators A1A2A3.
Planning: Part 3 Planning Graphs COMP151 April 4, 2007.
Artificial Intelligence 2005/06 Planning: STRIPS.
Planning: Part 1 Representation and State-space Search COMP151 March 30, 2007.
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
1 Planning Chapters 11 and 12 Thanks: Professor Dan Weld, University of Washington.
AI Principles, Lecture on Planning Planning Jeremy Wyatt.
Planning Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
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.
Classical Planning Chapter 10.
Feng Zhiyong Tianjin University Fall planning.
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.
CISC453 Winter 2010 Classical Planning AIMA3e Ch 10.
Artificial Intelligence 1: Planning
April 3, 2006AI: Chapter 11: Planning1 Artificial Intelligence Chapter 11: Planning Michael Scherger Department of Computer Science Kent State University.
1 CSC 8520 Spring Paula MatuszekBased on
Planning Chapter Planning The Planning problem Planning with State-space search Partial-order planning Planning graphs Planning with propositional.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 07 : Planning.
Planning (Chapter 10)
CPS 270: Artificial Intelligence Planning Instructor: Vincent Conitzer.
1 Search vs. planning Situation calculus STRIPS operators Search vs. planning Situation calculus STRIPS operators.
Computing & Information Sciences Kansas State University Lecture 21 of 42 CIS 530 / 730 Artificial Intelligence Lecture 21 of 42 Planning: Graph Planning.
For Friday No reading Homework: –Chapter 11, exercise 4.
CPS 570: Artificial Intelligence Planning Instructor: Vincent Conitzer.
Planning (Chapter 10)
Automated Planning Dr. Héctor Muñoz-Avila. What is Planning? Classical Definition Domain Independent: symbolic descriptions of the problems and the domain.
Partial Order Planning 1 Brian C. Williams J/6.834J Sept 16 th, 2002 Slides with help from: Dan Weld Stuart Russell & Peter Norvig.
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
1/16 Planning Chapter 11- Part1 Author: Vali Derhami.
Planning I: Total Order Planners Sections
Planning in FOL Systems sequences of actions to achieve goals.
Introduction to Artificial Intelligence April 11, 2012 Planning 1 Introduction to Artificial Intelligence CSCE476/876, Spring 2012:
Consider the task get milk, bananas, and a cordless drill.
ADVANCED PLANNING TECHNIQUES Dr. Adam Anthony Lecture 22.
CLASSICAL PLANNING. Outline  The challenges in planning with standard search algorithm  Representing Plans – the PDDL language  Planning as state -
Planning (Chapter 10) Slides by Svetlana Lazebnik, 9/2016 with modifications by Mark Hasegawa-Johnson, 9/2017
Planning (Chapter 10)
Introduction Contents Sungwook Yoon, Postdoctoral Research Associate
Planning (Chapter 10)
EA C461 – Artificial Intelligence Planning
Consider the task get milk, bananas, and a cordless drill
AI Planning.
Logic for Artificial Intelligence
Artificial Intelligence: Planning
L11. Planning Agents and STRIPS
Planning Chapter
AI Planning Introduction to Artificial Intelligence
Russell and Norvig: Chapter 11 CS121 – Winter 2003
L9. STRIPS Examples Recursive STRIPS Block world
Presentation transcript:

April 3, 2006AI: Chapter 11: Planning1 Artificial Intelligence Chapter 11: Planning

April 3, 2006AI: Chapter 11: Planning2 Contents Search vs. Planning The Language of Planning Problems STRIPS Operators Partial Order Planning CLIPS

April 3, 2006AI: Chapter 11: Planning3 Introduction Planning is the task of coming up with a sequence of actions that will achieve the goal Classical planning environments –Fully observable, deterministic, finite, static (change only happens when the agent acts), and discrete (in time, action, objects)

April 3, 2006AI: Chapter 11: Planning4 Introduction A plan is complete iff every precondition is achieved A precondition is achieved iff it is the effect if an earlier step and no possibly intervening step undoes it

April 3, 2006AI: Chapter 11: Planning5 Search vs. Planning Consider a Internet Buying Agent whose task it is to buy our text book (search based) –ISBN# –Searched based agent One buying action for each ISBN number –Planning based agent Work backwards Goal is Have( ) Have(x) results from Buy(x) Therefore Buy( )

April 3, 2006AI: Chapter 11: Planning6 Search vs. Planning If our planning agent could use a conjunction of subgoals –Then it could use a single domain- independent heuristic The number of unsatisfied conjuncts –Have(A)  Have(B)  Have(C)  Have(D) –A state containing Have(A)  Have(B) would have a cost 2

April 3, 2006AI: Chapter 11: Planning7 Search vs. Planning Another example: –Consider the task of getting milk, bananas, and a cordless drill Really want to go to supermarket and then go to the hardware store But we could get sidetracked! –By irrelevant actions

April 3, 2006AI: Chapter 11: Planning8 Search vs. Planning

April 3, 2006AI: Chapter 11: Planning9 Search vs. Planning Planning Systems do the following: –Open up action and goal representation to allow selection –Divide-and-conquer by sub-goaling –Relax requirement for sequential construction of solutions

April 3, 2006AI: Chapter 11: Planning10 The Language of Planning Problems Representation of states –Decompose the world into logical conditions and represent a state as a conjunction of positive literals –Must be ground and function-free –Examples: Poor  Unknown At( Plane 1, CLE )  At( Plane 2, LAS ) At(x,y) or At( Father(Fred), CLE) (not allowed)

April 3, 2006AI: Chapter 11: Planning11 The Language of Planning Problems Representation of goals –A partially specified state –Represented as a conjunction of ground literals –Examples At( Plane 1, LAS ) Rich  Famous –State s satisfies goal g if s contains all the atoms in g (and possibly others) Rich  Famous  Miserable satisfies Rich  Famous

April 3, 2006AI: Chapter 11: Planning12 The Language of Planning Problems Representation of actions –Specified in terms of the preconditions that must hold before it can be executed and the effects that ensue when it is executed –Action( Fly( p, from, to )) Precond: At(p, from)  Plane(p)  Airport(from)  Airport(to) Effect: ¬ At(p, from)  At(p, to) –This is also known as an action schema

April 3, 2006AI: Chapter 11: Planning13 Search vs. Planning Again Search –States: program data structures –Actions: program code –Goal: program code –Plan: sequence from S 0 Planning –States: logical sentences –Actions: preconditions and outcomes –Goal: logical sentences (conjunction) –Plan: constraints on actions

April 3, 2006AI: Chapter 11: Planning14 Example Suppose our current state is: –At(P1, CLE)  At(P2, LAS)  Plane(P1)  Plane(P2)  Airport(CLE)  Airport(LAS) This state satisfies the precondition –At(p, from)  Plane(p)  Airport(from)  Airport(to) Using the substitution –{p/P1, from/CLE, to/LAS} The following concrete action is applicable –Fly( P1, CLE, LAS)

April 3, 2006AI: Chapter 11: Planning15 STRIPS STanford Research Institute Problem Solver A restricted language for planning that describes actions and descriptions of objects in a system Example –Action: Buy(x) –Precondition: At(p), Sells(p, x) –Effect: Have(x)

April 3, 2006AI: Chapter 11: Planning16 STRIPS This abstracts away many important details! Restricted language -> efficient algorithm –Precondition: conjunction of positive literals –Effect: conjunction of literals A complete set of STRIPS operators can be translated into a set of successor-state axioms

April 3, 2006AI: Chapter 11: Planning17 STRIPS Only positive literals in states: Poor  Unknown Closed world assumption: Unmentioned literals are false Effect P  ¬Q: Add P and delete Q Only ground literals in goals: Rich  Famous

April 3, 2006AI: Chapter 11: Planning18 STRIPS Goals are conjunctions: Rich  Famous Effects are conjunctions: No support for equality No support for types

April 3, 2006AI: Chapter 11: Planning19 ADL Positive and negative literals in states: ¬ Rich  ¬ Famous Open world assumption: Unmentioned literals are unknown Effect P  ¬Q: Add P and ¬ Q and delete ¬ P and Q Quantified variables in goals:  x At(P 1, x)  At(P 2, x) is the goal of having P 1 and P 2 in the same place

April 3, 2006AI: Chapter 11: Planning20 ADL Goals allow conjunction and disjunction: ¬ Poor  (Famous  Smart) Conditional Effects are allowed: when P: E means E is an effect only if P is satisfied Equality predicate built in: (x = y) Variables can have types: (p : Plane)

April 3, 2006AI: Chapter 11: Planning21

April 3, 2006AI: Chapter 11: Planning22 Example: Air Cargo Transport Init(At(C 1, CLE)  At(C 2, LAS)  At(P 1, CLE)  At(P 2, LAS)  Cargo(C 1 )  Cargo(C 2 )  Plane(P 1 )  Plane(P 2 )  Airport(CLE)  Airport(LAS)) Goal( At(C 1, LAS) At(C 2, CLE))

April 3, 2006AI: Chapter 11: Planning23 Example: Air Cargo Transport Action( Load(c, p, a), Precond: At(c, a)  At(p, a)  Cargo(c)  Plane(p)  Airport(a) Effect: ¬ At(c, a)  In(c, p)) Action( Unload(c, p, a), Precond: In(c, p)  At( p, a)  Cargo(c)  Plane(p)  Airport(a) Effect: At(c, a)  ¬ In(c, p)) Action( Fly( p, from, to), Precond: At(p, from)  Plane(p)  Airport(from)  Airport(to) Effect: ¬ At(p, from)  At(p, to))

April 3, 2006AI: Chapter 11: Planning24 Example: Air Cargo Transport [ Load(C 1, P 1, CLE), Fly(P 1, CLE, LAS), Unload( C 1, P 1, LAS), Load(C 2, P 2, LAS), Fly(P 2, LAS, CLE), Unload( C 2, P 2, CLE)] Is it possible for a plane to fly to and from the same airport?

April 3, 2006AI: Chapter 11: Planning25 Example: The Spare Tire Problem Init( At( Flat, Axle)  At( Spare, Trunk)) Goal( At(Spare, Axle))

April 3, 2006AI: Chapter 11: Planning26 Example: The Spare Tire Problem Action( Remove( Spare, Trunk ), Precond: At( Spare, Trunk ) Effect: ¬ At( Spare, Trunk)  At( Spare, Ground)) Action( Remove( Flat, Axle ), Precond: At(Flat, Axle ) Effect: ¬ At(Flat, Axle)  At(Flat, Ground)) Action( PutOn( Spare, Axle ), Precond: At( Spare, Ground )  ¬ At (Flat, Axle ) Effect: ¬ At( Spare, Ground )  At( Spare, Axle )) Action( LeaveOvernight, Precond: Effect: ¬ At( Spare, Ground )  ¬ At(Spare, Axle)  ¬ At(Spare, Trunk)  ¬ At(Flat, Ground)  ¬ At(Flat, Axle)

April 3, 2006AI: Chapter 11: Planning27 Example: The Blocks World Init( On(A, Table)  On(B, Table)  On(C, Table)  Block(A)  Block(B)  Block(C)  Clear(A)  Clear(B)  Clear(C)) Goal( On(A, B)  On(B, C))

April 3, 2006AI: Chapter 11: Planning28 Example: The Blocks World Action( Move( b, x, y ), Precond: On(b,x)  Clear(b)  Clear(y)  Block(b)  (b ≠ x)  (b≠y)  (x ≠ y) Effect: On(b, y)  Clear(x)  ¬ On(b,x)  ¬ Clear(y)) Action( MoveToTable(b, x ), Precond: On(b, x)  Clear(b)  Block(b)  (b ≠ x) Effect: On(b, Table)  Clear(x)  ¬ On(b, x))

April 3, 2006AI: Chapter 11: Planning29 Example: The Blocks World A plan for building a three block tower [Move(B, Table, C), Move(A, Table, B)]

April 3, 2006AI: Chapter 11: Planning30

April 3, 2006AI: Chapter 11: Planning31 Partially Ordered Plans Partially Ordered Plan –A partially ordered collection of steps Start step has the initial state description and its effect Finish step has the goal description as its precondition Causal links from outcome of one step to precondition of another step Temporal ordering between pairs of steps

April 3, 2006AI: Chapter 11: Planning32 Partial Ordered Plans An open condition is a precondition of a step not yet causally linked A plan is complete iff every precondition is achieved A precondition is achieved iff it is the effect if an earlier step and no possibly intervening step undoes it

Partial Order Planning (POP) State-space search –Yields totally ordered plans (linear plans) POP –Works on subproblems independently, then combines subplans –Example Goal(RightShoeOn  LeftShoeOn) Init() Action(RightShoe, P RECOND : RightSockOn, E FFECT : RightShoeOn) Action(RightSock, E FFECT : RightSockOn) Action(LeftShoe, P RECOND : LeftSockOn, E FFECT : LeftShoeOn) Action(LeftSock, E FFECT : LeftSockOn) 33

POP Example & its linearization 34

April 3, 2006AI: Chapter 11: Planning35 Partially Ordered Plans Start Finish Right Sock Right Shoe Left Sock Left Shoe

Components of a Plan 1.A set of actions 2.A set of ordering constraints –A  B reads “A before B” but not necessarily immediately before B –Alert: caution to cycles A  B and B  A 3.A set of causal links (protection intervals) between actions –A B reads “A achieves p for B” and p must remain true from the time A is applied to the time B is applied –Example “RightSock RightShoe 4.A set of open preconditions –Planners work to reduce the set of open preconditions to the empty set w/o introducing contradictions 36 p RightSockOn

Consistent Plan (POP) Consistent plan is a plan that has –No cycle in the ordering constraints –No conflicts with the causal links Solution –Is a consistent plan with no open preconditions To solve a conflict between a causal link A B and an action C (that clobbers, threatens the causal link), we force C to occur outside the “protection interval” by adding – the constraint C  A (demoting C) or – the constraint B  C (promoting C) 37 p

Setting up the PoP Add dummy states –Start Has no preconditions Its effects are the literals of the initial state –Finish Its preconditions are the literals of the goal state Has no effects Initial Plan: –Actions: {Start, Finish} –Ordering constraints: {Start  Finish} –Causal links: {} –Open Preconditions: {LeftShoeOn,RightShoeOn} 38 Start Finish Start Finish LeftShoeOn, RightShoeOn Literal 1, Literal 2, … Literal a, Literal b, …

POP as a Search Problem The successor function arbitrarily picks one open precondition p on an action B For every possible consistent action A that achieves p –It generates a successor plan adding the causal link A B and the ordering constraint A  B –If A was not in the plan, it adds Start  A and A  Finish –It resolves all conflicts between the new causal link and all existing actions between A and all existing causal links –Then it adds the successor states for combination of resolved conflicts It repeats until no open precondition exists 39 p

April 3, 2006AI: Chapter 11: Planning40 Partially Ordered Plans

April 3, 2006AI: Chapter 11: Planning41 Partially Ordered Plans

April 3, 2006AI: Chapter 11: Planning42 Partially Ordered Plans

April 3, 2006AI: Chapter 11: Planning43 POP Algorithm

April 3, 2006AI: Chapter 11: Planning44 POP Algorithm

April 3, 2006AI: Chapter 11: Planning45 Clobbering A clobberer is a potentially intervening step that destroys the condition achieved by a causal link –Example Go(Home) clobbers At(Supermarket) Demotion –Put before Go(Supermarket) Promotion –Put after Buy(Milk)

April 3, 2006AI: Chapter 11: Planning46 Example: Blocks World

April 3, 2006AI: Chapter 11: Planning47 Example: Blocks World

April 3, 2006AI: Chapter 11: Planning48 Example: Blocks World

April 3, 2006AI: Chapter 11: Planning49 Example: Blocks World

April 3, 2006AI: Chapter 11: Planning50 Example: Blocks World

See problem description in Fig 11.7 page 391 Only one open precondition Only 1 applicable action Example of POP: Flat tire problem 51 Start Finish At(Spare,Trunk), At(Flat,Axle) At(Spare,Axle) PutOn(Spare,Axle) At(Spare,Ground),  At(Flat,Axle) Pick up At(Spare,Ground) Choose only applicable action Remove(Spare,Trunk)

52 Pick up  At(Flat,Axle) There are 2 applicable actions: LeaveOvernight and Remove(Flat,Axle) Choose LeaveOvernight Add causal link between Remove(Spare,Trunk) and PutOn(Spare,Axle) LeaveOvernight has effect  At(Spare,Ground), which conflicts with the causal link We remove the conflict by forcing LeaveOvernight to occur before Remove(Spare,Trunk) Conflicts with effects of Remove(Spare,Trunk) The only way to resolve the conflict is to undo LeaveOvernightuse the action Remove(Flat,Axle)

53 This time, we choose Remove(Flat,Axle) Pick up At(Spare,Trunk) and choose Start to achieve it Pick up At(Flat,Axle) and choose Start to achieve it. We now have a complete consistent partially ordered plan