Download presentation
Presentation is loading. Please wait.
Published byIsabel Jefferson Modified over 9 years ago
1
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 1 Chapter 6 Planning-Graph Techniques Dana S. Nau CMSC 722, AI Planning University of Maryland, Fall 2004 Lecture slides for Automated Planning: Theory and Practice
2
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 2 Motivation l A big source of inefficiency in search algorithms is the branching factor u the number of children of each node l e.g., a backward search may try lots of actions that can’t be reached from the initial state l One way to reduce branching factor: l First create a relaxed problem u Remove some restrictions of the original problem »Want the relaxed problem to be easy to solve (polynomial time) u The solutions to the relaxed problem will include all solutions to the original problem l Then do a modified version of the original search u Restrict its search space to include only those actions that occur in solutions to the relaxed problem g0g0 g1g1 g2g2 g3g3 a1a1 a2a2 a3a3 g4g4 g5g5 s0s0 a4a4 a5a5
3
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 3 Outline l The Graphplan algorithm l Constructing planning graphs u example l Mutual exclusion u example (continued) l Doing solution extraction u example (continued) l Discussion
4
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 4 Graphplan procedure Graphplan: l for k = 0, 1, 2, … u Graph expansion: »create a “planning graph” that contains k “levels” u Check whether the planning graph satisfies a necessary (but insufficient) condition for plan existence u If it does, then »do solution extraction: backward search, modified to consider only the actions in the planning graph if we find a solution, then return it possible literals in state s i possible actions in state s i relaxed problem
5
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 5 state-level i effects Maintenance actions: propagate literals to the next level. These represent what happens if no action in the final plan affects the literal. state-level i-1 state-level 0 (the literals true in s 0 ) The Planning Graph l Alternating layers of ground literals and actions u All actions that might possibly occur at each time step u All of the literals asserted by those actions action-level i preconditions
6
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 6 Example »due to Dan Weld (U. of Washington) l Suppose you want to prepare dinner as a surprise for your sweetheart (who is asleep) s 0 = {garbage, cleanHands, quiet} g = {dinner, present, garbage} ActionPreconditions Effects cook() cleanHandsdinner wrap() quietpresent carry() none garbage, cleanHands dolly() none garbage, quiet Also have the maintenance actions: one for each literal
7
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 7 Example (continued) state-level 0: {all atoms in s 0 } U {negations of all atoms not in s 0 } l action-level 1: {all actions whose prconditions are satisfied in s 0 } l state-level 1: {all effects of all of the actions in action-level 1} ActionPreconditionsEffects cook() cleanHandsdinner wrap() quietpresent carry() none garbage, cleanHands dolly() none garbage, quiet Also have the maintenance actions dinner present dinner present state-level 0state-level 1action-level 1
8
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 8 Mutual Exclusion l Two actions at the same action-level are mutex if u Inconsistent effects: an effect of one negates an effect of the other u Interference: one deletes a precondition of the other u Competing needs: they have mutually exclusive preconditions l Otherwise they don’t interfere with each other u Both may appear in a solution plan l Two literals at the same state-level are mutex if u Inconsistent support: one is the negation of the other, or all ways of achieving them are pairwise mutex
9
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 9 Example (continued) l Augment the graph to indicate mutexes l carry is mutex with the maintenance action for garbage (inconsistent effects) l dolly is mutex with wrap u interference l ~quiet is mutex with present u inconsistent support l each of cook and wrap is mutex with a maintenance operation ActionPreconditionsEffects cook() cleanHandsdinner wrap() quietpresent carry() none garbage, cleanHands dolly() none garbage, quiet Also have the maintenance actions dinner present dinner present state-level 0state-level 1action-level 1
10
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 10 dinner present dinner present Example (continued) l Check to see whether there’s a possible plan l Recall that the goal is { garbage, dinner, present} l Note that u All are prossible in s 1 u None are mutex with each other l Thus, there’s a chance that a plan exists l Try to find it u Solution extraction state-level 0state-level 1action-level 1
11
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 11 Solution Extraction procedure Solution-extraction(g,j) if j=0 then return the solution for each literal l in g nondeterministically choose an action to use in state s j–1 to achieve l if any pair of chosen actions are mutex then backtrack g’ := {the preconditions of the chosen actions} Solution-extraction(g’, j–1) end Solution-extraction The level of the state s j The set of goals we are trying to achieve state- level i-1 action- level i state- level i A real action or a maintenance action
12
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 12 Example (continued) l Two sets of actions for the goals at state-level 1 l Neither works: both sets contain actions that are mutex dinner present dinner present state-level 0state-level 1action-level 1
13
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 13 Recall what the algorithm does procedure Graphplan: l for k = 0, 1, 2, … u Graph expansion: »create a “planning graph” that contains k “levels” u Check whether the planning graph satisfies a necessary (but insufficient) condition for plan existence u If it does, then »do solution extraction: backward search, modified to consider only the actions in the planning graph if we find a solution, then return it
14
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 14 Example (continued) l Go back and do more graph expansion l Generate another action-level and another state-level dinner present dinner present dinner present state-level 0state-level 1action-level 1state-level 2action-level 2
15
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 15 Example (continued) l Solution extraction l Twelve combinations at level 4 Three ways to achieve garb u Two ways to achieve dinner u Two ways to achieve present dinner present dinner present dinner present state-level 0state-level 1action-level 1state-level 2action-level 2
16
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 16 Example (continued) l Several of the combinations look OK at level 2 l Here’s one of them dinner present dinner present dinner present state-level 0state-level 1action-level 1state-level 2action-level 2
17
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 17 Example (continued) l Call Solution- Extraction recursively at level 2 l It succeeds l Solution whose parallel length is 2 dinner present dinner present dinner present state-level 0state-level 1action-level 1state-level 2action-level 2
18
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 18 Comparison with PSP l Unlike PSP, Graphplan creates ground instances of everything u Many of them may be irrelevant l But the backward-search part of Graphplan—which is the hard part—will only look at the actions in the planning graph u smaller search space than PSP; thus faster
19
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License: http://creativecommons.org/licenses/by-nc-sa/2.0/ 19 History l Before Graphplan came out, most planning researchers were working on PSP-like planners u POP, SNLP, UCPOP, etc. l Graphplan caused a sensation because it was so much faster l Many subsequent planning systems have used ideas from it u IPP, STAN, GraphHTN, SGP, Blackbox, Medic, TGP, LPG l Several of them are much faster than the original Graphplan
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.