Download Planning: STRIPS - Introduction to Artificial Intelligence - Slides | CS 1571 and more Study notes Computer Science in PDF only on Docsity!
CS 1571 Intro to AI M. Hauskrecht
CS 1571 Introduction to AI
Lecture 19
Milos Hauskrecht
milos@cs.pitt.edu
5329 Sennott Square
Planning: STRIPS
Competition results
Simulated annealing competition:
1. Nathaniel Wetzel
2. David Bradley
3. Francesco DeSensi
Extra credit ☺
CS 1571 Intro to AI M. Hauskrecht
Planning
Planning problem:
- find a sequence of actions that achieves some goal
- an instance of a search problem
- the state description is very complex
Methods for modeling and solving a planning problem:
- State space search
- Situation calculus based on FOL
- Typically Resolution refutation
Planning problems
Properties of (real-world) planning problems:
- The description of the state of the world is very complex
- Many possible actions to apply in any step
- Actions are typically local
- they affect only a small portion of a state description
- Goals are defined as conditions and refer only to a small
portion of state
- Plans consists of a long sequence of actions
- The state space search and situation calculus frameworks may
be too cumbersome and inefficient to represent and solve
planning problems
CS 1571 Intro to AI M. Hauskrecht
STRIPS planner
Defines a restricted FOL representation language as compared
to the situation calculus
Advantage: leads to more efficient planning algorithms.
- State-space search with structured representations of states,
actions and goals
- Action representation avoids the frame problem
STRIPS planning problem:
- much like a standard search problem
STRIPS planner
- States:
- conjunction of literals, e.g. On(A,B), On(B,Table), Clear(A)
- represent facts that are true at a specific point in time
- Actions (operators):
- Action: Move (x,y,z)
- Preconditions: conjunctions of literals with variables
On(x,y), Clear(x), Clear(z)
- Effects. Two lists:
- Add list: On(x,z), Clear(y)
- Delete list: On(x,y), Clear(z)
- Everything else remains untouched (is preserved)
CS 1571 Intro to AI M. Hauskrecht
STRIPS planning
Operator: Move (x,y,z)
- Preconditions: On(x,y), Clear(x), Clear(z)
- Add list: On(x,z), Clear(y)
- Delete list: On(x,y), Clear(z)
On ( B , C )
On ( A , Table )
On ( C , Table )
Clear ( A )
Clear ( B )
Clear ( C )
Clear ( Table )
On ( B , Table )
On ( A , Table )
On ( C , Table )
Clear ( A )
Clear ( B )
Clear ( Table )
unchanged
delete
add
Move ( B , Table , C )
A
B
A B C C
STRIPS planning
Initial state:
- Conjunction of literals that are true
Goals in STRIPS:
- A goal is a partially specified state
- Is defined by a conjunction of ground literals
- No variables allowed in the description of the goal
Example:
On(A,B) ∧ On(B,C)
CS 1571 Intro to AI M. Hauskrecht
Forward search (goal progression)
- Use operators to generate new states to search
- Check new states whether they satisfy the goal
Search tree:
Initial state A B C Move (^ B , Table , C ) Move ( A , Table , C ) Move ( A , Table , B )
Move ( A , Table , B )
C
B
A
goal
A
B
C
Forward search (goal progression)
- Use operators to generate new states to search
- Check new states whether they satisfy the goal
Search tree:
Initial state A B C Move (^ B , Table , C ) Move ( A , Table , C ) Move ( A , Table , B )
Move ( A , Table , B )
C
B
A
goal
A
B
C
Heuristics?
CS 1571 Intro to AI M. Hauskrecht
Backward search (goal regression)
Idea: Given a goal G
- Unify the add list of some operator a with a subset of G
- If the delete list of a does not remove elements of G , then the
goal regresses to a new goal G’ that is obtained from G by:
- deleting add list of a
- adding preconditions of a
Clear ( A ) On ( B , C )
Clear ( B )
On ( A , Table )
On ( A , B )
On ( C , Table )
precondition add
Move ( A , Table , B )
On ( B , C )
On ( C , Table )
New goal (G’) Goal (G)
Mapped from G
C
B
A
A
B
C
Backward search (goal regression)
- Use operators to generate new goals
- Check whether the initial state satisfies the goal
Search tree:
Initial state
A B C
Move ( B , Table , C ) Move ( A , Table , B )
C
B
A
goal
Move ( A , B , Table )
A
B
C
CS 1571 Intro to AI M. Hauskrecht
Sussman’s anomaly.
- An example from the blocks world in which the divide and
conquer fails due to interacting goals
A B
C
C
B
A
Initial state Goal
On ( B , C )
On ( A , B )
1. Assume we want to satisfy first
But now we cannot satisfy without undoing
Sussman’s anomaly
A B
C
B C
A
Initial state
On ( B , C )
On ( A , B )
On ( A , B )
CS 1571 Intro to AI M. Hauskrecht
1. Assume we want to satisfy first
But now we cannot satisfy without undoing
2. Assume we want to satisfy first.
But now we cannot satisfy without undoing
Sussman’s anomaly
A B
C
B C
A
Initial state
On ( B , C )
On ( A , B )
On ( B , C )
A B
C
Initial state
A
B
C
On ( A , B ) On ( B , C )
On ( A , B )
State space vs. plan space search
- An alternative to planning algorithms that search states
(configurations of world)
- Plan: Defines a sequence of operators to be performed
- Partial plan:
- plan that is not complete
- Some plan steps are missing
- some orderings of operators are not finalized
- Only relative order is given
- Benefits of working with partial plans:
- We do not have to build the sequence from the initial state or
the goal
- We do not have to commit to a specific action sequence
- We can work on sub-goals individually (divide and conquer)
CS 1571 Intro to AI M. Hauskrecht
Partial-order planners (POP)
- also called Non-linear planners
- Use STRIPS operators
Move(x,y,z) On(x,y) Clear(x) Clear(z)
On(x,z) Clear(y)
Graphical representation of an operator
Illustration of a POP on the Sussman’s anomaly case
preconditions
add list
Delete list is not shown !!!
Move(x,y,z)
Partial order planning. Start and finish.
Finish On(A,B) On(B,C)
Start
On(C,A) Clear(Fl) On(A,Fl) Clear(B) On(B,Fl) Clear(C)
C
B
A
Goal
A B
C
Start
CS 1571 Intro to AI M. Hauskrecht
Partial order planning. Start and finish.
Finish On(A,B) On(B,C)
Start
On(C,A) Clear(Fl) On(A,Fl)^ Clear(B)^ On(B,Fl)^ Clear(C)
Open conditions : conditions yet to be satisfied
C
B
A
Goal
A B
C
Start
Partial order planning. Add operator.
Finish On(A,B) On(B,C)
Start
On(C,A) Clear(Fl) On(A,Fl) Clear(B) On(B,Fl) Clear(C)
Move(A,y,B) Clear(A) On(A,y) Clear(B)
Clear(y) On(A,B)
C
B
A
Goal
We want to satisfy an open
condition
A B
C
Start
Always select an operator
that helps to satisfy one of the
open conditions
CS 1571 Intro to AI M. Hauskrecht
Partial order planning. Add link.
Finish On(A,B) On(B,C)
Start
On(C,A) Clear(Fl) Clear(C)^ On(A,Fl)^ Clear(B)^ On(B,Fl)
Move(A,Fl,B) Clear(A) On(A,Fl) Clear(B)
Clear(Fl) On(A,B)
C
B
A
Goal
A B
C
Start
Satisfies an open condition
instantiates y/Fl
Partial order planning. Add operator.
Finish On(A,B) On(B,C)
Start
On(C,A) Clear(Fl) Clear(C)
Move(A,Fl,B) Clear(A) On(A,Fl) Clear(B)
Clear(Fl) On(A,B) Move(B,y,C) Clear(B) On(B,y) Clear(C)
Clear(y) On(B,C)
On(A,Fl) Clear(B) On(B,Fl) A B
C
Start
C
B
A
Goal
CS 1571 Intro to AI M. Hauskrecht
Partial order planning. Add links.
Finish On(A,B) On(B,C)
Start
On(C,A) Clear(Fl) Clear(C)
Move(A,Fl,B) Clear(A) On(A,Fl) Clear(B)
Clear(Fl) On(A,B) Move(B,Fl,C) Clear(B) On(B,Fl) Clear(C)
Clear(Fl) On(B,C)
On(A,Fl) Clear(B) On(B,Fl) A B
C
Start
C
B
A
Goal
Partial order planning. Interactions.
Finish On(A,B) On(B,C)
Start
On(C,A) Clear(Fl) Clear(C)
Move(A,Fl,B) Clear(A) On(A,Fl) Clear(B)
Clear(Fl) On(A,B) Move(B,Fl,C) Clear(B) On(B,Fl) Clear(C)
Clear(Fl) On(B,C)
On(A,Fl) Clear(B) On(B,Fl) A B
C
Start
C
B
A
Goal
Deletes Clear(B)
A was stacked on B
CS 1571 Intro to AI M. Hauskrecht
Partial order planning. Add links.
Finish On(A,B) On(B,C)
Start
On(C,A) Clear(Fl) Clear(C)
Move(A,Fl,B) Clear(A) On(A,Fl) Clear(B)
Clear(Fl) On(A,B)
Move(C,A,Fl) On(C,A) (^) Clear(C) Clear(Fl)
Clear(A) On(C,Fl)
Move(B,Fl,C) Clear(B) On(B,Fl) Clear(C)
Clear(Fl) On(B,C)
On(A,Fl) Clear(B) On(B,Fl) A B
C
Start
C
B
A
Goal
Partial order planning. Threats.
Finish On(A,B) On(B,C)
Start
On(C,A) Clear(Fl) Clear(C)
Move(A,Fl,B) Clear(A) On(A,Fl) Clear(B)
Clear(Fl) On(A,B)
Move(C,A,Fl) On(C,A) Clear(C) Clear(Fl)
Clear(A) On(C,Fl)
Move(B,Fl,C) Clear(B) On(B,Fl) Clear(C)
Clear(Fl) On(B,C)
A B
C
Start
On(A,Fl) Clear(B) On(B,Fl)
C
B
A
Goal
Deletes Clear(C)
B moved on top of C
CS 1571 Intro to AI M. Hauskrecht
Partial order planning. Order operators.
Finish On(A,B) On(B,C)
Start
On(C,A) Clear(Fl) Clear(C)
Move(A,Fl,B) Clear(A) On(A,Fl) Clear(B)
Clear(Fl) On(A,B)
Move(C,A,Fl) On(C,A) (^) Clear(C) Clear(Fl)
Clear(A) On(C,Fl)
Move(B,Fl,C) Clear(B) On(B,Fl) Clear(C)
Clear(Fl) On(B,C)
On(A,Fl) Clear(B) On(B,Fl) A B
C
Start
C
B
A
Goal
POP planning. Directions.
Finish On(A,B) On(B,C)
Start
On(C,A) Clear(Fl) Clear(C)
Move(A,Fl,B) Clear(A) On(A,Fl) Clear(B)
Clear(Fl) On(A,B)
Move(C,A,Fl) On(C,A) Clear(C) Clear(Fl)
Clear(A) On(C,Fl)
Move(B,Fl,C) Clear(B) On(B,Fl) Clear(C)
Clear(Fl) On(B,C)
On(A,Fl) Clear(B) On(B,Fl) A B
C
Start
C
B
A
Goal