![Page 1: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/1.jpg)
Language for planning problems• STRIPS: STanford Research Institute Problem Solver• world described by logical conditions• state as conjunction of positive literals
– propositional; e.g., Happy ^ Hungry to represent the state of the agent
– first-order ground and function-free terms; • e.g., At(Plane1, Verona) ^ At(Plane2,Malpensa)
• closed-world assumption; i.e., any not mentioned condition is false
• goal is a partially specified state– a state satisfies a goal if contains all the literals of the goal– e.g. state At(Plane1, Verona) ^ At(Plane2,Malpensa) satisfies goal
At(Plane2,Malpensa)
![Page 2: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/2.jpg)
STRIPS actions (contd.)• Tidily arranged actions descriptions, restricted
language• Action schema:
– ACTION: specifies name and parameter list• Buy(x)
– PRECONDITION: conjunction of positive literals• At(p) ^ Sells(p, x)
– EFFECT: conjunction of literals (positive or negative)• Have(x)
– [Note: no information on how to execute the action!]• A complete set of STRIPS operators can be
translated into a set of successor-state axioms
![Page 3: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/3.jpg)
Example: Air cargo transport• predicates In(·, ·),At(·, ·)• type predicates: Cargo(·), Plane(·),Airport(·)• Start
– At(C1, SFO) ^ At(C2, JFK) ^ At(P1, SFO) ^ At(P2, JFK) ^ Cargo(C1) ^ Cargo(C2) ^ Plane(P1) ^ Plane(P2) ^ Airport(JFK) ^ Airport(SFO)
• Goal– At(C1, JFK) ^ At(C2, SFO)
• Actions– Load(c, p, a)– Unload(c, p, a)– Fly(p, from, to)
![Page 4: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/4.jpg)
Example: Air cargo transport• predicates In(·, ·),At(·, ·)• type predicates: Cargo(·), Plane(·),Airport(·)• Start
– At(C1, SFO) ^ At(C2, JFK) ^ At(P1, SFO) ^ At(P2, JFK) ^ Cargo(C1) ^ Cargo(C2) ^ Plane(P1) ^ Plane(P2) ^ Airport(JFK) ^ Airport(SFO)
• Goal– At(C1, JFK) ^ At(C2, SFO)
• Actions– Load(c, p, a)– Unload(c, p, a)– Fly(p, from, to)
![Page 5: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/5.jpg)
Example: Air cargo transport• Actions
– Load(c, p, a)• PRE: At(c, a) ^ At(p, a) ^ Cargo(c) ^ Plane(p) ^
Airport(a)• EFF: ¬At(c, a) ^ In(c, p)
– Unload(c, p, a)• PRE: In(c, p) ^ At(p, a) ^ Cargo(c) ^ Plane(p) ^
Airport(a)• EFF: At(c, a) ^ ¬In(c, p)
– Fly(p, from, to)• PRE: At(p, from) ^ Plane(p) ^ Airport(from) ^
Airport(to)• EFF: ¬At(p, from) ^ At(p, to)
![Page 6: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/6.jpg)
Example: Air cargo transport (contd.)
• a solution is– Load(C1, P1, SFO),– Fly(P1, SFO, JFK), – Unload(C1, P1, JFK),– Load(C2, P2, JFK), – Fly(P2, JFK, SFO), – Unload(C2, P2, SFO)
![Page 7: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/7.jpg)
STRIPS Planning• STRIPS planning problem:
– find a sequence of actions that lead to a goal
– states and goals are defined by a conjunctions of literals
• State-space search– Forward search (goal progression) from the initial state
try to reach the goal
– Backward search (goal regression) from the goal and try to project it to the initial state
• Plan-space search– partial-order planning (POP) search the space of
partially build plans
![Page 8: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/8.jpg)
State-space search• planning problem defines the search problem
– initial state is the start state
– goal test checks whether state satisfies the goal
– actions define the operators
– step cost is usually 1
• (a) forward or • (b) backward search
![Page 9: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/9.jpg)
Forward search
• main search loop– select an action and unify precondition with the
state– if precondition is satisfied, apply the action
generating a new state– check whether the new state satisfies the goal
![Page 10: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/10.jpg)
Forward search with the Shopping Example
• Start– At(Home) ^ Sells(SM,Milk) ^ Sells(SM,Banana) ^
Sells(HWS,Drill)^Loc(Home)^Loc(SM)^Loc(HWS)
• Buy(x)– PRE: At(store), Sells(store, x)– EFF: Have(x)
• Go(x, y)– PRE: At(x),Loc(y)– EFF: At(y),¬At(x)
• Goal– Have(Milk) ^ Have(Banana) ^ Have(Drill)
![Page 11: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/11.jpg)
Forward search
• main search loop– select an action and unify precondition with the state
– if precondition is satisfied, apply the action generating a new state
– check whether the new state satisfies the goal
• state space is finite -> complete for complete search algorithms
• inefficient because of irrelevant actions -- needs good heuristics
![Page 12: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/12.jpg)
Backward search• idea: select relevant actions only starting from the goal• action is
– relevant when it achieves one of the conjuncts (add-list)– consistent when doesn’t undo any desired literal (delete-list)
• select a relevant and consistent action and generate new state1. delete add-list2. add preconditions
• terminates with a state satisfied by the initial state• branching on relevant and consistent states
![Page 13: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/13.jpg)
Backward search with the Shopping Example
• Start– At(Home) ^ Sells(SM,Milk) ^ Sells(SM,Banana) ^
Sells(HWS,Drill)^Loc(Home)^Loc(SM)^Loc(HWS)
• Buy(x)– PRE: At(store), Sells(store, x)– EFF: Have(x)
• Go(x, y)– PRE: At(x),Loc(y)– EFF: At(y),¬At(x)
• Goal– Have(Milk) ^ Have(Banana) ^ Have(Drill)
![Page 14: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/14.jpg)
State-space vs. plan-space• forward and backward search explore linear sequences of
actions
• this is not necessary– consider the solution for the air cargo transport
• Load(C1, P1, SFO), Fly(P1, SFO, JFK),Unload(C1, P1, JFK),
• Load(C2, P2, JFK), Fly(P2, JFK, SFO),Unload(C2, P2, SFO)
– the only required ordering is among Load, Fly and Unload
– connected by causal effects; e.g., Load(C1, P1, SFO) achieve In(C1,P1), used by the precondition of Unload
– there’s no need to put Load(C2, P2, JFK) after Unload(C1, P1, JFK)
• partial-order plan: graph of actions including Start and Finish
![Page 15: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/15.jpg)
Example
![Page 16: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/16.jpg)
Partially ordered plans
• Partially ordered collection of steps with– Start step has the initial state description as its effect– Finish step has the goal description as its precondition– causal links from outcome of one step to precondition of another– temporal ordering between pairs of steps
• Open condition = precondition of a step not yet causally linked
• plan is complete iff every precondition is achieved• precondition is achieved iff it is the effect of an earlier step
and no possibly intervening step undoes it (conflict)• plans cannot contain cycles
![Page 17: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/17.jpg)
![Page 18: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/18.jpg)
Define the Start State and the Goal State
![Page 19: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/19.jpg)
Define the Start State and the Goal State•Start
On(A,Table), On(B,Table), On(C,B), Clear(A), Clear(C)•End
•On(A,B), On(B,C), On(C,Table)
![Page 20: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/20.jpg)
Define the Actions
![Page 21: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/21.jpg)
![Page 22: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/22.jpg)
![Page 23: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/23.jpg)
Use either forward or backward search to build the plan for this problem.
![Page 24: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/24.jpg)
![Page 25: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/25.jpg)
![Page 26: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/26.jpg)
![Page 27: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/27.jpg)
![Page 28: Language for planning problems STRIPS: STanford Research Institute Problem Solver world described by logical conditions state as conjunction of positive](https://reader035.vdocuments.mx/reader035/viewer/2022062307/551a2826550346545e8b4720/html5/thumbnails/28.jpg)