Presentation is loading. Please wait.

Presentation is loading. Please wait.

L9. STRIPS Examples Recursive STRIPS Block world

Similar presentations


Presentation on theme: "L9. STRIPS Examples Recursive STRIPS Block world"— Presentation transcript:

1 L9. STRIPS Examples Recursive STRIPS Block world
Partial-order planning

2 STRIPS planning STRIPS uses logical formulas to represent the states
Precondition 前提条件 STRIPS uses logical formulas to represent the states S0, G, P, etc: Description of operator f: Logic formula 論理式 description 記述

3 Example1: The move operator
G S0 f(P)->G S0->P x/B, y/A, z/Fl x/B, y/A, z/Fl On(x,y) Clear(x) Clear(z) f: move(x,y, z) add: On(x,z), Clear(y) del: On(x,y), Clear(z) On(x,z) Clear(x) Clear(y) P: f(P):

4 Example2: robot operators
Consider a robot able to go(x,y) pickup(x) putdown(x) pre: AtR(x) del: AtR(x) add: AtR(y) eff: AtR(x)AtR(y) pre: AtR(x), Empty-H del: AtR(x), Empty-H add: Holding(x) eff: Holding(x) pre: Holding(x) del: Holding(x) add: AtR(x) eff: Holding(x)AtR(x)

5 Holding(C) Holding(C)
Example2: problem S0: AtR(A) G0: AtR(B) Holding(C) Holding(C) The robot goes from room A to room B with holding C Difference: AtR(B) in G0 but not in S0. Relevant operator instance: go(x,B) if (y/B) (schema go(x, y)) P: AtR(x) S0 -> P: x/A f: go(x, y) f(P)->G0: AtR(B) (x/A, y/B) relevant 関連の instance 実例 Achieve preconds of go(x, B) [AtR(x)] Apply go(x, B) Achieve G0 When the robot picks up x, it is no longer AtR(x) so it can’t go(x, y)! It is necessary to repair the operators of a robot in page 4.

6 Example2: revised robot operators (Add object’s location sentence)
修正する go(x,y) pickup(x) putdown(x) “go from x to y” pre: AtR(x) del: AtR(x) add: AtR(y) eff: AtR(x)AtR(y) “pick up x at y” pre: At(x, y), AtR(y,) Empty-H del: At(x,y), Empty-H add: Holding(x) At(x, y) Object, x, is at the room, y. eff: Holding(x) “put down x at y” pre: Holding(x), AtR(y) del: Holding(x) add: At(x,y) eff: Holding(x)At(x,y)

7 Example2: Problem- get the slipper
S0: AtR(A) G0: AtR(A) Empty-H Holding(slipper1) At(slipper1, B) Schema 概要な式 An operator is usually written in the scheme form Difference: Holding(slipper1) in G0 but nor in S0. Relevant operator instance: pickup(slipper1) (schema pickup(x), x/slipper1) Pre: At(slipper1, y), AtR(y), Empty-H Pre: (y/A) ->Pre’: At(slipper1, A), AtR(A), Empty-H But At(slipper1, A) is not in S0! To reduce the difference between: At(slipper1, A) and At(slipper1, B) Relevant operator instance: go(x, B) Pre: AtR(x) Del: AtR(x) Add: AtR(y) S0 -> G2: (x/A) f(G2) -> S3: go(x, y) S3->G1: (y/B) reduce 減少させる

8 Example2: Tree representation
表示 S0: AtR(A) Empty-H At(slipper1, B) S0->G0 S0->G1 AtR(y) Empty-H At(slipper1, y) G1->S1 pickup(slipper1) S1->G0 x=B Pick up slipper1 at B S2: AtR(B) Holding(slipper1) S3->G4 AtR(x) G4->S4 go(x,A) S4->G0 y=B x=A G0: AtR(A) Holding(slipper1) S0->G2 AtR(x) G2->S2 go(x,B) S2->G1 G1: AtR(B) Empty-H At(slipper1, B)

9 Recursive STRIPS Achieve one sub-goal at a time. Achieve a new conjunct without ever violating already achieved conjuncts or maybe temporarily violating previous sub-goals. Each sub-goal is achieved via a matched rule, then its preconditions are sub-goals and so on. conjunct 連結した violate 違反する

