Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Planning with Loops Hector J. Levesque Dept. of Computer Science University of Toronto Presented by Lihui Hu.

Similar presentations


Presentation on theme: "1 Planning with Loops Hector J. Levesque Dept. of Computer Science University of Toronto Presented by Lihui Hu."— Presentation transcript:

1 1 Planning with Loops Hector J. Levesque Dept. of Computer Science University of Toronto Presented by Lihui Hu

2 2 1.Introduction  sequential planning  conditional planning  iterative planning

3 3 1.1 Difficulty of Iterative Planning  theorem-proving approach  plans are programs, planning is synthesis of programs with loops. Stephan and Biundo say “Plan generation on this level is an interactive process with non- trivial inferences that in our opinion, which is shared by other authors as well [citations omitted], cannot be carried out in a fully automatic way.”

4 4 1.2 Contribution  Separate the generation of plan from the verification  Generate small plans with loops

5 5 1.3 An example  Goals: chop down a tree; put away the axe  Actions: chop(pre:tree-up;axe-available ) store(pre:axe-available )

6 6 1.3.1 Plans -- Seuquential  No additional information  Suppose we know the tree will go down if it is hit 3 times sequential plan: chop; chop ; chop ; store

7 7 1.3.1 Plans – Conditional  the tree will go down if it is hit at most 2 times conditional plan: CASE look OF -down: store -up: chop ; CASE look OF -down: store -up: chop ; store ENDC

8 8 1.3.1 Plans -- Loops  the tree will eventually go down if it is hit repeatedly iterative plan: LOOP CASE look OF -down: EXIT -up: chop ; NEXT ENDC ENDL ; store

9 9 1.4 Robot Programs  nil  seq(A; P) A: primitive action; P: robot program  case(A; [if(R1; P1); : : : ; if(Rk; Pk)])  if P and Q are robot programs, and B is the result of replacing in P some of the occurrences of nil by exit and the rest by next; then loop(B;Q) is a robot program, executed by repeatedly executing the body B until the execution terminates with exit (rather than next), and then going on by executing the continuation Q.  Planning: given a goal, find a robot program that can achieve it.

10 10 1.5.1 The Planning Approach  planning parameter (1) its value is not known or even bounded at plan time, and (2) no loops would be required to achieve the goal if its value were known.

11 11 1.5.2 The Planning Approach -- Continue  F is a planning parameter  The user will provide a constant N1 (called the generating bound) and we generate a plan (possibly containing some number of loops) that is provably correct under the assumption that F ≤ N1;  The user will provide a second larger constant N2 (called the testing bound) and we test that the plan generated in the first step is also provably correct under the assumption that F ≤ N2:

12 12 2.1 The Planner  problem specification  parameter F, N1 and N2  we generate a plan that is correct for F ≤ N1  we test the plan to see if it is correct for F ≤ N2  KPLANNER, is written in Prolog  http://www.cs.toronto.edu/cogrobo

13 13 2.2 Testing Plans  A plan P achieves a goal G starting in history H if

14 14 2.2 Testing Plans -- Continue  Unwinding a loop LOOP CASE look OF CASE look OF -down: EXIT -down: EXIT -up: chop; -up: chop ; LOOP NEXT CASE look OF ENDC … ENDL ENDC

15 15 2.3 Generating Plans

16 16 2.3 Generating Plans -- Continue

17 17 2.4 Generating loops  F ≤ 1

18 18 3 Planner in Action  prim_fluent(f)  prim_action(a; [r1; : : : ; rn])  poss(a; c)  init(f; v)  causes(a; r; f; v; c)  settles(a; r; f; v; c)  rejects(a; r; f; v; c)  parm_fluent(f)  init_parm(w; f; v)

19 19 3.1 Tree Chopping Example

20 20 3.1 Tree Chopping Example -- Continue

21 21 3.1 Tree Chopping Example -- Continue  KPLANNER finds tree-chopping plan with loop in.11 seconds.

22 22 3.2 Counting Example  We have two accumulators and some unknown integer input k; where k > 0. The primitive actions are: incr_acc(n); increment accumulator n (both start at 0); test_acc(1); sense if the first accumulator has the same value as the input. The goal: To make the second accumulator have the value 2k-1.

23 23 3.2 Problem Specification

24 24 3.2 The Plan

25 25 3.3 Another Example  Searching an unbounded binary tree for a target node  A plan is found after 0.07 seconds.

26 26 4.1 Discussion  As far as we know, no planner based on fully automated theorem-proving can generate the three plans.

27 27 4.2 Limitation  KPLANNER does not scale at all well as the search space grows, even for seemingly easy problems.  Consider the problem of getting some good eggs into a bowl.For just one egg:

28 28 4.2 Limitation -- Continue  Small but difficult problems

29 29 5.1 Towards a Theory  W(k; σ) stands for the proposition that if we start in any initial state where F = k; we perform the action sequence σ; we end up in a goal state.

30 30 5.1 Towards a Theory-- Continue  Define of simple problem

31 31 5.3 Theory  Theorem 1 Suppose we have a planning problem that is simple with respect to action A; and a robot program P that contains N occurrences of A. If P is a correct plan for all values of F ≤ N + 2, then P is correct for all values of F.

32 32 5.3 Theory -- Continue  Suggest a variant of KPlanner  Compute a testing bound  Apply to simple planning problems only

33 33 6. Conclusion  new way of generating a plan with loops that is not tied to proving a theorem about its correctness.  The method involves generating a plan that is correct for a given bound, determining if the plan is the unwinding of a plan with loops, and testing if another unwinding of the plan with loops would also be correct for a larger bound.  A theorem showing that this method of planning is correct for a certain class of simple planning problems.


Download ppt "1 Planning with Loops Hector J. Levesque Dept. of Computer Science University of Toronto Presented by Lihui Hu."

Similar presentations


Ads by Google