Presentation is loading. Please wait.

Presentation is loading. Please wait.

An Introduction to Planning Graph

Similar presentations


Presentation on theme: "An Introduction to Planning Graph"— Presentation transcript:

1 An Introduction to Planning Graph
2019/6/2 An Introduction to Planning Graph Chang, Han-Wen A. Blum and M. Furst, "Fast Planning Through Planning Graph Analysis", Artificial Intelligence, 90: (1997) AIMA textbook, Chap. 11, Section 11.4 March 29, 2007

2 2019/6/2 Planning Problem Planning is to come up with a sequence of actions that will achieve a goal from the initial state.

3 Representation states: conjunction of positive literals actions:
ground and function-free first-order literals closed-world assumption actions: action name and parameter list precondition add-effect delete-effect no new object created

4 Rocket Example Cargo (A); Cargo (B); Rocket (R); Place (L);
Place (P); R A B move (Rocket ?r, Place ?from, Place ?to) Precond: At (?r, ?from) & HasFuel (?r) Add: At (?r, ?to) Delete: At (?r, ?from) & HasFuel (?r) load (Rocket ?r, Place ?p, Cargo ?c) Precond: At (?r, ?p) & At (?c, ?p) Add: In (?c, ?r) Delete: At (?c, ?p) unload (Rocket ?r, Place ?p, Cargo ?c) Precond: At (?r, ?p) & In (?c, ?r) Add: At (?c, ?p) Delete: In (?c, ?r) Place L Init: At (A, L) & At (B, L) & At (R, L) & HasFuel (R) B A Goal: At (A, P) & At (B, P) Place P

5 Motivation Search performance depends on branching factor, and constraints reduce the search space. Independent actions can be done in any order.

6 Basic Idea Construct a graph that encodes constraints on possible plans Use this “planning graph” to constrain search for a valid plan: If valid plan exists, it is a subgraph of the planning graph

7 Planning Graph Directed and Leveled Nodes Edges Proposition nodes
Action nodes Edges Precondition edges: from propositions to actions Add edges: from actions to propositions Del edges: from actions to propositions No-op edges: from propositions to propositions

8 Graph Levels Alternate Levels
Proposition level: all propositions that could be true at time step t Action level: all actions that could have their preconditions satisfied at time step t

9 Extending Planning Graph
Load R, L, B Load R, L, A At B, L At B, L At A, L At A, L In B, R In A, R At R, L At R, L Fuel R Fuel R At R, P Move R, L, P

10 Rocket Example Precondition edges Add-effect edges Delete-effect edges
2019/6/2 Rocket Example Add-effect edges Delete-effect edges Load R, L, B Load R, L, A Move R, L, P Unload R, L, A Unload R, L, B Actions Time 1 Load R, L, B Load R, L, A Move R, L, P Unload R, L, A Unload R, L, B Unload R, P, A Unload R, P, B Actions Time 2 No-op edges Load R, L, B Load R, L, A Move R, L, P Actions Time 0 At B, L At A, L At R, L Fuel R Propositions Time 0 At B, L At A, L At R, L Fuel R At R, P In B, R In A, R Propositions Time 1 At B, L At A, L At R, L Fuel R At R, P In B, R In A, R Propositions Time 2 At B, L At A, L At R, L Fuel R At R, P In B, R In A, R At B, P At A, P Propositions Time 3

11 Mutual Exclusions (mutex)
Inconsistent Effects Interference Competing Needs Inconsistent Support

12 Inconsistent Effects (mutex)
The action deletes an add-effect of the other. Load(R, L, A) deletes At(L, A) which is an add-effect of Unload(R, L, A), so the two actions are mutex.

13 Interference (mutex) The action deletes a precondition of the other.
Move(R, L, P) deletes At(R, L) which is an precondition of Load(R, L, A), so the two actions are mutex.

14 Competing Needs (mutex)
If there is a precondition p of action a and a precondition q of action b that are mutex in the previous proposition level, the two actions are mutex. The precondition At(A, L) of action Load(R, A, L) and the precondition At(A, P) of action Load(R, A, P) are mutex, so the two actions are mutex.

15 Inconsistent Support (mutex)
If each action a having an add-effect of proposition p is marked as exclusive of each action b having an add-effect of proposition q, the two propositions are mutex. The proposition At(A, L) and the proposition In(A, R) are mutex at time step t if the are mutex at time step t-1, and any action creates At(A, L) are mutex with any action creates In(A, R).

16 Spare Tire Example (AIMA)

17 GraphPlan Algorithm function GRAPHPLAN(problem) return solution or failure graph  INITIAL-PLANNING-GRAPH(problem) goals  GOALS[problem] loop do if goals all non-mutex in last level of graph then do solution  EXTRACT-SOLUTION(graph, goals, LENGTH(graph)) if solution  failure then return solution else if NO-SOLUTION-POSSIBLE(graph) then return failure graph  EXPAND-GRAPH(graph, problem)

18 Plan Extraction Valid plan Backward chaining
goals are satisfied Non-mutex actions Backward chaining Achieve goals level by level Non-mutex actions at level k Preconditions as the goals for level k-1 No Non-mutex action found  backtrack

19 Features Literals increase monotonically
Actions increase monotonically Mutexes decrease monotonically Eventually level off two consecutive levels are identical

20 Termination planning graph eventually leveled-off
If the graph is leveled-off and some literals of the goal do not appear or are marked as mutex in the latest proposition level, the problem is unsolvable.

