1 / 24

Automated Planning and HTNs

Automated Planning and HTNs. Planning – A brief intro Classical Planning – The STRIPS Language HTN – Hierarchical Task Networks & SHOP2. What is planning?. Planning is the process of generating a sequence of actions that will achieve a goal.

gabbert
Download Presentation

Automated Planning and HTNs

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. Automated Planning and HTNs • Planning – A brief intro • Classical Planning – The STRIPS Language • HTN – Hierarchical Task Networks & SHOP2

  2. What is planning? • Planning is the process of generating a sequence of actions that will achieve a goal. • Automated planning is a branch of computer science that deals with producing plans to achieve a goal.

  3. Features of a planning system • A representation of the state of the world. • A representation of the goals to be achieved. • Actions that change the state of the world.

  4. The Blocks World Example • The world (problem domain) is a table covered by children’s blocks. • Blocks can sit on the table on on each other. • We want to move blocks from one configuration to another.

  5. The STRIPS Planning Language • STanford Research Institute Problem Solver • Based on First Order Predicate Calculus. • Developed in 1971

  6. STRIPS State Representation • Conjunctions of state symbols. • But not disjunctions or negative assertions • InHouse & HasDinner • Conjunctions of grounded operators. • At(Mark, House) & Using(Jane, Computer)

  7. STRIPS Goals • A partially specified state • At(Joe, Museum) & Has(Joe, Camera)

  8. STRIPS Actions • Operators are actions that transform world state • Parameters – Walk( person, place1, place2 ) • Precondition – Conjunctions describing partial states. • At( person, place1 ) & Door( place1, open ) • Effects – Conjunctions and negations to add and delete state members. • ~At( person, place1 ) & At( person, place2 )

  9. Constants and Predicates

  10. Operators (Actions)

  11. The Algorithm • Planning is a search procedure. • A graph of a search space is constructed. • State-Space Planning • Each node represents a state of the world. • A plan is a path through this space. • Plan-Space Planning • Each node is a set of partially instantiated operators, and a set of constraints. • Constraints are added until we get a plan.

  12. Search Types • Forward Search (SHOP2) • Start at initial state and apply operators. • Construct graph of state space. • Search from initial state to goal. • Can have a very large branching factor.

  13. Search Types • Backward Search (STRIPS) • State-Space search • Starts at goal. • Searches backwards to initial state. • Efficient but less expressive

  14. Example UCPOP Domain

  15. Hierarchical Task Networks • HTNs can be used to form complex plans. • Two types of Operators (Methods). • Methods form a hierarchy of tasks. • Complex – Composed of subtasks • Simple – Executes directly

  16. Method Structure • Complex Method • Name( parameter list ) • Precondition set 1 • Task list 1 … • Precondition set n • Task list n

  17. Sample Task Hierarchy • Method Travel( location1, location2 ) • Precondition 1: ShortDistance( loc1, loc2 ) • Tasks 1: • get_taxi • Ride( loc1, loc2 ) • Pay_driver

  18. Method Travel()… • Method Travel( location1, location2 ) • Precondition 2: LongDistance( loc1, loc2 ) • Tasks 2: • get_airplane_ticket( loc1, loc2 ) • Travel( loc1, loc1(airport) ) • Fly( loc1(airport), loc2(airport) ) • Travel( loc2(airport), loc2 )

  19. Method Structure • Simple Method • Name( parameter list ) • Precondition set • Delete list • Add List

  20. Method ride() • Ride( loc1, loc2 ) • Preconditions: ShortDistance( loc1, loc2 ) • Delete: (at Joe loc1) • Add: (at Joe loc2)

  21. The SHOP2 Planner • Created at University of Maryland in 2002 • Language for developing HTNs • Input: Planning domain and problem set. • Output: Java program to implement planner.

  22. Sample SHOP2 Domains

  23. Planning in Games / Simulation • Most systems use FSM. • Planning offers more behaviors, flexibility.

  24. Warcraft 2 Project

More Related