introduction to planning introduction to planning
play

Introduction to Planning Introduction to Planning Course: CS40022 - PowerPoint PPT Presentation

Introduction to Planning Introduction to Planning Course: CS40022 Course: CS40022 Instructor: Dr. Pallab Dasgupta Pallab Dasgupta Instructor: Dr. Department of Computer Science & Engineering Department of Computer Science &


  1. Introduction to Planning Introduction to Planning Course: CS40022 Course: CS40022 Instructor: Dr. Pallab Dasgupta Pallab Dasgupta Instructor: Dr. Department of Computer Science & Engineering Department of Computer Science & Engineering Indian Institute of Technology Kharagpur Kharagpur Indian Institute of Technology

  2. Outline Outline � Planning versus Search Planning versus Search � � Representation of planning problems Representation of planning problems � � Situation calculus Situation calculus � � STRIPS STRIPS � � ADL ADL � � Planning Algorithms Planning Algorithms � � Partial order planning Partial order planning � � GraphPlan GraphPlan � � SATPlan SATPlan � CSE, IIT Kharagpur Kharagpur CSE, IIT 2

  3. The Planning Problem The Planning Problem Get tea, biscuits, and a book. Get tea, biscuits, and a book. � Given: Given: � � Initial state: Initial state: The agent is at The agent is at home home without without � tea, biscuits, book tea, biscuits, book � Goal state: Goal state: The agent is at The agent is at home home with tea, with tea, � biscuits, book biscuits, book CSE, IIT Kharagpur Kharagpur CSE, IIT 3

  4. The Planning Problem The Planning Problem � States can be represented by predicates States can be represented by predicates � such as At(x), Have(y), Sells(x, y) At(x), Have(y), Sells(x, y) such as � Actions: Actions: � � Go(y) : Go(y) : Agent goes to y Agent goes to y � – causes At(y) to be true causes At(y) to be true – � Buy(z): Buy(z): Agent buys z Agent buys z � – causes Have(z) to be true causes Have(z) to be true – � Steal(z): Steal(z): Agent steals z Agent steals z � CSE, IIT Kharagpur Kharagpur CSE, IIT 4

  5. Planning as Search Planning as Search � Actions are given as logical descriptions of Actions are given as logical descriptions of � preconditions and effects. preconditions and effects. � This enables the planner to make direct This enables the planner to make direct � connections between states and actions. connections between states and actions. � The planner is free to add actions to the plan The planner is free to add actions to the plan � wherever they are required, rather than in an wherever they are required, rather than in an incremental way starting from the initial state. incremental way starting from the initial state. � Most parts of the world are independent of Most parts of the world are independent of � most other parts – – hence divide & conquer hence divide & conquer most other parts works well. works well. CSE, IIT Kharagpur Kharagpur CSE, IIT 5

  6. Situation Calculus Initial state: At(Home, s0) ∧ ¬ Have(Tea, s0) ∧ ¬ Have(Biscuits, s0) ∧ ¬ Have(Book, s0) Goal state: ∃ s At(Home, s) ∧ Have(Tea, s) ∧ Have(Biscuits, s) ∧ Have(Book, s) CSE, IIT Kharagpur Kharagpur CSE, IIT 6

  7. Situation Calculus Operators: ∀ a,s Have(Tea, Result(a,s)) ⇔ [(a = Buy(Tea) ∧ At(Tea-shop,s)) ∨ (Have(Tea, s) ∧ a ≠ Drop(Tea))] Result(a,s) names the situation resulting from executing the action a in the situation s CSE, IIT Kharagpur Kharagpur CSE, IIT 7

  8. Practical Planners Practical Planners � To make planning practical we need to: To make planning practical we need to: � � Restrict the language with which we define Restrict the language with which we define � problems. With a restrictive language, problems. With a restrictive language, there are fewer possible solutions to there are fewer possible solutions to search through search through � Use a special Use a special- -purpose algorithm called a purpose algorithm called a � planner rather than a general purpose rather than a general purpose planner theorem prover prover. . theorem CSE, IIT Kharagpur Kharagpur CSE, IIT 8

  9. STRIPS STRIPS � STanford STanford Research Institute Problem Solver Research Institute Problem Solver � � Many planners today use specification Many planners today use specification � languages that are variants of the one used in languages that are variants of the one used in STRIPS. STRIPS. CSE, IIT Kharagpur Kharagpur CSE, IIT 9

  10. Representing states Representing states � States are represented by conjunctions of States are represented by conjunctions of � function- -free ground literals free ground literals function ∧ ¬ ¬ Have(Tea) ∧ At(Home) ∧ Have(Tea) ∧ At(Home) ¬ Have(Biscuits) ∧ ¬ ¬ Have(Book) ¬ Have(Biscuits) ∧ Have(Book) CSE, IIT Kharagpur Kharagpur CSE, IIT 10

  11. Representing goals Representing goals � Goals are also described by conjunctions of Goals are also described by conjunctions of � literals literals ∧ Have(Tea) ∧ At(Home) ∧ Have(Tea) ∧ At(Home) ∧ Have(Book) Have(Biscuits) ∧ Have(Book) Have(Biscuits) � Goals can also contain variables Goals can also contain variables � ∧ Sells(x, Tea) At(x) ∧ Sells(x, Tea) At(x) � The above goal is The above goal is being at a shop that being at a shop that � sells tea sells tea CSE, IIT Kharagpur Kharagpur CSE, IIT 11

  12. Representing Actions Representing Actions � Action description Action description – – serves as a name serves as a name � � Precondition Precondition – – a conjunction of positive a conjunction of positive � literals (why positive?) literals (why positive?) � Effect Effect – – a conjunction of literals (+ a conjunction of literals (+ve ve or or – –ve ve) ) � � The original version had an The original version had an add list add list and a and a � delete list. . delete list Op( ACTION: ACTION: Go(there), Op( Go(there), ∧ Path(here, there), At(here) ∧ PRECOND: At(here) Path(here, there), PRECOND: ∧ ¬ ¬ At(here)) At(there) ∧ EFFECT: At(here)) EFFECT: At(there) CSE, IIT Kharagpur Kharagpur CSE, IIT 12

  13. Representing Plans Representing Plans � A set of plan steps. Each step is one of the A set of plan steps. Each step is one of the � operators for the problem. operators for the problem. � A set of step ordering constraints. Each A set of step ordering constraints. Each � ordering constraint is of the form S S i p S S j , ordering constraint is of the form j , i p indicating S S i must occur sometime before S S j . indicating i must occur sometime before j . � A set of variable binding constraints of the A set of variable binding constraints of the � form v = x v = x, where v is a variable in some step, , where v is a variable in some step, form and x is either a constant or another variable. and x is either a constant or another variable. → c: S S → � A set of causal links written as A set of causal links written as S c: S’ ’ � indicating S satisfies the precondition c for S’ S satisfies the precondition c for S’. . indicating CSE, IIT Kharagpur Kharagpur CSE, IIT 13

  14. Example Example � Actions Actions � Op( ACTION: ACTION: RightShoe RightShoe, , Op( PRECOND: RightSockOn RightSockOn, , PRECOND: EFFECT: RightShoeOn RightShoeOn) ) EFFECT: Op( ACTION: ACTION: RightSock RightSock, , Op( EFFECT: RightSockOn RightSockOn) ) EFFECT: Op( ACTION: ACTION: LeftShoe LeftShoe, , Op( PRECOND: LeftSockOn LeftSockOn, , PRECOND: EFFECT: LeftShoeOn LeftShoeOn) ) EFFECT: Op( ACTION: ACTION: LeftSock LeftSock, , Op( EFFECT: LeftSockOn LeftSockOn) ) EFFECT: CSE, IIT Kharagpur Kharagpur CSE, IIT 14

  15. Example Example � Initial plan Initial plan � Plan( Plan( STEPS: { { STEPS: S1: Op( ACTION: start ), S1: Op( ACTION: start ), S2: Op( ACTION: finish, S2: Op( ACTION: finish, RightShoeOn ∧ ∧ PRECOND: RightShoeOn PRECOND: LeftShoeOn ) }, ) }, LeftShoeOn ORDERINGS: { {S S 1 p S S 2 }, ORDERINGS: 2 }, 1 p BINDINGS: { }, { }, BINDINGS: LINKS: { } { } ) LINKS: ) CSE, IIT Kharagpur Kharagpur CSE, IIT 15

  16. Action Description Language (ADL) Action Description Language (ADL) STRIPS ADL STRIPS ADL Only +ve ve literals in literals in Both +ve ve and and – –ve ve Only + Both + states literals in states states literals in states ∧ Slow ¬ Thin ∧ ¬ ¬ Fast Fat ∧ ¬ Thin ∧ Slow Fast Fat Closed World: Open World: Closed World: Open World: Unmentioned literals Unmentioned literals Unmentioned literals Unmentioned literals are false are false are unknown are unknown ∧¬ Q means ∧¬ Q means Effect P ∧¬ Effect P ∧¬ Q means Q means Effect P Effect P ¬ Q and delete add P, ¬ add P, delete Q Q and delete add P, delete Q add P, ¬ P Q, ¬ P Q, CSE, IIT Kharagpur Kharagpur CSE, IIT 16

  17. Action Description Language (ADL) Action Description Language (ADL) STRIPS ADL STRIPS ADL Only ground literals in Quantified variables in Only ground literals in Quantified variables in goals goals goals goals ∧ Slow ∃ x At(Tea,x) ∧ Fat ∧ ∃ x At(Tea,x) ∧ Slow Fat At(Coffee,x) At(Coffee,x) Goals are conjunctions Goals allow Goals are conjunctions Goals allow conjunctions and conjunctions and disjunctions disjunctions CSE, IIT Kharagpur Kharagpur CSE, IIT 17

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend