1 / 48

Partial Order Planning

Partial Order Planning. Brian C. Williams 16.412J/6.834J Sept 16 th , 2002. Slides with help from: Dan Weld Stuart Russell & Peter Norvig. 1. Self Repairing Explorers. EXECUTION. PLANNING. RECOVERY. Command dispatch Fault protection Attitude control. Autonomous Agents.

rufin
Download Presentation

Partial Order Planning

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. Partial Order Planning Brian C. Williams 16.412J/6.834J Sept 16th, 2002 Slides with help from: Dan Weld Stuart Russell & Peter Norvig 1

  2. Self Repairing Explorers

  3. EXECUTION PLANNING RECOVERY Command dispatch Fault protection Attitude control Autonomous Agents Self-commanding Self-diagnosing Self-repairing • Commanded at: • Mission level • Engineering level Monitors Mission Goal Scenario

  4. Readings for Today’s Lecture • Partial Order PlanningAIMA Chapter 11 • Execution and Conditional PlanningAIMA Chapter 13 • * AIMA = “Artificial Intelligence: A Modern Approach,” by Russell and Norvig. • Optional Reading:Weld “Introduction to Least Commitment Planning,” AI Magazine.(To be posted on the class web site)

  5. Planning with Atomic Time • Operator-based planning as search • Declarative encoding of states and operators • Partial order planning • Planning problem • Partial order planning algorithm

  6. a north11 north12 a a W0 W1 W2 Operator-based Planning Problem • What assumptions areimplied? • Atomic time. • Agent is omniscient (no sensing necessary). • Agent is sole cause of change. • Actions have deterministic effects. • No indirect effects. • STRIPS Assumptions • Input • Set of world states • Action operators • Fn: world-stateworld-state • Initial state of world • Goal • partial state (set of world states) • Output • Sequence of actions

  7. Initial State Goal State C A B A C B Operator-based Planning as Search 1) Forward-Chaining State-Space Search What problems arise?

  8. Initial State Goal State C A B A C B What Are Alternative Strategies? Are these strategies supported by our current representation? Need more declarative description of operators and state

  9. A B C D E D A B C E * * * A D B C E C D A B E Planning as Search 2) Backward-Chaining (goal-directed search) • Search partial worlds (partial assignment) • Subgoals weakly interact: • Maintain goal/subgoal decomposition • Order action sequences only where needed (partial orders) • How do we represent the search state? Initial State is completely defined Many Goal States Where do we start?

  10. Idea: Each state is a partial plan pick-from-table(C) put-on(C,B) pick-from-table(C) pick-from-table(B) Plan-Space Search • How do we represent plans? • How do we test if a plan is a solution? • How do we generate a plan?

  11. Partial Order Planning • Plan from goals, back to initial state • Search through partial plans • Representation: • Operators given in declarative representation, rather than black box functions. • Plans represent only relevant commitments(e.g., relevant ordering of operators, not total ordering)

  12. Planning with Atomic Time • Operator-based planning as search • Declarative encoding of state and operators • Partial order planning • Planning problem • Partial order planning algorithm

  13. north11 a a W1 W0 STRIPS Representation: Encode world states as conjunctions of literals • Propositions • True/False Statements (block a) • Literals • Proposition or its negation(not (block a) ) • Conjunction • And of literals • (And (block a) (block b) (block c) (on-table a) …) • A World state is a conjunction with every proposition appearing exactly once. • A Partial state is a conjunction with every proposition appearing at mostonce. • What is missing from this logic?

  14. precond: (and (agent-at 1 1) (agent-facing north)) north11 North11 a a effect: (and (agent-at 1 2) (not (agent-at 1 1))) W1 W0 STRIPS Operator Representation • Initial state: • ((block a) (block b) (block c) (on-table a) (on-table b) (clear a) (clear b) (clear c) (arm-empty)) • goal (partial state): • ((on a b) (on b c))) • Available actions • Strips operators • Effects specify how to change the set of propositions.

  15. Note: strips doesn’t allow derived effects; you must be complete! } (Parameterized) Operator Schemata • Instead of defining: pickup-A and pickup-B and … • Define a schema: ?var denotes a free variable (:operatorpick-up :parameters ((block ?ob1)) :precondition (and (clear ?ob1) (on-table ?ob1) (arm-empty)) :effect (and (not (clear ?ob1)) (not (on-table ?ob1)) (not (arm-empty)) (holding ?ob1)))

  16. Planning with Atomic Time • Operator-based planning as search • Declarative encoding of state and operators • Partial order planning • Planning problem • Partial order planning algorithm

  17. Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) Have(Milk) At(Home) Have(Ban.) Have(Drill) Finish Given Initial and Goal State Initial and Goal states are encoded as operators, Why? Don’t need to introduce (partial) states as separate objects. Keeps theory minimal.

  18. At(HWS) Given Plan Operators At(SM), Sells(SM,Ban.) At(HWS) Go(SM) Buy(Ban.) At(SM) Have(Ban) At(HWS) Sells(HWS,Drill) At(Home) Go(HWS) Buy(Drill) At(HWS) Have(Drill) At(SM) At(SM), Sells(SM,Milk) Go(Home) Buy(Milk) At(Home) Have(Milk) What is a solution?

  19. At(HWS) Sells(HWS,Drill) Buy(Drill) At(SM), Sells(SM,Milk) At(SM), Sells(SM,Ban.) Buy(Milk) Buy(Ban.) Partial Order Plan <Actions,Orderings,Links> Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) Have(Milk) At(Home) Have(Ban.) Have(Drill) Finish

  20. Partial Order Plan <Actions,Orderings,Links> Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) At(HWS) Sells(HWS,Drill) Buy(Drill) At(SM), Sells(SM,Milk) At(SM), Sells(SM,Ban.) Buy(Milk) Buy(Ban.) Have(Milk) At(Home) Have(Ban.) Have(Drill) Finish

  21. At(HWS) Go(SM) At(SM) Go(Home) Partial Order Plan <Actions,Orderings,Links> Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) At(HWS) Sells(HWS,Drill) Buy(Drill) At(SM), Sells(SM,Milk) At(SM), Sells(SM,Ban.) Buy(Milk) Buy(Ban.) Have(Milk) At(Home) Have(Ban.) Have(Drill) Finish

  22. At(Home) Go(HWS) Partial Order Plan <Actions,Orderings,Links> Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) At(HWS) Sells(HWS,Drill) Buy(Drill) At(HWS) Go(SM) At(SM), Sells(SM,Milk) At(SM), Sells(SM,Ban.) Buy(Milk) Buy(Ban.) At(SM) Go(Home) Have(Milk) At(Home) Have(Ban.) Have(Drill) Finish

  23. Partial Order Plan <Actions,Orderings,Links> Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) At(Home) Go(HWS) At(HWS) Sells(HWS,Drill) Buy(Drill) At(HWS) Go(SM) At(SM), Sells(SM,Milk) At(SM), Sells(SM,Ban.) Buy(Milk) Buy(Ban.) At(SM) Go(Home) Have(Milk) At(Home) Have(Ban.) Have(Drill) Finish

  24. Why is an ordering needed? At(HWS) Go(SM) At(SM) Buy(Milk) At(SM) Go(Home) At(Home)

  25. At(SM) Buy(Milk) Why is an ordering needed? Suppose the other order is allowed, what happens? At(HWS) Go(SM) “Threatened Precondition” At(SM) Go(Home) At(Home)

  26. Why is an ordering needed? Suppose the other order is allowed, what happens? At(HWS) Go(SM) Link indicates protected time interval. At(SM) Go(Home) At(Home) At(SM) Buy(Milk)

  27. Ordering Resolves Threat At(HWS) Go(SM) At(SM) Buy(Milk) At(SM) Go(Home) At(Home)

  28. A Solution: Complete and Consistent Plan Start • IFF every precondition of every step is achieved • A step’s precondition is achieved iff • its the effect of a preceding step, • no possibly intervening step undoes it. • IFF there is no contradiction in the ordering constraints(I.e., never si < sj and sj < si.) At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) • Complete Plan • Consistent Plan At(Home) Go(HWS) At(HWS) Sells(HWS,Drill) Buy(Drill) At(HWS) Go(SM) At(SM), Sells(SM,Milk) At(SM), Sells(SM,Ban.) Buy(Milk) Buy(Ban.) At(SM) Go(Home) Have(Milk) At(Home) Have(Ban.) Have(Drill) Finish

  29. Planning with Atomic Time • Operator-based planning as search • Declarative encoding of state and operators • Partial order planning • Planning problem • Partial order planning algorithm

  30. POP(<A,O,L>, agenda, actions) • <A,O,L>, A partial plan to expand • Agenda: A queue of open conditions still to be satisfied: <p, aneed > • Actions: A set of actions that may be introduced to meet needs. • aadd: an action that produces the needed condition p for aneed • Athreat : an action that might threaten a causal link from aproducer to aconsumer

  31. POP(<A,O,L>, agenda, actions) • Termination: If agenda is empty, return plan <A,O,L>. • Goal Selection: select and remove open condition <p, aneed > from agenda. • Action Selection: Choose new or existing action aadd that can precede aneed and whose effects include p. Link and order actions. • Update Agenda: If aadd is new, add its preconditions to agenda. • Threat Detection: For every action athreat that might threaten some causal link from aproduce to aconsume, choose a consistent ordering: • Demotion: Addathreat <aproduce • Promotion: Addaconsume <athreat • Recurse: on modified plan and agenda Choose is nondeterministic Select is deterministic

  32. To remove threats… promote the threat… At(HWS) Go(SM) At(SM) Go(Home) At(Home) At(SM) Buy(Milk)

  33. At(SM) Buy(Milk) To remove threats… promote the threat… demote the threat… At(HWS) Go(SM) At(SM) Go(Home) At(Home)

  34. At(SM) Go(Home) At(Home) To remove threats… promote the threat… demote the threat… • But only allow demotion/promotion if schedulable • consistent = loop free • no action precedes initial state At(HWS) Go(SM) At(SM) At(SM) Buy(Milk) Buy(Milk)

  35. Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) Have(Drill) Have(Milk) Have(Ban.) at(Home) Finish

  36. At(HWS) Sells(HWS,Drill) At(SM), Sells(SM,Milk) At(SM), Sells(SM,Ban.) Buy(Drill) Buy(Milk) Buy(Ban.) Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) Have(Drill) Have(Milk) Have(Ban.) at(Home) Finish

  37. Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) At(HWS) Sells(HWS,Drill) At(SM), Sells(SM,Milk) At(SM), Sells(SM,Ban.) Buy(Drill) Buy(Milk) Buy(Ban.) Have(Drill) Have(Milk) Have(Ban.) at(Home) Finish

  38. At(x) At(x) Go(SM) Go(HWS) Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) At(HWS) Sells(HWS,Drill) At(SM), Sells(SM,Milk) At(SM), Sells(SM,Ban.) Buy(Drill) Buy(Milk) Buy(Ban.) Have(Drill) Have(Milk) Have(Ban.) at(Home) Finish

  39. Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) At(Home) At(Home) Go(SM) Go(HWS) At(HWS) Sells(HWS,Drill) At(SM), Sells(SM,Milk) At(SM), Sells(SM,Ban.) Buy(Drill) Buy(Milk) Buy(Ban.) Have(Drill) Have(Milk) Have(Ban.) at(Home) Finish

  40. Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) At(Home) At(Home) Go(SM) Go(HWS) At(HWS) Sells(HWS,Drill) At(SM), Sells(SM,Milk) At(SM), Sells(SM,Ban.) Buy(Drill) Buy(Milk) Buy(Ban.) Have(Drill) Have(Milk) Have(Ban.) at(Home) Finish

  41. Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) At(Home) At(Home) Go(SM) Go(HWS) At(HWS) Sells(HWS,Drill) At(SM), Sells(SM,Milk) At(SM), Sells(SM,Ban.) Buy(Drill) Buy(Milk) Buy(Ban.) Have(Drill) Have(Milk) Have(Ban.) at(Home) Finish

  42. At(SM) Go(Home) Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) At(x) At(Home) Go(SM) Go(HWS) At(HWS) Sells(HWS,Drill) At(SM), Sells(SM,Milk) At(SM), Sells(SM,Ban.) Buy(Drill) Buy(Milk) Buy(Ban.) Have(Drill) Have(Milk) Have(Ban.) at(Home) Finish

  43. At(x) At(x) Go(SM) Go(HWS) Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) At(HWS) Sells(HWS,Drill) At(SM), Sells(SM,Milk) At(SM), Sells(SM,Ban.) Buy(Drill) Buy(Milk) Buy(Ban.) Have(Drill) Have(Milk) Have(Ban.) at(Home) Finish

  44. Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) At(Home) At(Home) Go(SM) Go(HWS) At(HWS) Sells(HWS,Drill) At(SM), Sells(SM,Milk) At(SM), Sells(SM,Ban.) Buy(Drill) Buy(Milk) Buy(Ban.) Have(Drill) Have(Milk) Have(Ban.) at(Home) Finish

  45. Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) At(Home) At(Home) Go(SM) Go(HWS) At(HWS) Sells(HWS,Drill) At(SM), Sells(SM,Milk) At(SM), Sells(SM,Ban.) Buy(Drill) Buy(Milk) Buy(Ban.) Have(Drill) Have(Milk) Have(Ban.) at(Home) Finish

  46. At(SM) Go(Home) Start At(Home) Sells(HWS,Drill) Sells(SM,Milk) Sells(SM,Ban.) At(x) At(Home) Go(SM) Go(HWS) At(HWS) Sells(HWS,Drill) At(SM), Sells(SM,Milk) At(SM), Sells(SM,Ban.) Buy(Drill) Buy(Milk) Buy(Ban.) Have(Drill) Have(Milk) Have(Ban.) at(Home) Finish

  47. Autonomous Agents: What is missing? EXECUTION PLANNING RECOVERY Command dispatch Fault protection Attitude control Self-commanding Self-diagnosing Self-repairing Monitors Mission Goal Scenario

  48. Hierarchical Hybrid Constraint Automata Situation Calculus POMDPs TPNs SADL Probabilistic Concurrent Constraint Automata ADL, UWL MDPs DS1 DDL Many Action Representations:(Many Studied In This Course) Tractable Expressive STRIPS

More Related