Russell and Norvig: Chapter 11 - PowerPoint PPT Presentation

About This Presentation
Title:

Russell and Norvig: Chapter 11

Description:

But isn't it exactly the same goal as for problem solving? ... Backward Chaining. ON(B,A), ON(C,B) Stack(C,B) ON(B,A), HOLDING(C), CLEAR(B) A. B. C ... – PowerPoint PPT presentation

Number of Views:368
Avg rating:3.0/5.0
Slides: 41
Provided by: JeanClaud80
Category:

less

Transcript and Presenter's Notes

Title: Russell and Norvig: Chapter 11


1
Planning
  • Russell and Norvig Chapter 11
  • Russell and Norvig Chapter 11
  • CS121 Winter 2003

2
Planning Agent
3
Goal of Planning
  • Choose actions to achieve a certain goal
  • But isnt it exactly the same goal as for problem
    solving?
  • Some difficulties with problem solving
  • The successor function is a black box it must be
    applied to a state to know which actions are
    possible in that state and what are the effects
    of each one
  • Suppose that the goal is HAVE(MILK).
  • From some initial state where HAVE(MILK) is not
    satisfied, the successor function must be
    repeatedly applied to eventually generate a
    state where HAVE(MILK) is satisfied.
  • An explicit representation of the possible
    actions and their effects would help the problem
    solver select the relevant actions

Otherwise, in the real world an agent would be
overwhelmed by irrelevant actions
4
Goal of Planning
  • Choose actions to achieve a certain goal
  • But isnt it exactly the same goal as for problem
    solving?
  • Some difficulties with problem solving
  • The goal test is another black-box function,
    states are domain-specific data structures, and
    heuristics must be supplied for each new problem

Suppose that the goal is HAVE(MILK)?HAVE(BOOK) Wi
thout an explicit representation of the goal,
theproblem solver cannot know that a state
whereHAVE(MILK) is already achieved is more
promisingthan a state where neither HAVE(MILK)
norHAVE(BOOK) is achieved
5
Goal of Planning
  • Choose actions to achieve a certain goal
  • But isnt it exactly the same goal as for problem
    solving?
  • Some difficulties with problem solving
  • The goal may consist of several nearly
    independent subgoals, but there is no way for the
    problem solver to know it

HAVE(MILK) and HAVE(BOOK) may be achieved bytwo
nearly independent sequences of actions
6
Representations in Planning
  • Planning opens up the black-boxes by using
    logic to represent
  • Actions
  • States
  • Goals

One possible language STRIPS
7
State Representation
Conjunction of propositions BLOCK(A), BLOCK(B),
BLOCK(C), ON(A,TABLE), ON(B,TABLE), ON(C,A),
CLEAR(B), CLEAR(C), HANDEMPTY
8
Goal Representation
Conjunction of propositions ON(A,TABLE),
ON(B,A), ON(C,B)
The goal G is achieved in a state S if all the
propositions in G are also in S
9
Action Representation
  • Unstack(x,y)
  • P HANDEMPTY, BLOCK(x), BLOCK(y),
    CLEAR(x), ON(x,y)
  • E ?HANDEMPTY, ?CLEAR(x), HOLDING(x), ?
    ON(x,y), CLEAR(y)

10
Example
BLOCK(A), BLOCK(B), BLOCK(C), ON(A,TABLE),
ON(B,TABLE), ON(C,A), CLEAR(B), CLEAR(C),
HANDEMPTY
  • Unstack(C,A)
  • P HANDEMPTY, BLOCK(C), BLOCK(A),
    CLEAR(C), ON(C,A)
  • E ?HANDEMPTY, ?CLEAR(C), HOLDING(C), ?
    ON(C,A), CLEAR(A)

11
Example
C
BLOCK(A), BLOCK(B), BLOCK(C), ON(A,TABLE),
ON(B,TABLE), ON(C,A), CLEAR(B), CLEAR(C),
HANDEMPTY, HOLDING(C), CLEAR(A)
A
B
  • Unstack(C,A)
  • P HANDEMPTY, BLOCK(C), BLOCK(A),
    CLEAR(C), ON(C,A)
  • E ?HANDEMPTY, ?CLEAR(C), HOLDING(C), ?
    ON(C,A), CLEAR(A)

12
Action Representation
  • Unstack(x,y)
  • P HANDEMPTY, BLOCK(x), BLOCK(y), CLEAR(x),
    ON(x,y)
  • E ?HANDEMPTY, ?CLEAR(x), HOLDING(x), ?
    ON(x,y), CLEAR(y)
  • Stack(x,y)
  • P HOLDING(x), BLOCK(x), BLOCK(y), CLEAR(y)
  • E ON(x,y), ?CLEAR(y), ?HOLDING(x), CLEAR(x),
    HANDEMPTY
  • Pickup(x)
  • P HANDEMPTY, BLOCK(x), CLEAR(x), ON(x,TABLE)
  • E ?HANDEMPTY, ?CLEAR(x), HOLDING(x),
    ?ON(x,TABLE)
  • PutDown(x)
  • P HOLDING(x)
  • E ON(x,TABLE), ?HOLDING(x), CLEAR(x), HANDEMPTY

