planning graphs and graphplan
play

Planning Graphs and Graphplan Section 10.3 Nilufer Onder - PowerPoint PPT Presentation

Planning Graphs and Graphplan Section 10.3 Nilufer Onder Department of Computer Science Michigan Technological University Sec. 10.3 p.1/22 Outline The planning graph Planning graph example The graphplan algorithm Using planning


  1. Planning Graphs and Graphplan Section 10.3 —– Nilufer Onder Department of Computer Science Michigan Technological University Sec. 10.3 – p.1/22

  2. Outline The planning graph Planning graph example The graphplan algorithm Using planning graphs for heuristics Sec. 10.3 – p.2/22

  3. A planning graph A layered graph Two kinds of layers alternate literal (proposition) (shown with circles) action (shown with squares) Every two layers corresponds to a discrete time No variables as in action schemas Sec. 10.3 – p.3/22

  4. A planning graph The first layer is a literal layer which shows all the literals that are true in the initial layer Every action has a link from each of its preconditions and a link to each of its effects. Straight lines between to literals at consecutive literal levels denote NoOp Sec. 10.3 – p.4/22

  5. A planning graph . . . . . . Sec. 10.3 – p.5/22

  6. A planning graph The red lines show mutex relationships Those are the literals and actions that are mutually exclusive, i.e., cannot appear at the same time Sec. 10.3 – p.6/22

  7. A planning graph . . . . . . Sec. 10.3 – p.7/22

  8. Mutex relationships for actions Inconsistent effects : one action negates the effect of the other Sec. 10.3 – p.8/22

  9. Mutex relationships for actions Interference : one of the effects of one action is the negation of a precondition of the other Sec. 10.3 – p.9/22

  10. Mutex relationships for actions Competing needs : one of the preconditions of one action is mutually exclusive with a precondition of another Sec. 10.3 – p.10/22

  11. Mutex relationships for literals One is the negation of the other Inconsistent support : all ways of achieving two literals is mutually exclusive Sec. 10.3 – p.11/22

  12. Example Initial conditions: garbage, cleanhands, quiet Goal: dinner, present, ˜garbage Operators: Cook: pre: cleanhands eff: dinner Wrap: pre: quiet eff: present Carry: pre: eff: ˜garbage, ˜cleanhands Dolly: pre: eff: ˜garbage, ˜quiet Sec. 10.3 – p.12/22

  13. Example: graph expanded to level S 1 S0 A0 S1 garb garb carry ~garb dolly cleanh cleanh ~cleanh cook quiet quiet wrap ~quiet dinner present Sec. 10.3 – p.13/22

  14. Solution extraction (first attempt) At level S 1 , all the goal conditions are present, can look for a solution There are two ways to satisfy dinner, present, ˜garbage: {carry; cook; wrap} {dolly; cook; wrap} carry is mutex with cook dolly is mutex with wrap Solution extraction fails, need to expand the graph Sec. 10.3 – p.14/22

  15. Example: graph expanded to level S 2 S0 A0 S1 A1 S2 garb garb garb carry carry ~garb ~garb dolly dolly cleanh cleanh cleanh ~cleanh ~cleanh cook cook quiet quiet quiet wrap wrap ~quiet ~quiet dinner dinner present present Sec. 10.3 – p.15/22

  16. Solution extraction (second attempt) At level S 2 , all the goal conditions are still present. In fact, they do not go away once they appear. Notice that there are fewer mutex relationships at level S 2 There are three ways to satisfy ˜garbage: carry, dolly, noop There are two ways to satisfy present: wrap, noop There are two ways to satisfy dinner: cook, noop So, look for at all 3 × 2 × 2 = 12 combinations Sec. 10.3 – p.16/22

  17. Solution extraction (second attempt) Support ˜garbage with carry, dinner with noop, and present with wrap This is a consistent set because none are mutually exclusive The subgoals from level A 1 are dinner (precondition of noop), quiet (precondition of wrap) There are only two subgoals because dolly and carry do not have preconditions Choose cook to support dinner, and noop for quiet. These two actions are not mutex. If there are multiple actions at a level, they can be executed in parallel. Sec. 10.3 – p.17/22

  18. The GRAPHPLAN algorithm function G RAPH P LAN ( problem ) returns a solution, or failure graph ← I NITIAL -P LANNING -G RAPH ( problem ) goals ← C ONJUNCTS [ problem. GOAL ] nogoods ← an empty hash table for tl = 0 to ∞ do if goals all non-mutex in last level of graph then solution ← E XTRACT -S OLUTION ( graph, goals, N UM L EVELS ( graph ), nogoods ) if solution � = failure then return solution if graph and nogoods have both leveled off then return failure graph ← E XPAND -G RAPH ( graph, problem ) Sec. 10.3 – p.18/22

  19. Properties of planning graphs A literal that does not appear in the final level of the graph cannot be achieved by any plan. The level cost of a goal literal is the first level it appears, e.g., 0 for cleanhands and 1 for dinner. Level cost is an admissible heuristic but might undercount: it counts the number of levels, whereas there might be several actions at each level → use a serial planning graph Sec. 10.3 – p.19/22

  20. Heuristics derived from planning graphs The max level heuristic takes the maximum level cost of any of the goals (admissible, not very accurate) The level cost heuristic returns the sum of the level costs of the goals (inadmissible, works well in practice) The set level heuristic finds the level at which all the literals in the conjunctive goal appear in the planning graph without any pair of them being mutually exclusive (dominates max level, works well when the subplans interact a lot) Sec. 10.3 – p.20/22

  21. Termination of Graphplan The algorithm is guaranteed to terminate when there is no solution. When both the graph and the no-goods level off, the algorithm terminates The graph will level off at a finite level due to the following properties literals increase monotonically actions increase monotonically mutexes decrease monotonically no-goods decrease monotonically Sec. 10.3 – p.21/22

  22. Sources for the slides AIMA textbook (3 rd edition) AIMA slides (http://aima.cs.berkeley.edu/) Weld, D.S. (1999). Recent advances in AI planning. AI Magazine , 20(2), 93-122. Sec. 10.3 – p.22/22

Recommend


More recommend