Title: Early AI Planning: Shakey the Robot
1Early AI Planning Shakey the Robot
- First mobile robot to reason about its actions
- Stanford Research Institute AI Center, early
1970s - Currently resides in the Computer History Museum
- 2004 Inducted into the Robot Hall of Fame at CMU
To place the blue block on top of the red block
(1) push the red block against the back of the
ramp and (2) push the blue block up the ramp and
onto the red block
Shakey
2Shakeys World
3STRIPS Planning with if-add-delete Operators
Operator 1 Move block x from block y to block
z If ON(x,y), CLEAR(x), CLEAR(z) Add ON(x,z),
CLEAR(y) Delete ON(x,y), CLEAR(z)
Operator 2 Move block x from block y to
table If ON(x,y), CLEAR(x) Add ON(x,table),
CLEAR(y) Delete ON(x,y)
Goals ON(A,B) ON(B,C)
Operator 3 Move block x from table to block
z If ON(x,table), CLEAR(x), CLEAR(z) Add ON(x,z)
Delete ON(x,table), CLEAR(z)
4Planning as Search
Try every possible operator sequence, using
breadth-first search
forward chaining of if-add-delete rules
Why is this a bad approach?
5Backward Chaining from Goals
Goals ON(A,B) ON(B,C)
Establishes links are drawn from an Add condition
of an instantiated operator to a Goal condition
or precondition
The operator that establishes an assertion must
appear in the final plan before the operator that
needs the assertion
6Achieving Multiple Goals
Top partial plan to achieve ON(A,B)
Bottom add Operator 3 to achieve ON(B,C)
Problem one operator may remove a condition
needed for another operator represented by a
threatens link
Operator 2 must appear before Operators 1 and 3
in the plan, but
Can we complete a workable plan??
7Considering Alternatives
Back up and consider a different partial plan to
achieve ON(A,B)
Try moving blocks A and D onto the table first,
and then move A on B
8Proceeding with Second Goal
Top use Operator 3 again to achieve ON(B,C)
Bottom check whether the preconditions of
Operator 3 can be established
What does the new threatens link imply?
9Adding Before Links to the Plan
Plan 1 Move A to the table Move D to the
table Move B to C Move A to B
Plan 2 Move D to the table Move A to the
table Move B to C Move A to B
10Final Planning Algorithm
To construct a plan, extend a partial plan
containing no operators until a satisfactory
complete plan is discovered
- To extend a partial plan
- If the plan has a Before loop, announce failure
- If the plan is a complete plan, announce success
- If there is an operator that threatens an
Establishes link between operators O1 and O2,
call the threat Ot and do one of the following - Place a Before link from Ot to O1 and extend the
plan - Place a Before link from O2 to Ot and extend the
plan - Otherwise, pick an unsatisfied prerequisite and
do one of the following - Find an existing operator that adds the
unsatisfied prerequisite, add an Establishes
link, and extend the plan - Instantiate and add an operator that adds the
unsatisfied prerequisite and extend the plan
11Store New Plan for Future Use