Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Planning 15-381: Artificial Intelligence ● Behrang Mohit and Davide Fossati Planning ● Process of organizing a sequence of actions to achieve a goal Approaches that combine search and logic Some figures and tables are from Russell and Norvig 2 Representation ● Actions States: conjunction of facts (ground predicates) ● at(Plane1, DOH) ∧ at(Plane2, PGH) ● Actions: composed of precondition and effect ● action fly(p, from, to): precond: at(p, from) ∧ plane(p) ∧ airport(from) ∧ airport(to) effect: ~at(p, from) ∧ at(p, to) ● 3 An action is applicable in a state if the preconditions are satisfied The result of an action is a state with the addition of the positive predicates listed in the effect section, and deletion of the negative predicates A plan is a sequence of actions that transform an initial state to a goal state 4 Example: Air cargo transport Example: The blocks world 5 Blocks world 6 Example: Monkey and bananas P1 P2 P3 P4 P5 P6 7 8 Monkey and bananas Planning as search (operator GOTO (params (<x>) (<y>)) (preconds (onfloor) (at monkey <y>)) (effect (del at monkey <y>) (at monkey <x>))) (operator CLIMB (params (<x>)) (preconds (at box <x>) (at monkey <x>)) (effects (onbox <x>) (del onfloor))) ● (operator PUSHBOX (params (<x>) (<y>)) (preconds (at box <y>) (at monkey <y>) (onfloor)) (effects (at monkey <x>) (at box <x>) (del at monkey <y>) (del at box <y>))) actions (operator GETKNIFE (params (<y>)) (preconds (at knife <y>) (at monkey <y>)) (effects (hasknife) (del at knife <y>))) ● (operator GRABBANANAS (params (<y>)) (preconds (hasknife) (at bananas <y>) (onbox <y>)) (effects (hasbananas))) (operator PICKGLASS (params (<y>)) (preconds (at glass <y>) (at monkey <y>)) (effects (hasglass) (del at glass <y>))) (operator GETWATER (params (<y>)) (preconds (hasglass) (at waterfountain <y>) (at monkey <y>) (onbox <y>)) (effects (haswater))) initial state (preconds (at monkey p1)(onfloor)(at box p2)(at bananas p3) (at knife p4)(at waterfountain p3)(at glass p6)) goal (effects (hasbananas) (haswater)) ● Forward chaining search – Start from the initial state – Search using all applicable actions Backward chaining search – Start from the goal state – Search backwards using all relevant actions State space explosion: we need good heuristics! 9 10 Forward and backward search Planning graphs ● Data structure that help provide good heuristics and pruning of the planning search space ● Can be built in polynomial time ● Nodes: atomic facts and actions, arranged into alternate levels – ● ● 11 First level: true facts in the initial state of the problem Edges of two types: – From a fact to the actions for which it is a condition – From an action to the new facts that is makes true or false Store also mutually exclusive (mutex) facts and actions – Facts that can't be true at the same time – Actions that can't be executed together 12 Planning graph example Mutually exclusive actions ● ● ● persistence node mutex link Interference: one of the effects of one action is the negation of the precondition of the other. Example: eat(Cake) negates the precondition of persistence(have(Cake)) Competing needs: one of the preconditions of one action is mutually exclusive with the precondition of the other. Example: bake(Cake) and eat(Cake) compete on the value of the have(Cake) precondition 13 14 Graphplan algorithm Mutually exclusive facts ● Inconsistent effects: one action negates an effect of the other. Example: eat(Cake) and persistence(have(Cake)) disagree on the effect have(Cake) (A. Blum and M. Furst) Two facts at the same level are mutex if – one is the negation of the other, or – each possible pair of actions that could achieve the two facts is mutex 15 16 Graphplan demo ● System available here: http://www.cs.cmu.edu/~avrim/graphplan.html ● Let's play with monkeys and bananas 17