21 Advanced Test Let Sti be the collection of unachievable (sub)goal-sets stored for level i after trial at stage t If graph leveled off at level n and St-1n = Stn at a stage t > n, then output “No Plan Exists”

22 Remarks on Planning Graph
2019/6/2 Remarks on Planning Graph Polynomial space / graph creation time p: |initial state| n: #object m: #operator t: #level l: max( #add-list ) k: max( #operator parameter ) #Max nodes action level: O(mnk) #Max nodes proposition level: O(p+mlnk)

23 More Remarks Sound & complete Partially-ordered planning
Independent actions in the same level can be executed in any order

24 Pro and Con Cases with better performance
pairwise mutex relations capture important constraints parallel actions reduce the depth of the graph

25 Thanks

26 Eat Cake Example (AIMA)
similar to drink water example

27 Spare Tire Example (AIMA)

28 Rocket Example Cargo (A); Cargo (B); Rocket (R); Place (L);
Place (P); R A B move (Rocket ?r, Place ?from, Place ?to) Precond: At (?r, ?from) & HasFuel (?r) Add: At (?r, ?to) Delete: At (?r, ?from) & HasFuel (?r) load (Rocket ?r, Place ?p, Cargo ?c) Precond: At (?r, ?p) & At (?c, ?p) Add: In (?c, ?r) Delete: At (?c, ?p) unload (Rocket ?r, Place ?p, Cargo ?c) Precond: At (?r, ?p) & In (?c, ?r) Add: At (?c, ?p) Delete: In (?c, ?r) Place L Init: At (A, L) & At (B, L) & At (R, L) & HasFuel (R) B A Goal: At (A, P) & At (B, P) Place P

29 Rocket Example Precondition edges Add-effect edges Delete-effect edges
2019/6/2 Rocket Example Add-effect edges Delete-effect edges Load R, L, B Load R, L, A Move R, L, P Unload R, L, A Unload R, L, B Actions Time 1 Load R, L, B Load R, L, A Move R, L, P Unload R, L, A Unload R, L, B Unload R, P, A Unload R, P, B Actions Time 2 No-op edges Load R, L, B Load R, L, A Move R, L, P Actions Time 0 At B, L At A, L At R, L Fuel R Propositions Time 0 At B, L At A, L At R, L Fuel R At R, P In B, R In A, R Propositions Time 1 At B, L At A, L At R, L Fuel R At R, P In B, R In A, R Propositions Time 2 At B, L At A, L At R, L Fuel R At R, P In B, R In A, R At B, P At A, P Propositions Time 3

30 Extending Planning Graph
Load R, L, B Load R, L, A At B, L At B, L At A, L At A, L In B, R In A, R At R, L At R, L Fuel R Fuel R At R, P Move R, L, P

31 Inconsistent Effects (mutex)
The action deletes an add-effect of the other. Load(R, L, A) deletes At(L, A) which is an add-effect of Unload(R, L, A), so the two actions are mutex.

32 Interference (mutex) The action deletes a precondition of the other.
Move(R, L, P) deletes At(R, L) which is an precondition of Load(R, L, A), so the two actions are mutex.

33 Competing Needs (mutex)
If there is a precondition p of action a and a precondition q of action b that are mutex in the previous proposition level, the two actions are mutex. The precondition At(A, L) of action Load(R, A, L) and the precondition At(A, P) of action Load(R, A, P) are mutex, so the two actions are mutex.

34 Inconsistent Support (mutex)
If each action a having an add-effect of proposition p is marked as exclusive of each action b having an add-effect of proposition q, the two propositions are mutex. The proposition At(A, L) and the proposition In(A, R) are mutex at time step t if the are mutex at time step t-1, and any action creates At(A, L) are mutex with any action creates In(A, R).

35 Drink Water Example literals: Initial Condition: Goal: EmptyCup
FullCup Thirsty NotThirsty Initial Condition: FullCup & Thirsty Goal: NotThirsty & FullCup

36 Drink Water Example -- Actions
FillCup Preconds: EmptyCup Add-effs: FullCup Del-effs: EmptyCup EmptyCupAction Preconds: FullCup Add-effs: EmptyCup Del-effs: FullCup Drink Preconds: FullCup & Thirsty Add-effs: EmptyCup & NotThirsty Del-effs:

37 Drink Water Planning Graph
EmptyCupAction EmptyCupAction FillCup EmptyCup EmptyCup FullCup FullCup FullCup Thirsty Thirsty Thirsty NotThirsty NotThirsty Drink Drink proposition time 1 action time 1 proposition time 2 action time 2 proposition time 3

38 Inconsistent Effects (mutex)
The action deletes an add-effect of the other. Drink deletes Full_Cup which is an add-effect of Fill_Cup, so the two actions are mutex.

39 Interference (mutex) The action deletes a precondition of the other.
EmptyCupAction deletes FullCup which is an precondition of Drink, so the two actions are mutex.

40 Competing Needs (mutex)
If there is a precondition p of action a and a precondition q of action b that are mutex in the previous proposition level, the two actions are mutex. The precondition EmptyCup of action FillCup and the precondition FullCup of action Drink are mutex, so the two actions are mutex.

41 Inconsistent Support (mutex)
If each action a having an add-effect of proposition p is marked as exclusive of each action b having an add-effect of proposition q, the two propositions are mutex. The proposition EmptyCup and the proposition FullCup are mutex at time step t if the are mutex at time step t-1, and any action creates EmptyCup are mutex with any action creates FullCup.


Download ppt "An Introduction to Planning Graph"

Similar presentations


Ads by Google