1 / 60

Notes 9: Planning; Strips Planning Systems

Notes 9: Planning; Strips Planning Systems. ICS 270a Spring 2003. Outline: Planning. Situation Calculus STRIPS Planning Readings: Nillson’s Chapters 21-22. The Situation Calculus. A goal can be described by a wff: if we want to have a block on B

duncan
Download Presentation

Notes 9: Planning; Strips Planning Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Notes 9: Planning;Strips Planning Systems ICS 270a Spring 2003

  2. Outline: Planning • Situation Calculus • STRIPS Planning • Readings: Nillson’s Chapters 21-22

  3. The Situation Calculus • A goal can be described by a wff: • if we want to have a block on B • Planning: finding a set of actions to achieve a goal wff. • Situation Calculus (McCarthy, Hayes, 1969, Green 1969) • A Predicate Calculus formalization of states, actions, and their effects. • Sostate in figure can be described by: we reify the state and include them as arguments

  4. The Situation Calculus (continued) • The atoms denotes relations over states called fluents. • We can also have. • Knowledge about state and actions = predicate calculus theory. • Inferene can be used to answer: • Is there a state satisfying a goal? • How can the present state be transformed into that state by actions? The answer is a plan

  5. Representing Actions • Reify the actions: denote an action by a symbol • actions are functions • move(B,A,F1): move block A from block B to F1 • move (x,y,z) - action schema • do: A function constant, do denotes a function that maps actions and states into states action state

  6. Representing Actions (continued) • Express the effects of actions. • Example: (on, move) (expresses the effect of move on On) • positive effect axiom: • Positive: describes how action makes a fluent true • negative : describes how action makes a fluent false • antecedent: pre-condition for actions • consequent: how the fluent is changed

  7. Representing Actions (continued) • Effect axioms for (clear, move): (move(x,y,z)) • precondition are satisfied with • B/x, A/y, S0/s, F1/z • what was true in S0 remains true . figure 21

  8. Frame Axioms • Not everything true can be inferredOn(C,F1) remains true but cannot be inferred • Actions have local effect • We need frame axioms for each action and each fluent that does not change as a result of the action • example: frame axioms for (move, on) • If a block is on another block and move is not relevant, it will stay the same. • Positive: • negative

  9. Frame Axioms (continued) • Frame axioms for (move, clear): • The frame problem: need axioms for every pair o {action, fluent}!!! • There are languages that embede some assumption on frame axioms that can be derived automatically: • Default logic • Negation as failure • Nonmonotonic reasoning • Minimizing change

  10. Other problems • The qualification problem: qualifying the antecedent for all possible exception. Needs to enumerate all exceptions • ~heavy and ~glued and ~armbroken  can-move • ~bird and ~cast-in-concrete and ~dead…  flies • Solutions: default logics, nonmonotonic logics • The ramification problem: • If a robot carries a package, the package will be where the robot is. But what about the frame axiom, when can we infer about the effect of the actions and when we cannot.

  11. Generating plans • To generate a plan to achieve a goal, we attempt to prove • Example: Get block B on the floor from S0. • Prove: • By resolution refutation: add forall s not On(B,F1,s) • (page 370 top)

  12. Alternative to frame problemSTRIPS Planning systems

  13. STRIPS: describing goals and state • On(B,A) • On(A,C) • On(C,F1) • Clear(B) • Clear(F1) • The formula describes a set of world states • Planning search for a formula satisfying a goal description • State descriptions: conjunctions of ground literals. • Also universal formulas: On(x,y) (y=F1) or ~Clear(y) • Goal wff: • Given a goal wff, the search algorithm looks for a sequence of actions That transform into a state description that entails the goal wff.

  14. STRIPS Description of Operators • A STRIPS operator has 3 parts: • A set, PC (preconditions) of ground literals • A set D, of ground literals called the delete list • A setA, of ground literals called add list • Usually described by Schema: Move(x,y,z) • PC: On(x,y) and (Clear(x) and Clear(z) • D: Clear(z) , On(x,y) • A: On(x,z), Clear(y), Clear(F1) • A state S1 is created applying operator O by adding A and deleting D from S1.

  15. Example: the move operator

  16. Forward Search Methods:can use A* with some h and g

  17. Recursive STRIPS • Forward search with islands: • Achieve one subgoal at a time. Achieve a new conjunct without ever violating already achieved conjuncts or maybe temporarily violating previous subgoals. • General Problem Solver (GPS) by Newell Shaw and Simon (1959) uses Means-Ends analysis. • Each subgoal is achieved via a matched rule, then its preconditions are subgoals and so on. This leads to a planner called STRIPS(gamma) when gamma is a goal formula.

  18. STRIPS algorithm • Given a goal stack: • 1. Consider the top goal • 2. Find a sequence of actions satisfying the goal from the current state and apply them. • 3. The next goal is considered from the new state. • 4. Termination: stack empty • 5. Check goals again.

  19. Plan with Run-time conditionals • We can allow disjunction in state description: • EX: On(B,A) V On(B,C) • For some operators may be applicable just with one of these disjuncts that can be determined during run-time. • Run-time conditionals: • If On(B,A) apply oper1 • If On(B,C) apply oper2. • Plan is a tree whose branching nodes are states with unknown information.

  20. The Sussman annomaly • RSTRIPS cannot achieve shortest plan • Two possible orderings of subgoals: • On(A,B) and On(B,C) or On(B,C) and On(A,B)

  21. Backward search methods; • Regressing a ground operator

  22. Regressing an ungrounded operator

  23. Example of Backward Search

  24. The Sussman annomaly • RSTRIPS cannot achieve shortest plan • Two possible orderings of subgoals: • On(A,B) and On(B,C) or On(B,C) and On(A,B)

  25. Partial order planning • Least commitment planning • Nonlinear planning • Search in the space of partial plans • A state is a partial incomplete partially ordered plan • Operators transform plans to other plans by: • Adding steps • Reordering • Grounding variables • SNLP: Systematic Nonlinear Planning (McAllester and Rosenblitt 1991) • NONLIN (Tate 1977)

  26. State-space vs Plan-space search

  27. Plan-Transforming Operators

  28. STRIPS RULES • Graph structure • Oval nodes are operators • Boxed: preconditions • Boxed: effects

  29. Goal and Initials states are rules • Example: Sussman • Initial plan

  30. The next Plan structure • A possible transformation: add a rule to achieve one of the conjuncts: On(A,B)

  31. A subsequent Plan structure • Attempt to Clear(A) • By: move(u,A,v) • Then instantiate u to C and • V to F1 and add • Correspondence links. • Preconditions of • Moves are established but: • Order constraint b < a

  32. Achieving next subgoal: On(B,C) • Add move(B,z,C) • Instantiate z to F1

  33. Add Threat arcs • An arc from an operator to precondition • If the operator can delete a • precondition • Complete plan when • We find a consistent set • Of ordering • Constraints that • Discharge the threats • We have b<c<a

  34. Heirarchical Planning • ABSTRIPS • (Sacerdoti 1974) • Preconditions, conjuncts • Have criticality numbers • Use high treshold first. • Plan1: • goto(r1,d1,12),goto(r2,d2,r3) • Plan2: • Achieve preconditions of goto1, • Then apply, then achieve preconditions • Of goto2:goto1,ooengto2

  35. Learning Plans • Unstacking two blocks • Remember a macro plan • A triangle table for bock unstacking: • Columns: operators in order of executions • Cell to the left are preconditions, below are add lists • Cell(I,j): literals added by oper(I) and needed by oper(j+1)

  36. A triangle table schema for block unstacking

  37. Strips vs ADL language

  38. STRIPS formulation for transportation problem

  39. STRIP for spare tire problem

  40. The block world

  41. Planning forward and backwords

  42. A partial order plan for putting shoes and sock

  43. Solving the flat tire problem by partial planning

  44. The initial partial plan for Spare tire • From initial plan, pick an open precond (At(Spare,Axle)) and choose an applicable action (PutOn)) • Pick precond At(Spare,ground) and choose an applicable action Remove(Spare,trunk)

  45. Spare-tire, continued • Pick precond ~At(Flat,Axle) and choose Leaveovernight action. • Because it has ~At(Spare,ground) it conflicts with “Remove”, • We add athreat constraint

  46. Flate-tire, continued • Removeovernight doesn’t work so: • Consider ~At(Flat,Axle) and choose Remove(Flat,axle) • Pick At(Spare,Trunk) precond, and Start to achieve it.

  47. Planning Graphs • A planning graph consists of a sequence of levels that correspond to time-steps in the plan • Level 0 is the initial state. • Each level contains a set of literals and a set of actions • Literals are those that could be true at the time step. • Actions are those that their preconditions could be satisfied at the time step. • Works only for propositional planning.

  48. Example:Have cake and eat it too

  49. The Planning graphs for “have cake”, • Persistence actions: Represent “inactions” by boxes: frame axiom • Mutual exclusions (mutex) are represented between literals and actions. • S1 represents multiple states • Continue until two levels are identical. The graph levels off. • The graph records the impossibility of certain choices using mutex links. • Complexity of graph generation: polynomial in number of literals.

  50. Defining Mutex relations • A mutex relation holds between two actions on the same level iff any of the following holds: • Inconsistency effect:one action negates the effect of another. Example “eat cake and presistence of have cake” • Interference: One of the effect of one action is the negation of the precondition of the other. Example: eat cake and persistence of Have cake • Competing needs: one of the preconditions of one action is mutually exclusive with a precondition of another. Example: Bake(cake) and Eat(Cake). • A mutex relation holds between 2 literals at the same level iff one is the negation of the other or if each possible pair of actions that can achieve the 2 literals is mutually exclusive.

More Related