13
Forward Planning
Forward planning searches a space of word states
In general, many actions are applicableto a
state ? huge branching factor
14
Relevant Action
  • An action is relevant to a goal if one of its
    effects matched a goal proposition
  • Stack(B,A)
  • P HOLDING(B), BLOCK(A), CLEAR(A)
  • E ON(B,A), ?CLEAR(A), ?HOLDING(B),
    CLEAR(B), HANDEMPTY
  • is relevant to ON(B,A), ON(C,B)

15
Regression of a Goal
  • The regression of a goal G through an
  • action A is the weakest precondition
  • RG,A such that
  • If a state S satisfies RG,A then
  • The precondition of A is satisfied in S
  • Applying A to S yields a state that satisfies G

16
Example
  • G ON(B,A), ON(C,B)
  • Stack(C,B)
  • P HOLDING(C), BLOCK(C), BLOCK(B), CLEAR(B)
  • E ON(C,B), ?CLEAR(B), ?HOLDING(C),
    CLEAR(C), HANDEMPTY
  • RG,Stack(C,B) ON(B,A), HOLDING(C), BLOCK(C),
    BLOCK(B), CLEAR(B)

17
Example
  • G CLEAR(B), ON(C,B)
  • Stack(C,B)
  • P HOLDING(C), BLOCK(C), BLOCK(B), CLEAR(B)
  • E ON(C,B), ?CLEAR(B), ?HOLDING(C),
    CLEAR(C), HANDEMPTY
  • RG,Stack(C,B) False

18
Computation of RG,A
  • If any element of G is deleted by A then return
    False
  • G ? Precondition of A
  • For every element SG of G do
  • If SG is not added by A then add SG to G
  • Return G

19
Inconsistent Regression
Inconsistency rules HOLDING(x) ? ON(y,x) ?
False HOLDING(x) ? ON(x,y) ? False HOLDING(x) ?
HOLDING(y) ? False Etc
  • G ON(B,A), ON(C,B)
  • Stack(B,A)
  • P HOLDING(B), BLOCK(A), CLEAR(A)
  • E ON(B,A), ?CLEAR(A), ?HOLDING(B),
    CLEAR(B), HANDEMPTY
  • RG,Stack(B,A) HOLDING(B), BLOCK(A), CLEAR(A),
    ON(C,B)

20
Computation of RG,A
  • If any element of G is deleted by A then return
    False
  • G ? Precondition of A
  • For every element SG of G do
  • If SG is not added by A then add SG to G
  • If an inconsistency rule applies to G then
    return False
  • Return G

21
Backward Chaining
ON(B,A), ON(C,B)
Stack(C,B)
ON(B,A), HOLDING(C), CLEAR(B)
In general, there are much fewer actions
relevant to a goal than there are actions
applicable to a state ? smaller branching
factor than with forward planning
22
Backward Chaining
ON(B,A), ON(C,B)
Stack(C,B)
ON(B,A), HOLDING(C), CLEAR(B)
Backward planning searches a space of goals
23
Nonlinear Planning
  • Both forward and backward planning methods commit
    to a total ordering on the selected actions
  • Drawback They do not take advantage of possible
    (near) independence among subgoals
  • Nonlinear planning No unnecessary ordering among
    subgoals

