Download presentation
Presentation is loading. Please wait.
Published byMercy Bradford Modified over 9 years ago
1
Automated Planning and HTNs Planning – A brief intro Planning – A brief intro Classical Planning – The STRIPS Language Classical Planning – The STRIPS Language HTN – Hierarchical Task Networks & SHOP2 HTN – Hierarchical Task Networks & SHOP2
2
What is planning? Planning is the process of generating a sequence of actions that will achieve a goal. 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. 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 state of the world. A representation of the goals to be achieved. A representation of the goals to be achieved. Actions that change the state of the world. 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. The world (problem domain) is a table covered by children’s blocks. Blocks can sit on the table on on each other. Blocks can sit on the table on on each other. We want to move blocks from one configuration to another. We want to move blocks from one configuration to another.
5
The STRIPS Planning Language STanford Research Institute Problem Solver STanford Research Institute Problem Solver Based on First Order Predicate Calculus. Based on First Order Predicate Calculus. Developed in 1971 Developed in 1971
6
STRIPS State Representation Conjunctions of state symbols. Conjunctions of state symbols. But not disjunctions or negative assertions But not disjunctions or negative assertions InHouse & HasDinner Conjunctions of grounded operators. Conjunctions of grounded operators. At(Mark, House) & Using(Jane, Computer)
7
STRIPS Goals A partially specified state A partially specified state At(Joe, Museum) & Has(Joe, Camera)
8
STRIPS Actions Operators are actions that transform world state 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. Planning is a search procedure. A graph of a search space is constructed. A graph of a search space is constructed. State-Space Planning State-Space Planning Each node represents a state of the world. A plan is a path through this space. Plan-Space Planning 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) 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) 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. HTNs can be used to form complex plans. Two types of Operators (Methods). Two types of Operators (Methods). Methods form a hierarchy of tasks. Methods form a hierarchy of tasks. Complex – Composed of subtasks Simple – Executes directly
16
Method Structure Complex Method 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 ) Method Travel( location1, location2 ) Precondition 1: ShortDistance( loc1, loc2 ) Precondition 1: ShortDistance( loc1, loc2 ) Tasks 1: Tasks 1: get_taxi Ride( loc1, loc2 ) Pay_driver
18
Method Travel()… Method Travel( location1, location2 ) Method Travel( location1, location2 ) Precondition 2: LongDistance( loc1, loc2 ) Precondition 2: LongDistance( loc1, loc2 ) Tasks 2: 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 Simple Method Name( parameter list ) Precondition set Delete list Add List
20
Method ride() Ride( loc1, loc2 ) Ride( loc1, loc2 ) Preconditions: ShortDistance( loc1, loc2 ) Preconditions: ShortDistance( loc1, loc2 ) Delete: (at Joe loc1) Delete: (at Joe loc1) Add: (at Joe loc2) Add: (at Joe loc2)
21
The SHOP2 Planner Created at University of Maryland in 2002 Created at University of Maryland in 2002 Language for developing HTNs Language for developing HTNs Input: Planning domain and problem set. Input: Planning domain and problem set. Output: Java program to implement planner. Output: Java program to implement planner.
22
Sample SHOP2 Domains
23
Planning in Games / Simulation Most systems use FSM. Most systems use FSM. Planning offers more behaviors, flexibility. Planning offers more behaviors, flexibility.
24
Warcraft 2 Project
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.