Classical Planning


Published on

Classical Planning

Published in: Education, Technology, Real Estate
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Classical Planning

  1. 1. (Classical) AI Planning
  2. 2. General-Purpose Planning: State & Goals <ul><li>Initial state : (on A Table) (on C A) (on B Table) (clear B) (clear C) </li></ul><ul><li>Goals : (on C Table) (on B C) (on A B) (clear A) </li></ul>A C B C B A Initial state Goals ( Ke Xu )
  3. 3. General-Purpose Planning: Operators <ul><li>Operator: (Unstack ?x) </li></ul><ul><li>Preconditions : (on ?x ?y) (clear ?x) </li></ul><ul><li>Effects : </li></ul><ul><ul><li>Add : (on ?x table) (clear ?y) </li></ul></ul><ul><ul><li>Delete : (on ?x ?y) </li></ul></ul>?y ?x ?y ?x … … No block on top of ?x transformation No block on top of ?y nor ?x On table
  4. 4. Planning: Search Space A C B A B C A C B C B A B A C B A C B C A C A B A C B B C A A B C A B C A B C ( Michael Moll )
  5. 5. Some Examples <ul><li>Route search : Find a route between Lehigh University and the Naval Research Laboratory </li></ul><ul><li>Project management : Construct a project plan for organizing an event (e.g., the Musikfest) </li></ul><ul><li>Military operations : Develop an air campaign </li></ul><ul><li>Information gathering : Find and reserve an airline ticket to travel from Newark to Miami </li></ul><ul><li>Game playing : plan the behavior of a computer controlled player </li></ul><ul><li>Resources control : Plan the stops of several of elevators in a skyscraper building. </li></ul>Which of the following problems can be modeled as AI planning problems? Answer: ALL!
  6. 6. FSM vs AI Planning Neither is more powerful than the other one Planning Operators <ul><li>Patrol </li></ul><ul><ul><li>Preconditions: </li></ul></ul><ul><ul><li>No Monster </li></ul></ul><ul><ul><li>Effects: </li></ul></ul><ul><ul><li>patrolled </li></ul></ul><ul><li>Fight </li></ul><ul><ul><li>Preconditions: </li></ul></ul><ul><ul><li>Monster in sight </li></ul></ul><ul><ul><li>Effects: </li></ul></ul><ul><ul><li>No Monster </li></ul></ul>Patrol Fight Monster In Sight No Monster FSM: A resulting plan: Patrol patrolled Fight No Monster Monster in sight
  7. 7. But Planning Gives More Flexibility <ul><li>“ Separates implementation from data” --- Orkin </li></ul>If conditions in the state change making the current plan unfeasible: replan! reasoning knowledge Planning Operators <ul><li>Patrol </li></ul><ul><ul><li>Preconditions: </li></ul></ul><ul><ul><li>No Monster </li></ul></ul><ul><ul><li>Effects: </li></ul></ul><ul><ul><li>patrolled </li></ul></ul><ul><li>Fight </li></ul><ul><ul><li>Preconditions: </li></ul></ul><ul><ul><li>Monster in sight </li></ul></ul><ul><ul><li>Effects: </li></ul></ul><ul><ul><li>No Monster </li></ul></ul><ul><ul><li>… </li></ul></ul>Many potential plans: Patrol Fight Patrol Fight Patrol Fight Patrol Fight Patrol Fight …
  8. 8. But… Does Classical Planning Work for Games? <ul><li>F.E.A.R. not! </li></ul>
  9. 9. General Purpose vs. Domain-Specific General purpose : symbolic descriptions of the problems and the domain. The plan generation algorithm the same Domain Specific : The plan generation algorithm depends on the particular domain Advantage: - opportunity to have clear semantics Disadvantage: - symbolic description requirement Advantage: - can be very efficient Disadvantage: - lack of clear semantics - knowledge-engineering for plan generation Planning: find a sequence of actions to achieve a goal
  10. 10. Classes of General-Purpose Planners General purpose planners can be classified according to the space where the search is performed: <ul><li>SAT </li></ul><ul><li>Hierarchical </li></ul><ul><li>Disjunctive plans </li></ul><ul><li>state </li></ul><ul><li>plan </li></ul>We are going to discuss these forms
  11. 11. State- and Plan-Space Planning <ul><li>State-space planners transform the state of the world. These planners search for a sequence of transformations linking the starting state and a final state </li></ul>(total order) <ul><li>Plan-space planners transform the plans. These planners search for a a plan satisfying certain conditions </li></ul>(partial-order, least-commitment) State of the world
  12. 12. Why Plan-Space Planning? <ul><li>1. Motivation: “Sussman Anomaly” </li></ul><ul><ul><li>Two subgoals to achieve: </li></ul></ul><ul><ul><li>(on A B) (on B C) </li></ul></ul>B A C C B A
  13. 13. Why Plan-Space Planning? <ul><li>Problem of state-space search: </li></ul><ul><ul><li>Try (on A B) first: </li></ul></ul><ul><ul><ul><li>put C on the Table, then put A on B </li></ul></ul></ul><ul><ul><ul><li>Accidentally wind up with A on B when B is still on the Table </li></ul></ul></ul><ul><ul><ul><li>We can not get B on C without taking A off B </li></ul></ul></ul><ul><ul><ul><li>Try to solve the first subgoal first appears to be mistaken </li></ul></ul></ul>A B C C B A C B A
  14. 14. Hierarchical (HTN) Planning Principle: Complex tasks are decomposed into simpler tasks. The goal is to decompose all the tasks into primitive tasks, which define actions that change the world. alternative methods Travel from UMD to Lehigh University Travel(UMD, Lehigh) Fly(National, L.V. International) Travel(L.V. Int’nal,Lehigh) Travel(UMD,National) Travel by car Enough money for gasoline Roads are passable Seats available Travel by plane Enough money for air fare available Taxi(UMD,UMD-Metro) Metro(UMD-Metro,National) Taxi(L.V. Int’nal,Lehigh)
  15. 15. Application to Computer Bridge <ul><li>Chess: better than all but the best humans </li></ul><ul><li>Bridge: worse than many good players </li></ul><ul><li>Why bridge is difficult for computers </li></ul><ul><ul><li>It is an imperfect information game </li></ul></ul><ul><ul><li>Don’t know what cards the others have (except the dummy) </li></ul></ul><ul><ul><li>Many possible card distributions, so many possible moves </li></ul></ul><ul><li>If we encode the additional moves as additional branches in the game tree, this increases the number of nodes exponentially </li></ul><ul><ul><li>worst case: about 6x10 44 leaf nodes </li></ul></ul><ul><ul><li>average case: about 10 24 leaf nodes </li></ul></ul>Not enough time to search the game tree ( Dana S. Nau )
  16. 16. How to Reduce the Size of the Game Tree? <ul><li>Bridge is a game of planning </li></ul><ul><ul><li>Declarer plans how to play the hand by combining various strategies (ruffing, finessing, etc.) </li></ul></ul><ul><ul><li>If a move doesn’t fit into a sensible strategy, then it probably doesn’t need to be considered </li></ul></ul><ul><li>HTN approach for declarer play </li></ul><ul><ul><li>Use HTN planning to generate a game tree in which each move corresponds to a different strategy , not a different card </li></ul></ul><ul><ul><ul><li>Reduces average game-tree size to about 26,000 leaf nodes </li></ul></ul></ul><ul><li>Bridge Baron: implements HTN planning </li></ul><ul><ul><li>Won the 1997 World Bridge Computer Challenge </li></ul></ul><ul><ul><li>All commercial versions of Bridge Baron since 1997 have include an HTN planner (has sold many thousands of copies) </li></ul></ul>( Dana S. Nau )
  17. 17. Universal Classical Planning (UCP) (Khambampati, 1997) <ul><li>Loop: </li></ul><ul><ul><li>If the current partial plan is a solution, then exit </li></ul></ul><ul><ul><li>Nondeterministically choose a way to refine the plan </li></ul></ul><ul><li>Some of the possible refinements </li></ul><ul><ul><li>Forward & backward state-space refinement </li></ul></ul><ul><ul><li>Plan-space refinement </li></ul></ul><ul><ul><li>Hierarchical refinements </li></ul></ul>Plan-space partially instantiated steps, plus constraints add steps & constraints State-space
  18. 18. Abstract Example Initial state final state Initial plan: Plan-space refinement State-space refinement Plan-space refinement State-space refinement
  19. 19. Why “Classical”? <ul><li>Classical planning makes a number of assumptions: </li></ul><ul><ul><li>Symbolic information (i.e., non numerical) </li></ul></ul><ul><ul><li>Actions always succeed </li></ul></ul><ul><ul><li>The “Strips” assumption : only changes that takes place are those indicated by the operators </li></ul></ul><ul><li>Despite these (admittedly unrealistic) assumptions some work-around can be made (and have been made!) to apply the principles of classical planning to games </li></ul><ul><li>Neoclassical planning removes some of these assumptions </li></ul>