Ch.10 Classical Planning: Actionp

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

Ch.

10 Classical Planning
Initidcondition
God
Precond
Actionp ③
Effect
Classical Planning
10.1. Definition of Classical Planning
10.1.1. Example: Air cargo transport
10.1.2. Example: The spare tire problem
10.1.3. Example: The blocks world
10.1.4. The complexity of classical planning
10.2. Algorithms for Planning as State-Space Search
10.2.1. Forward (progression) state-space search
10.2.2. Backward (regression) relevant-states search
10.2.3. Heuristics for planning
Classical Planning
10.3. Planning Graphs
10.3.1. Planning graphs for heuristic estimation
10.3.2. The Graphplan algorithm
10.3.3. Termination of Graphplan
10.4. Other Classical Planning Approaches
10.4.1. Classical planning as Boolean satisfiability
10.4.2. Planning as first-order logical deduction: Situation calculus
10.4.3. Planning as constraint satisfaction
10.4.4. Planning as refinement of partially ordered plans
10.5. Analysis of Planning Approaches
Planning
• Search-based problem-solving agent (Chapter 3)
– finding sequences of actions that result in a goal state
– dealing with atomic representations of states and thus needs good domain-specific
heuristics to perform well
• Hybrid logical agent (Chapter 7)
– finding plans without domain-specific heuristics because it uses domain-independent
heuristics based on the logical structure of the problem
– relying on ground (variable-free) propositional inference
• This chapter
– planning problems that scales up to problems that could not be handled by those earlier
approaches
– Factored representation: PDDL (the Planning Domain Definition Language)
PDDL
• Four things to define a search problem
– states Conjunctionofground function
:
,
-
lessatoms

– actions that are available in a state


– result of applying an action
– goal test
PDDL
• Four things to define a search problem
– states
• Hapless agent: Poor ∧ Unknown
• Package delivery problem: At(Truck 1, Melbourne) ∧ At(Truck 2, Sydney)
– actions that are available in a state
– result of applying an action
– goal test
PDDL
• Four things to define a search problem
– states
– actions that are available in a state
• ACTIONS(s) and RESULT(s, a) functions
– specifying the result of an action in terms of what changes; everything that stays the same is left
unmentioned
• Action schema for flying a plane from one location to another
– Action(Fly(p, from, to),
PRECOND: At(p, from) ∧ Plane(p) ∧ Airport(from) ∧ Airport(to)
EFFECT: ¬At(p, from) ∧ At(p, to))
– Precondition and effect
• Ground action
– Action(Fly(P1, SFO, JFK),
PRECOND: At(P1, SFO) ∧ Plane(P1) ∧ Airport(SFO) ∧ Airport(JFK)
EFFECT: ¬At(P1, SFO) ∧ At(P1, JFK))
– result of applying an action
– goal test
PDDL
• Four things to define a search problem
– states
– actions that are available in a state
– result of applying an action
• result of executing action a in state s is defined as a state s’
• RESULT(s, a) = (s - DEL(a)) ∪ ADD(a)
• action Fly(P1, SFO, JFK)
– remove At(P1, SFO)
– add At(P1, JFK)
– goal test
• precondition: a conjunction of literals (positive or negative) that may contain variables
• At(p, SFO) ∧ Plane(p) solved by
– Rich ∧ Famous ∧ Miserable entails the goal Rich ∧ Famous
– Plane(Plane1) ∧ At(Plane1, SFO) entails the goal At(p, SFO) ∧ Plane(p)
PDDL Description of an Air Cargo
Transportation
Figure 10.1
(p.369)

gii

enrnnni
Example: Air Cargo Transport
• Problem in three actions
– Load, Unload, Fly
• Actions to affect two predicates
– In(c,p) and At(x,a)
• Planes flying from one airport to another
– [Load(C1, P1, SFO), Fly(P1, SFO, JFK ), Unload(C1, P1, JFK ),
Load(C2, P2, JFK ), Fly(P2, JFK , SFO), Unload(C2, P2, SFO)] .
– Spurious action: Fly(P1, JFK, JFK )
– No-op: At(P1, JFK ) ∧ ¬At(P1, JFK ))
Example: the Spare Tire Problem
Figure 10.2
(p.370)

[Remove(Flat, Axle),
Remove(Spare, Trunk),
PutOn(Spare, Axle)]
Figure 10.4 Example: the Blocks World
(p.371)
Example: the Blocks World
• A set of cube-shaped blocks sitting on a table.
• Blocks can be stacked, but only one block can fit directly on top of
another
• A robot arm can
– pick up a block and
– Move it to another position, either on the table or on top of another block.
• The arm can pick up only one block at a time, so it cannot pick up a
block that has another one on it.
• The goal will always be to build one or more stacks of blocks,
specified in terms of what blocks are on top of what other blocks.
Figure 10.3 Example: the Blocks World
(p.371)

上⾯ 沒
bloeklnirrnenien
hrrnennn

[MoveToTable(C, A), Move(B, Table, C), Move(A, Table, B)]


Blocks World

A D
C
B E
E
C F
TABLE
Available Operations
• Grip/Release
• Move

• Any constraints?
– Grip A
– Grip B A
B
C
Blocks World (cont.)
• Rules
– Move-Directly Move block ?u onto of block ?l when ?u and ?l are both the top
blocks of their own stack
– Clear-Upper-Block move block ?a to the floor when ?a is on top of block ?x,
where ?x will be moved to the top of some block
– Clear-Lower-Block move block ?a to the floor when ?a is on block ?x, where
anther block will be placed on top of ?x
– Move-to-Floor Move block ?u on top of the floor when ?u is the top block in its
stack.
Blocks World

A D
C
B E
E
C F
TABLE
Blocks World

A D E
B E C
C F
TABLE
Blocks World

G H
A D E
B E C
C F
TABLE
Navigation System
• Path planning
• Components
– Cities
– Streets
–…
• Purpose
– Start  Goal
– Collection of street segments
More Information
• Nice online course on AI Planning:
– http://bit.ly/aiplanmooc
– http://www.aiai.ed.ac.uk/project/plan/ooc
• Planning competitions & demo
– http://www.icaps-conference.org/index.php/Main/Competitions
– http://aispace.org/planning/
– http://pages.cs.wisc.edu/~dyer/cs540/demos.html
• Good readings and interesting discussion:
– http://www.sciencedirect.com/science/book/9781558608566
– http://www.cs.cmu.edu/~reids/planning/readings.html
– https://www.jair.org/media/1141/live-1141-2152-jair.pdf
– http://web.stanford.edu/class/cs227/Readings/PDDLPlanningForArcadeGamePlaying.pdf
– http://web.stanford.edu/class/cs227/Readings/PlanningPhotoCopiers.pdf
– http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=6807834
– http://www.cs.uakron.edu/~xiao/game/AI.ppt
Figure 10.5 Forward and Backward Search
(p.373)

Forward

Backward
Summary
• Planning systems are problem-solving algorithms that operate
on explicit propositional or relational representations of states
and actions.
• PDDL, the Planning Domain Definition Language, describes the
initial and goal states as conjunctions of literals, and actions in
terms of their preconditions and effects.
• State-space search can operate in the forward direction
(progression) or the backward direction (regression).
Discussion

You might also like