24
Nonlinear Planning
P - ON(A,TABLE) ON(B,TABLE)
ON(C,A) CLEAR(B) CLEAR(C)
HANDEMPTY
P ON(B,A) ON(C,B) -
25
P HOLDING(B) CLEAR(A) - CLEAR(A)
HOLDING(B) ON(B,A) CLEAR(B) HANDEMPTY
Stack(B,A)
P - ON(A,TABLE) ON(B,TABLE)
ON(C,A) CLEAR(B) CLEAR(C)
HANDEMPTY
P ON(B,A) ON(C,B) -
26
P HOLDING(B) CLEAR(A) - CLEAR(A)
HOLDING(B) ON(B,A) CLEAR(B) HANDEMPTY
Stack(B,A)
Stack(C,B)
P - ON(A,TABLE) ON(B,TABLE)
ON(C,A) CLEAR(B) CLEAR(C)
HANDEMPTY
P ON(B,A) ON(C,B) -
P HOLDING(C) CLEAR(B) - CLEAR(B)
HOLDING(C) ON(C,B) CLEAR(C) HANDEMPTY
27
Stack(B,A)
Nonlinear planning searches a plan space
Stack(C,B)
P - ON(A,TABLE) ON(B,TABLE)
ON(C,A) CLEAR(B) CLEAR(C)
HANDEMPTY
P ON(B,A) ON(C,B) -
Pickup(C)
28
Pickup(B)
Stack(B,A)
Stack(C,B)
P - ON(A,TABLE) ON(B,TABLE)
ON(C,A) CLEAR(B) CLEAR(C)
HANDEMPTY
P ON(B,A) ON(C,B) -
P CLEAR(B)
Pickup(C)
29
Pickup(B)
P CLEAR(B)
Stack(B,A)
Stack(C,B)
P - ON(A,TABLE) ON(B,TABLE)
ON(C,A) CLEAR(B) CLEAR(C)
HANDEMPTY
P ON(B,A) ON(C,B) -
P CLEAR(B)
Pickup(C)
30
Pickup(B)
A consistent plan is one in whichthere is no
cycle and no conflictbetween achievers and
threats
A conflict can be eliminatedby constraining the
orderingamong the actions or by adding new
actions
Stack(B,A)
Stack(C,B)
P - ON(A,TABLE) ON(B,TABLE)
ON(C,A) CLEAR(B) CLEAR(C)
HANDEMPTY
P ON(B,A) ON(C,B) -
Note the similarity withconstraint propagation
Pickup(C)
31
Pickup(B)
P HANDEMPTY
Stack(B,A)
Stack(C,B)
P - ON(A,TABLE) ON(B,TABLE)
ON(C,A) CLEAR(B) CLEAR(C)
HANDEMPTY
P ON(B,A) ON(C,B) -
Pickup(C)
32
Pickup(B)
P HANDEMPTY
Stack(B,A)
Stack(C,B)
P - ON(A,TABLE) ON(B,TABLE)
ON(C,A) CLEAR(B) CLEAR(C)
HANDEMPTY
P ON(B,A) ON(C,B) -
Pickup(C)
P HANDEMPTY
33
Most-constrained-variableheuristic in CSP?
choose the unachieved precondition that can
be satisfied in the fewest number of
ways ? ON(C,TABLE)
Pickup(B)
P HANDEMPTY CLEAR(B) ON(B,TABLE)
Stack(B,A)
P HOLDING(B) CLEAR(A)
Stack(C,B)
P - ON(A,TABLE) ON(B,TABLE)
ON(C,A) CLEAR(B) CLEAR(C)
HANDEMPTY
P ON(B,A) ON(C,B) -
P HOLDING(C) CLEAR(B)
Pickup(C)
P HANDEMPTY CLEAR(C) ON(C,TABLE)
34
Pickup(B)
Stack(B,A)
Stack(C,B)
P - ON(A,TABLE) ON(B,TABLE)
ON(C,A) CLEAR(B) CLEAR(C)
HANDEMPTY
P ON(B,A) ON(C,B) -
Pickup(C)
Putdown(C)
35
Pickup(B)
Stack(B,A)
Stack(C,B)
P - ON(A,TABLE) ON(B,TABLE)
ON(C,A) CLEAR(B) CLEAR(C)
HANDEMPTY
P ON(B,A) ON(C,B) -
Unstack(C,A)
Pickup(C)
Putdown(C)
36
Pickup(B)
P HANDEMPTY
Stack(B,A)
Stack(C,B)
P - ON(A,TABLE) ON(B,TABLE)
ON(C,A) CLEAR(B) CLEAR(C)
HANDEMPTY
P ON(B,A) ON(C,B) -
Unstack(C,A)
Pickup(C)
Putdown(C)
37
Pickup(B)
Stack(B,A)
Stack(C,B)
P - ON(A,TABLE) ON(B,TABLE)
ON(C,A) CLEAR(B) CLEAR(C)
HANDEMPTY
P ON(B,A) ON(C,B) -
Unstack(C,A)
Pickup(C)
Putdown(C)
38
Pickup(B)
P HANDEMPTY CLEAR(B) ON(B,TABLE)
The plan is complete because every precondition
of every step is addedby some previous step, and
no intermediate step deletes it
Stack(B,A)
P HOLDING(B) CLEAR(A)
P HANDEMPTY CLEAR(C) ON(C,A)
Stack(C,B)
P - ON(A,TABLE) ON(B,TABLE)
ON(C,A) CLEAR(B) CLEAR(C)
HANDEMPTY
P ON(B,A) ON(C,B) -
Unstack(C,A)
P HOLDING(C) CLEAR(B)
Pickup(C)
Putdown(C)
P HANDEMPTY CLEAR(C) ON(C,TABLE)
P HOLDING(C)
39
Applications of Planning
  • Military operations
  • Construction tasks
  • Machining tasks
  • Mechanical assembly
  • Design of experiments in genetics
  • Command sequences for satellite

Most applied systems use extended representation
languages, nonlinear planning techniques, and
domain-specificheuristics
40
Summary
  • Representations in planning
  • Representation of action
    preconditions effects
  • Forward planning
  • Regression of a goal
  • Backward planning
  • Nonlinear planning
Write a Comment
User Comments (0)
About PowerShow.com