Artificial Intelligence 3451: UNIT: 05 Planning and Reasoning
Artificial Intelligence 3451: UNIT: 05 Planning and Reasoning
UNIT: 05
Planning and Reasoning
Lecture: 12
STRIPS language
States = conjunctions of function-free ground literals
Goals = same thing, but can also have variables (assumed to be
existentially quantified)
STRIPS Representation for Actions
Start at home
Goal = return home with milk, bananas, and drill
Only add steps that achieve an unachieved precondition ->
Reduces search space
Causal links help prune bad plans quickly, before going
too far down the dead end
Example
Example
Example
Situation Calculus
Formalization of actions in first-order logic (McCarthy & Hayes, 1969).
Search performed by logical inference.
Situations are logical terms denoting states of the world.
Actions and facts are represented as logical terms called fluents.
puton(A,B): The action of putting block A on block B.
on(A,B): The proposition that block A is on block B.
Propositional fluents are asserted to be true in a particular
state by using the predicate: holds
holds(on(A,B), s): A is on B in situation s
Situations resulting from performing an action in another situation are
represented using the function: result
result(puton(A,B), s): The situation resulting from putting A on B in
situation s.
An example – Blocks world
Blocks on a table
Can be stacked, but only one block on top of another
A robot arm can pick up a block and movie to another
position
On the table
On another block
Arm can pick up only one block at a time
Cannot pick up a block that has another one on it
19/34 AI Lecture 17
Representation language
STRIPS (Fikes & Nilsson, 1971)
One of the first planning systems
Robotics
See it in action at
http://www.ai.sri.com/movies/Shakey.ram
Main contribution is its language description formalism
Many variants/extensions
20/34 AI Lecture 17
STRIPS
State is a conjunction of positive ground literals
On(B, Table) Λ Clear (A)
Goal is a conjunction of positive ground literals
Clear(A) Λ On(A,B) Λ On(B, Table)
Action schema
Conjunction of positive literals as preconditions
Conjunction of positive and negative literals as effects
21/34 AI Lecture 17
More on action schema
23/34 AI Lecture 17
STRIPS expressiveness
Literals are function free: Move (Block(x), y, z)
Any action scheme can be propositionalized
Move(b,x,y) and 3 blocks and table can be expressed as 48 purely
propositional actions
No disjunctive goals: On(B, Table) V On(B, C)
No conditional effects: On(B, Table) if ¬On(A, Table)
In original STRIPS, no equality: x ≠ y
Ramification – esp. in more complex domain
24/34 AI Lecture 17
Forward state-space search (1)
Progression
Initial state: initial state of the problem
Actions:
Applied to a state if all the preconditions are satisfied
Succesor state is built by updating KB with add and delete lists
Goal test: state satisfies the goal of the problem
25/34 AI Lecture 17
Forward search in the Blocks world
26/34 AI Lecture 17
Forward state-space search (2)
Advantages
No functions in the declarations of goals
search state is finite
Sound
Complete (if algorithm used to do the search is complete)
Limitations
Irrelevant actions not efficient
Need heuristic or prunning procedure
27/34 AI Lecture 17
Backward state-space search (1)
Regression
Initial state: goal state of the problem
Actions:
Choose an action that
Is relevant; has one of the goal literals in its effect set
Is consistent; does not negate another literal
Construct new search state
Remove all positive effects of A that appear in goal
Add all preconditions, unless already appears
Goal test: state is the initial world state
28/34 AI Lecture 17
Backward state-space search (2)
Possible because of STRIPS-like language
Goals are listed
Predecessors are listed for each action/state
Advantages
Consider only relevant actions much smaller branching
factor
Ways to reduce even more the branching factors
Limitations
Still need heuristic to be more efficient
29/34 AI Lecture 17
Heuristics for state-space search (1)
Valid both for forward and backward searches
Valid for many planning problems
Possible approaches
Divide and conquer
Derive a relaxed problem
Combine both
30/34 AI Lecture 17
Heuristics for state-space search (2)
Divide and conquer
Subgoal independence assumption
What if there are negative interactions between the subgoals of the
problems?
What if there are redundant actions in the subgoals?
Derive a relaxed problem
Remove all preconditions from the actions
Remove all negative effects from the actions
(empty delete list)
31/34 AI Lecture 17
Limitation of state-space search
Linear planning or Total order planning
Example
Initial state: all the blocks are clear and on the table
Goal: On(A,B) ∧ On(B,C)
If search achieves On(A,B) first, then needs to undo it in order
to achieve On(B,C)
Have to go through all the possible permutations of the
subgoals
32/34 AI Lecture 17