Title: Planning: Representation and examples
1Planning Representation and examples Computer
Science cpsc322, Lecture 17 (Textbook Chpt 11.1 -
11.2) February, 13, 2008
2Lecture Overview
- Recap Were are we?
- Planning
- Example
- STRIPS a Feature-Based Representation
- Forward Planning
3Big Picture
Stochastic
Deterministic
Search
Single Action
Constraint Satisfaction (CSPs)
Decision
Logics
Search
Sequence of Actions
Constraint Satisfaction (CSPs)
Planning
4Lecture Overview
- Recap We are we?
- Planning
- Example
- STRIPS a Feature-Based Representation
- Forward Planning
5Planning
- How to select and organize a sequence of actions
to achieve a given goal - Relying on the powerful representation of states
as a set of features. (like CSPs) - Relying on sophisticated actions representation
(unlike CSPs)
6Planning vs. CSPs
- With CSPs, we looked for solutions to essentially
atemporal problems. - and a single variable assignment (state) that
satisfies all of our constraints. - Now consider a problem where we are given
- A description of an initial state
- A description of the actions
- A goal to achieve
- ...and want to find a sequence of actions that is
possible and will result in a state satisfying
the goal.
- Note here we want not a single state that
satisfies our constraints, but rather a sequence
of states that gets us to a goal
7Representation of a Planning Domain
- We solved similar planning problems when we
considered generic search .
- state is a "black box any arbitrary data
structure that supports three problem-specific
routines - successor function,
- heuristic function
- goal test
8Planning with Feature-Based Representation
- Now what we want to find is a sequence of
variable assignments that - begins at an initial state
- proceeds from one state to another by taking
valid actions - ends up at a goal
Goal v1 F
9Lecture Overview
- Recap We are we?
- Planning
- Example
- STRIPS a Feature-Based Representation
- Forward Planning
10Delivery Robot Example
- Consider a delivery robot named Rob, who must
navigate the following environment
11Delivery Robot Example States
- The state is defined by the following features
- RLoc - Rob's location
- domain coffee shop (cs), Sam's office (off ),
mail room (mr ), - or laboratory (lab)
- RHC - Rob has coffee
- domain True/False. By indicate that Rob
has coffee and - by that Rob doesn't have coffee.
- SWC - Sam wants coffee (T/ F)
- MW - Mail is waiting (T/ F)
- RHM - Rob has mail (T/ F)
- An example state is
. - How many states are there?
12Delivery Robot ExampleActions
- The robots actions are
- Move - Rob's move action
- move clockwise (mc ), move anti-clockwise (mac )
not move (nm ) - PUC - Rob picks up coffee
- must be at the coffee shop
- DelC - Rob delivers coffee
- must be at the office, and must have coffee
- PUM - Rob picks up mail
- must be in the mail room, and mail must be
waiting - DelM - Rob delivers mail
- must be at the office and have mail
-
13Lecture Overview
- Recap
- Planning
- Example
- STanford Research Institute Problem Solver
(STRIPS) a Feature-Based Representation - Forward Planning
14Feature-Based Representation
- How would a feature-based representation work?
- the state space is easy joint assignment to
variables - initial state and goal state are also easy
- the key is modeling actions
In STRIPS, an action has two parts 1.
Preconditions a set of assignments to features
that must be satisfied in order for the
action to be legal 2. Effects a set of
assignments to features that are caused by
the action
NOTE Skip feature-centric representation on
textbook
15STRIPS actions Example
- STRIPS representation of the action pick up
coffee, PUC - preconditions Loc cs and RHC F
- effects RHC T
- STRIPS representation of the action deliver
coffee, DelC - preconditions Loc and RHC
- effects RHC and SWC
Note that Sam doesn't have to want coffee for Rob
to deliver it one way or another, Sam doesn't
want coffee after delivery.
16STRIPS Actions (cont)
- The STRIPS assumption
- all variables not explicitly changed by an action
stay unchanged
- So if the feature/variable V has value v after
the action a has been performed, what can we
conclude about a and/or the state of the world
immediately preceding the execution of a?
17Another Example The Blocks World
- Infinitely wide table, finite number of
childrens blocks - Ignore where a block is located on the table
- A block can sit on the table or on another block
- Want to move blocks from one configuration to
another - e.g.,
- initial state goal
a
d
b
c
c
e
a
b
18State Representation Symbols
- For five blocks, there are 36 propositions
- Here are 5 of them
- ontable-a - block a is on the table
- on-c-a - block c is on block a
- clear-c - block c has nothing on it
- holding-d - the robot hand is holding block d
- handempty - the robot hand isnt holding anything
- .
d
c
e
a
b
Limitations become clear when we think about the
actions.
19Set-Theoretic Actions
c
a
b
Fifty different actions Here are four of them
c
a
b
c
a
b
c
b
a
c
a
b
20Lecture Overview
- Recap
- Planning
- Example
- STRIPS a Feature-Based Representation
- Forward Planning
21Forward Planning
- Idea search in the state-space graph.
- The nodes represent the states
- The arcs correspond to the actions The arcs from
a state s represent all of the actions that are
legal in state s. (What actions are legal?) - A plan is a path from the state representing the
initial state to a state that satisfies the goal.
22Example state-space graph
23Lecture Summary
- Planning How to select and organize a sequence
of actions to achieve a given goal - Relying on the powerful representation of states
as a set of features/variables. (like CSPs) - Goal?
- Relying on sophisticated actions representation
- STRIPS preconditions and effects
- STRIPS assumption
- Propositional vs. relational representation
24Next class
Finish Planning (Chp 11)