10 Plan with Run-time conditionals
We can allow disjunction in state description: EX: On(B,A) V On(B,C) For some operators may be applicable just with one of these disjunction that can be determined during run-time. Run-time conditionals: If On(B,A) apply oper1 If On(B,C) apply oper2. Plan is a tree whose branching nodes are states with unknown information. disjunction 分裂 applicable 適用[応用]できる determine 決定

11 Block world F1 F2 F3 Start state S0 Goal state G0  delete list
S0: On(C, Fl) On(B, C) On(A, B) Clear(A) Clear(F2) Clear(F3) G0: On(C, F3) On(B, C) On(A, B) Clear(A) Clear(F1) Clear(F2) delete list add list Operators: Move(x, y, z) “Move x from y to z”

12 S0---------->G’0 S0---------->G1 G1---->S1 S1-->G0
Sub-goal: to achieve one of the conjuncts, G’0 S0: On(C, Fl) On(B, C) On(A, B) Clear(A) Clear(F2) Clear(F3) S >G’0 diff: On(C, F3) G’0: On(C, F3) G0: On(C, F3) On(B, C) On(A, B) Clear(A) Clear(F1) Clear(F2) G’0: On(C, F3) On(B, A) On(A, F2) Clear(B) Clear(C) Clear(F1) y/F1 S >G1 pre: On(C, y), Clear(F3), Clear(C) G1---->S1 f: Move(C, y, F3) S1-->G0 y/F1 x1/B, z1/A S >G2 pre: On(x1, C), Clear(z1), Clear(x1) G2---->S2 f: Move(x1, C, z1) S2-->G1 x2/A, z2/F2 x1/B, z1/A S >G3 pre: On(x2, B), Clear(F2), Clear(x2) G3---->S3 f: Move(x2, B, z2) S3-->G2

13 S0---------->G’’0 S0---------->G1 G1---->S2 S2-->G0
Sub-goal: to achieve one of the conjuncts, G’’0 G0: On(C, F3) On(B, C) On(A, B) Clear(A) Clear(F1) Clear(F2) G’’0: On(C, F3) On(B, C) On(A, F2) Clear(B) Clear(A) Clear(F1) S0=G’0: On(C, F3) On(B, A) On(A, F2) Clear(B) Clear(C) Clear(F1) S >G’’0 diff: On(B, C) G’’0: On(B, C) y/A S >G1 pre: On(B, y), Clear(C), Clear(B) G1---->S2 f: Move(B, y, C) S2-->G0 Sub-goal: to achieve one of the conjuncts, G’’’0 G0: On(C, F3) On(B, C) On(A, B) Clear(A) Clear(F1) Clear(F2) G’’’0: On(C, F3) On(B, C) On(A, B) Clear(A) Clear(F1) Clear(F2) S0=G’’0: On(C, F3) On(B, C) On(A, F2) Clear(B) Clear(A) Clear(F1) S >G’’’0 diff: On(A, B) G’’’0: On(A, B) = y/F2 S >G1 pre: On(A, y), Clear(A), Clear(B) G1---->S2 f: Move(A, y, B) S2-->G0

14 A sequence plan structure
NIL finish On(A,B) Clear(F2) On(B,C) Clear(A) 5 4 Move(A,B,F2) Move(B,A,C) On(A,F2) Clear(B) On(B,A) Clear(C) On(C,F3) Clear(F1) 1 2 3 Move(A,B,F2) Move(B,C,A) Move(C,F1,F3) On(A,B) Clear(F2) On(B,C) Clear(A) On(C,F1) Clear(F3) start T Plan sequence: Move(A,B,F2), Move(B,C,A),Move(C,F1,F3), Move(B,A,C), Move(A,F2,B)

15 Partially ordered plans
部分的に ordered 順序に整理した With respect to …に関して To block world problem, 1->2->3->4->5 are totally ordered plans. Let us tale another example for the shoe-and-socks problem below An total order plan Partial order plan Start Start Start Right Sock Left Sock RightSock LeftShoeOn, RightShoeOn Right Shoe End LeftSockOn RightSockOn Left Shoe RightShoe Left Sock In a partial order plan, some steps are ordered with respect to each other and other steps are unordered. Left Shoe LeftShoeOn RightShoeOn Finish Finish

16 ? Exercises Ex. (optional)
Write a recursive STRIPS algorithm for block world problem in Pseudo code.


Download ppt "L9. STRIPS Examples Recursive STRIPS Block world"

Similar presentations


Ads by Google