Presentation is loading. Please wait.

Presentation is loading. Please wait.

Causal-link planning 1 Jim Blythe. 2 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning The planning problem Inputs: 1. A description of the world.

Similar presentations


Presentation on theme: "Causal-link planning 1 Jim Blythe. 2 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning The planning problem Inputs: 1. A description of the world."— Presentation transcript:

1 Causal-link planning 1 Jim Blythe

2 2 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning The planning problem Inputs: 1. A description of the world state 2. The goal behaviour 3. A set of actions Output: A sequence of actions that can be applied to the state, meeting the goal behaviour description

3 3 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Assumptions (until October..) Atomic time All effects are immediate Deterministic effects Omniscience Sole agent of change Goals of attainment

4 4 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Example: blocks world (Sussman anomaly) State I: (on-table A) (on C A) (on-table B) (clear B) (clear C) Goal: (on A B) (on B C) AB C A B C Initial: Goal:

5 5 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning STRIPS representation for actions: Move-C-from-A-to-Table: precondition: (and (on C A) (clear C)) effects: add (on-table C) delete (on C A) add (clear A) The explicit effects are the only changes to the state.

6 6 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Searching through world space Cast planning as a search problem Nodes are states, a solution is a path from the initial state to one satisfying the goal. A C BACBAC B A C B B A C C A B I G S1S2 S3 S4 S5

7 7 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Progression (forward search) ProgWS(world-state, goal-list, PossibleActions, path) If world-state satisfies all goals in goal-list, 1. Then return path. 2. Else Act = choose an action whose precondition is true in world-state a) If no such action exists b) Then fail c) Else return ProgWS( result(Act, world-state), goal-list, PossibleActions, concatenate(path, Act) )

8 8 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Trace of ProgWS on Sussman PW(I, ((on A B) (on B C)), (..), ()) PW(S1, Goals, PA, (move-C-from-A-to-table)) PW(S2, Goals, PA, (move-C-from-A-to-table, move-B-from-table-to-C)) PW(G, Goals, PA, (move-C-from-A-to-table, move-B-from-table-to-C, move-A-from-table-to-B)) Of course there are many more possible traces..

9 9 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Regression (backward search) RegWS(initial-state, current-goals, PossibleActions, path) 1. If initial-state satisfies all of current-goals 2. Then return path 3. Else Act = choose an action whose effect matches one of current-goals a. If no such action exists, or the effects of Act contradict some of current-goals, then fail b. G = (current-goals – goals-added-by(Act)) + preconds(Act) c. If G contains all of current-goals, then fail d. Return RegWS(initial-state, G, PossibleActions, concatenate(Act, path))

10 10 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Trace of RegWS on Sussman RW(I, ((on A B) (on B C)), PA, ()) RW(I, ((clear A) (on-table A) (clear B) (on B C)), PA, (move-A-from-table-to-B)) RW(I, ((clear A) (on-table A) (clear B) (clear C) (on-table B)), PA, (move-B-from-table-to-C, move-A-from-table-to-B)) RW(I, ((on-table A) (clear B) (clear C) (on-table B) (on C A)), PA, (move-C-from-A-to-table, move-B-from-table-to-C, move-A-from-table-to-B))

11 11 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Thinking about RegWS What would happen if we worked on (on B C) before (on A B)? Choice of which goal to work on matters!

12 12 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Comparing ProgWS and RegWS Both algorithms are  sound (they always return a valid plan)  complete (if a valid plan exists they will find one) Running time is where b = branching factor, n = number of “choose” operators

13 13 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Search through the space of plans Nodes are partial plans, links are plan refinement operations and a solution is a node (not a path). This can be powerful if the plan representation and refinements change the search space. POP creates partial-order plans following a “least commitment” principle.

14 14 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning P.O. plans in POP Plan = (A, O, L), where  A is the set of actions in the plan  O is a set of temporal orderings between actions  L is a set of causal links linking actions via a literal Causal link means that Ac has precondition Q that is established in the plan by Ap. move-a-from-b-to-table move-c-from-d-to-b Ap Ac Q (clear b)

15 15 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Threats to causal links Step At threatens link if: 1. At has (not Q) as an effect 2. At could come between Ap and Ac, i.e. is consistent What’s an example of an action that threatens the link example from the last slide? Ap Ac Q

16 16 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Setting up the planning problem For simplicity, represent initial state and goal with two special actions, A0 and Ainf. A0 has the initial state as its effects, and must be the first step in the plan. Ainf has the goals as its preconditions, and must be the last step in the plan.

17 17 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning POP algorithm POP((A, O, L), agenda, PossibleActions): 1. If agenda is empty, return (A, O, L) 2. Pick (Q, An) from agenda 3. Ad = choose an action that adds Q. a. If no such action exists, fail. b. Add the link Ad Ac to L and the ordering Ad < Ac to O c. If Ad is new, add it to A. 4. Remove (Q, An) from agenda. If Ad is new, for each of its preconditions P add (P, Ad) to agenda. 5. For every action At that threatens any link 1. Choose to add At < Ap or Ac < At to O. 2. If neither choice is consistent, fail. 6. POP((A, O, L), agenda, PossibleActions) Q Ap Ac Q

18 18 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Sussman example A0 (on C A)(on-table A)(on-table B)(clear C)(clear B) Ainf (on A B)(on B C)

19 19 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Work on open precondition (on B C) A0 (on C A)(on-table A)(on-table B)(clear C)(clear B) Ainf (on A B)(on B C) A1: move B from Table to C (on B C)-(on-table B)-(clear C) (clear B)(clear C)(on-table B)

20 20 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Work on open precondition (on A B) A0 (on C A)(on-table A)(on-table B)(clear C)(clear B) Ainf (on A B)(on B C) A1: move B from Table to C (on B C)-(on-table B)-(clear C) (clear B)(clear C)(on-table B) A2: move A from Table to B (clear A)(clear B)(on-table A) (on A B)-(on-table A)-(clear B)

21 21 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Work on open precondition (on-table A) A0 (on C A)(on-table A)(on-table B)(clear C)(clear B) Ainf (on A B)(on B C) A1: move B from Table to C (on B C)-(on-table B)-(clear C) (clear B)(clear C)(on-table B) A2: move A from Table to B (clear A)(clear B)(on-table A) (on A B)-(on-table A)-(clear B) A3: move C from A to Table (clear C)(on C A) > -(on C A)(on-table C)(clear A)

22 22 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Analysis POP can be much faster than the state-space planners because it doesn’t need to backtrack over goal orderings (so less branching is required). Although it is more expensive per node, and makes more choices than RegWS, the reduction in branching size often more than makes up. i.e., n is larger but b is smaller! (Later we will see faster planners that look more like state-space planners, so your mileage may vary.)

23 23 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning More analysis Does POP make the least possible amount of commitment? How (or how not)? and Why (or why not)?

24 24 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning Still more analysis POP makes less commitment to step ordering than ProgWS and RegWS, but the same commitment to which step should achieve a precondition (linking). Some planners make firmer ordering commitments but less linking commitment. Which works best depends on the planning domain and the population of planning problems that we see. (eg Veloso and Blythe, AIPS 94) This observation led some researchers to investigate planners that have a “flexible commitment strategy”.


Download ppt "Causal-link planning 1 Jim Blythe. 2 USC INFORMATION SCIENCES INSTITUTE Causal Link Planning The planning problem Inputs: 1. A description of the world."

Similar presentations


Ads by Google