Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Overview
The blocks world
B C B
A C D A D
start goal
2
Overview
3
Overview
4
Overview
5
Overview
6
The Blocks World
B C B
A C D A D
start goal
7
The Blocks World
Actions:
8
The Blocks World
Specification of actions:
Specification of actions:
STACK(x, y):
P: CLEAR(y) HOLDING(x)
D: CLEAR(y) HOLDING(x)
A: ARMEMPTY ON(x, y)
UNSTACK(x, y):
P: ON(x, y) CLEAR(x) ARMEMPTY
D: ON(x, y) ARMEMPTY
A: HOLDING(x) CLEAR(y)
11
The Blocks World
Specification of actions:
PICKUP(x):
P: CLEAR(x) ONTABLE(x) ARMEMPTY
D: ONTABLE(x) ARMEMPTY
A: HOLDING(x)
PUTDOWN(x):
P: HOLDING(x)
D: HOLDING(x)
A: ONTABLE(x) ARMEMPTY
12
The Blocks World
B C B
A C D A D
13
Goal Stack Planning
Goal stack planning is one of the most basic and earliest planning techniques.
1) Goals
Each sub-goal is solved separately and then the conjoined sub-goal is solved.
For example,
Goal Stack Planning
Stack Database
Goals
Current situation
Operators to
+ Specification of
satisfy
Operators/Actions
the Goals
15
Goal Stack Planning
16
Goal Stack Planning
B C B
A C D A D
17
Goal Stack Planning
Initial State: ON(B, A) ^ ONT(C) ^ ONT(A) ^ ONT(D) ^ CL(B) ^CL(C) ^ CL(D) ^ AE
Goal stack:
ON(C,A)
ON(B,D)
ON(C,A)^ ON(B,D)^ ONT(A) ^ ONT(D) ^ CL(C) ^ CL(B) ^ AE
Goal Stack:
S (C, A)
ON(B, D)
ON(C, A) ^ ON(B, D) ^ ONT(A) ^ ONT(D) ^ CL(C) ^ CL(B) ^ AE
S(C, A) can be applied if its preconditions are true. So add its preconditions on the stack.
Goal Stack Planning
Goal Stack:
ON(B, A) B
CL(B) Preconditions of UNSTACK
AE A C D
ON(B, A) ^ CL(B) ^ AE
US(B, A) Operator
HOLD(C) Preconditions of STACK C B
CL(A) ) ^ HOLD(C) A D
S (C, A) Operator
ON(B, D)
ON(C, A) ^ ON(B, D) ^ ONT(A) ^ ONT(D) ^ CL(C) ^ CL(B) ^ AE
ON(B, A), CL(B) and AE are all true in an initial state, so pop these along with its
compound goal.
Next pop top operator US(B, A) and produce new state by using its ADD and DELETE
lists.
Add US(B, A) in a queue of a sequence of operators.
SQUEUE = US (B, A)
State_1:
ONT(A) ^ONT(C) ^ ONT(D) ^ HOLD(B) ^CL(A) ^ CL(C) ^ CL(D)
Goal Stack Planning
Goal Stack:
S (C, A) Operator
ON(B, D)
S(B,D) Operator
HOLD(C)
CL(A) ) ^ HOLD(C) Preconditions of STACK
S (C, A) Operator
ON(B, D)
ON(C, A) ^ ON(B, D) ^ ONT(A) ^ ONT(D) ^ CL(C) ^ CL(B) ^ AE
Write down the preconditions of S(B, D)
Goal Stack Planning
Goal Stack
CL (D) ^ HOLD (B) Preconditions of STACK
S(B,D) Operator
HOLD(C)
CL(A) ) ^ HOLD(C) Preconditions of STACK
S (C, A) Operator
ON(B, D)
ON(C, A) ^ ON(B, D) ^ ONT(A) ^ ONT(D) ^ CL(C) ^ CL(B) ^ AE
Add S(B, D) in a queue of a sequence of operators.
CLEAR(A) ON(B, A)
HOLDING(C) OTACD
CLEAR(A) HOLDING(C) ARMEMPTY
STACK(C, A)
ON(B, D)
ON(C, A) ON(B, D) OTAD
25
Goal Stack Planning
Plan
1. UNSTACK(B, A)
2. STACK(B, D)
3. PICKUP(C)
4. STACK(C, A)
26
Goal Stack Planning
A
C B
A B C
28
Goal Stack Planning
Plan
1. UNSTACK(C, A)
2. PUTDOWN(C)
3. PICKUP(A)
4. STACK(A, B)
5. UNSTACK(A, B)
6. PUTDOWN(A)
7. PICKUP(B)
8. STACK(B, C)
9. PICKUP(A)
10. STACK(A, B)
29
Questions
30
Linear vs. Non-Linear Planning
31