1 / 23

Planning

Planning. Planning is a special case of reasoning We want to achieve some state of the world Typical example is robotics. Many thanks to Robin Burke, University of Chicago, for many of these ideas: http://people.cs.uchicago.edu/~burke/cs250/lectures/lecture1107.html. Search vs. Planning.

ameliak
Télécharger la présentation

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. Planning • Planning is a special case of reasoning • We want to achieve some state of the world • Typical example is robotics Many thanks to Robin Burke, University of Chicago, for many of these ideas:http://people.cs.uchicago.edu/~burke/cs250/lectures/lecture1107.html

  2. Search vs. Planning

  3. Example: Taking a Bath • Goal: Take A Bath • Initital State: • Final State:

  4. Actions you take that affect state Examples: RemoveClothes PutOnClothes TurnOnWater TurnOffWater GetInTub GetOutOfTub Can use search to find the right combination of actions InsertPlug RemovePlug Scrub Lather PourShampoo PlayWithDuckie Operators

  5. Problems with Search • Need a good heuristic – may not have one • No direct sense of which operators are relevant to the problem • Other constraints • Don’t want solutions where we take off clothes and put them on again several times • Search might find one • There is a directionality to what we want to do • Once the plug is in, we don't even want to consider removePlug • Blind search doesn't let us make these distinctions

  6. How does planning improve on search? • Explicitly represent the goal and the way it is achieved using logic • Make "important" decisions first and fill in the details later • Take advantage of independence • Puzzles are puzzles because subgoals are interlocking (cannot do each tile of 8-puzzle separately) • The real world is more forgiving in many cases: taking off my clothes will not affect the state of the plug in the tub • Allows divide and conquer strategies

  7. STRIPS Planning • STRIPS = STanford Research Institute Problem Solver • one of the first planning systems • one of the first formalisms • considerably extended now, but still in use • an entire subfield of planning is planning using the STRIPS representation • good place to start

  8. STRIPS Representation • States: Conjunctions of predicates applied to constants • Goals: Conjuntions of predicates applied to constants or simple variables

  9. STRIPS Representation • Actions: Get agent from one state to another • Action description: What to do, e.g. forward, suck, etc. • Precondition: what must be true to do action • PlugIn(Tub) would be a precondition for a Fill(Tub) action • Effect: what changes occur due to action • Full(Tub) would be effect of Fill(Tub)

  10. Action Example • No situation variables in action • Precondition automatically refers to situation before, effects to situation after • Negation = retraction • Actions can have variables

  11. Integrating Search • Still going to need to do some seaching • Could go forward from initial state • Progressive • High branching factor problem • Backward from goal • Regressive • Typically goals are conjunctive, works much like Prolog

  12. The STRIPS Planner • Start with a goal • TakingBath(Robot) • Need to know what conditions achieve this goal for backward chaining • Each conjunct is called a sub-goal • Need to achieve all subgoals with consistent bindings • Want to know steps on how you got there

  13. Algorithm • Start with goal • See if achieved already • If not, see if there’s some operator that can achieve it • Unclothed(x) • In KB, I have Clothed(Robot) • Unclothed(Robot) is achieved with the plan Undress(Robot) • If no such operator, try and decompose by backward chaining • If unable to do so, fail and backtrack

  14. Full Example • Start with goal • Unclothed(Robot) & Full(Tub) & In(Robot,Tub) & Plugged(Tub) • Operator Undress(x): • Precond: Clothed(x) • Effect: Unclothed(x) & ~Clothed(x) • So plan is, for starters, • Undress(Robot) • Remaining goals: • Full(Tub) & In(Robot, Tub) & Plugged(Tub) • Next subgoal: Full(Tub)

  15. Example continued • We have an operator Fill(x) • Precond: Plugged(x) • Effect: Full(x) & ~Empty(x) • So backward chain over precondition • Try operator Plug(x) • Precond: Unplugged(x) • Effect: Plugged(x) & ~Unplugged(x) • So add it to plan: • Undress(Robot), Plug(Tub)

  16. Example continued • Now that precondition of Fill satisfied, add to plan • Plan: Undress(Robot), Plug(Tub), Fill(Tub) • Remaining goals: In(Robot,Tub) & Plugged(Tub) • Use operator GetIn(x,y) to get in tub • Plan: Undress(Robot), Plug(Tub), Fill(Tub), GetIn(Robot,Tub) • Remaining goals: Plugged(Tub) – it’s true

  17. What’s the catch? • Test the solution at the end: You may clobber a condition along the way • E.g. You have to leave bathroom to fill tub (get dressed) • Done by keeping track of threats • Unclothed(Robot) is a precondition for final goal • Do not allow an operator which inserts Clothed(Robot) between Undress(Robot) and goal

  18. Actual algorithm • Select subgoal state Sneed to resolve • Choose operator c to resolve it • Record link from previous state to final state

More Related