Plan Recognition Example

advertisement
'
$
Plan Recognition
'
$
Example
“Generalized Plan Recognition” (Kautz&Allen 1986)
• Plan recognition: lies in identification of a minimal
set of top-level actions sufficient to explain the set of
observed actions
increase-power
raise-o2-level
OR
gen-power
• Plan representation: grap, with top level actions as
root nodes and other actions as nodes depending
from the top-level actions
gen-o2
open-p1 start-gen-B
open-p1
start-gen-B
• Approximation: the problem of graph recognition is
a problem of graph covering
&
Dialogue Systems
%
&
$
'
1/16
'
Dialogue Systems
%
Dialogue Systems
3/16
$
Example
o2-drop
EVA-prep
increase-power
raise-o2-level
raise-temp
check-temp raise-temp-set
gen-power
Regina Barzilay
lower-power-use
open-p3
open-p1 start-gen-B
open-p2
April 14, 2004
&
shutoff-X2
shutoff-X1
%
&
Dialogue Systems
lower-o2-use
gen-o2
seal-sci
open-p1
start-o2-gen
start-gen-B
%
2/16
'
$
Plan Recognition: Algorithms
• (Charniak&McDermott,1985): plan recognition as
abduction
'
A — set of actions
E — set of directed acyclic edges, Ai → Aj if Aj is a
step in achieving Ai
• (Vilain, 1990; Pynadath&Wellman, 1997): plan
recognition as parsing (problems: does not support
interleaved plans and partially-ordered plans)
C — set of Constraints
Recipies: functions from non-primitive action Ai to (A’,
E’, C’), such that actions in A’ are steps towards Ai
Other functions: CONSISTENT?(P), REPLACE (P, Ai ,
Aj ), DONE? (A)
• (Goldman&Geib&Miller, 1999): abductive,
probabilistic plan recognition, centered around plan
execution (supports interleaved plans, takes context
into account)
&
%
&
'
$
'
5/16
Plan Recognition: Two views
7/16
$
Notations
PRI ∈ ACT
• Keyhole: the recognition is simply watching normal
actions by an agent
TOP ∈ ACT (done for no other purposes than
themsleves)
• Intended: the agent is cooperative; its actions are
done with the intent to be understood;
Dialogue Systems
Dialogue Systems
%
ACT - a set of actions
Cohen, Perault and Allen (1981)
&
Notations(cont.)
Plan (Beliefs concerning goal decomposition): (A, E, C)
– (Charniak&Goldman,1993): use of Bayesian
inference (supports minimal explanation,
handles likelihood)
Dialogue Systems
$
Primitive actions can be executed directly, while abstract
actions are achieved indirectly by achieving other goals
%
4/16
&
Dialogue Systems
%
6/16
'
$
Plan Recognition
'
$
Properties of Recognized Plans
• [A1 , . . . An ] ∈ A0
• Input: [A1 , . . . An ], P=(A, E, C), a focus of action f ∈
P, recipy library
• every action in (A0 - A) is reachable in E 0 from f
• P’ can be derived from P by a composition of calls to
EXTEND (. . . , Rk , . . .), where Rk ∈ R, and
replace(. . . , . . . , Ak ), where Ak ∈ [A1 , . . . An ]
• Output: (possibly empty) set of extensions of P
which “minimally explain” the input actions by
applying recipies “below” the focus
&
Dialogue Systems
• no smaller plan (A”,E”, C”), and A” ∈ A’, E” ∈ E’, C”
∈ C’
%
&
$
'
9/16
'
Representation
Dialogue Systems
%
11/16
$
Properties of Recognized Plans
• [A1 , . . . An ] ∈ A0
• every action in (A0 - A) is reachable in E 0 from f
Actions [K, L]
A
A
B
C
J
K
• P’ can be derived from P by a composition of calls to
EXTEND (. . . , Rk , . . .), where Rk ∈ R, and
replace(. . . , . . . , Ak ), where Ak ∈ [A1 , . . . An ]
H
L
K
C
G
A
Dialogue Systems
Recognizer
&
A → D, E, F ;
B → K, J;
D → L, O;
J → L, M
Plan
8
Recipes
B
Focus B
A → B, C;
B → G, H;
C → K, D;
G → K, L;
C
B
Plan
L
M
The two plans which “minimally explain”
the actions K and L, dervied by applying
recipes to the input plan below the focus B.
• no smaller plan (A”,E”, C”), and A” ∈ A’, E” ∈ E’, C”
∈ C’
%
8/16
&
Dialogue Systems
%
10/16
'
$
Complexity
'
Plan recognition in Discourse
The size of the search space required to explain one
action is bounded by: F (R ∗ S)L ,
S is the maximum number of steps in a recipe
R is the maximum number of recipes applicable to the
actions
F is the number of actions on the fringe of P
L is the lengthy of the longest sequence of recipes
R1 , . . . , RL the algorithms must consider
&
Dialogue Systems
'
User
observe
primitive
actions
%
&
primitive
actions
$
'
%
Dialogue Systems
(a) Plan recognition.
15/16
Algorithm(cont)
$
(b) Focus, ambiguity and clarification.
plan ← h∅, ∅, ∅i, f ocus ← null, acts ← [ ]
repeat
wait for next input action Ai ,
if DONE?(root of plan)
plan ← h∅, ∅, ∅i, f ocus ← null
add Ai to acts
pick ← null
EX PL ← RECOGNIZE(acts, plan, f ocus, R)
if EX PL = ∅
set f ocus to root of plan
EX PL ← RECOGNIZE(acts, plan, f ocus, R)
if |EX PL| = 1
remove pick from EX PL
else if EX PL = ∅ or |acts| > M axW ait
pick ← CLARIFY(EX PL)
if pick 6= null
plan ← pick
f ocus ← UDATEFOCUS(plan, Ai )
acts ← [ ]
EX PL ← ∅, Q ← ∅
if P = h∅, ∅, ∅i
foreach Ti ∈ T OP
add h[A1 , .., An ], h{Ti }, ∅, ∅i, Ti i to Q
else foreach gi ∈ FRINGE(P, f )
add h[A1 , .., An ], P, gi i to Q
until Q = ∅
remove h[A01 , .., A0n0 ], P 0 , acti from Q
P 00 ← REPLACE(P 0, act, A01 )
if CONSISTENT?(P 00 )
if n0 = 1 add P 00 to EX PL
else foreach gi ∈ FRINGE(P 00 , f )
add h[A02 , .., A0n0 ], P 00 , gi i to Q
if act ∈
6 PRIM
foreach recipe Rk ∈ R
P 000 ← EXTEND(P 0, Rk , act)
foreach sj , where act → sj ∈ P 000
add h[A01 , .., A0n0 ], P 000 , sj i to Q
return EX PL
Dialogue Systems
observe
Shared
Artifact
RECOGNIZE([A1, .., An ],P ,f ,R) ≡
&
Agent
communication
13/16
Algorithm
$
%
12/16
&
Dialogue Systems
%
14/16
'
Example
without plan recognition
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
USER:
AGENT:
USER:
USER:
USER:
USER:
USER:
USER:
"Let’s work on email."
"You have 5 unread messages."
"Let’s read a message."
<Select message from Chuck>
"Let’s read message in its own window."
<Open message>
"Let’s do something using message."
<Visit http://foo.bar.com>
...long lunch...
USER: "What was I doing?"
AGENT: "Working on email.
Reading message from Chuck.
Reading message in its own window.
Done something using message.
<Visit http://foo.bar.com>
Expecting to react to message."
USER: "Let’s react to message."
USER: "Let’s send email."
USER: <Start new message>
USER: "Let’s fill in message."
USER: <Address message to Dan>
USER:
AGENT:
USER:
AGENT:
Key:
&
$
...additional editing actions...
"Done filling in message."
"Let’s send, cancel or save msg."
"Please save message."
<Save message>
"utterance"
Dialogue Systems
<primitive action>
with plan recognition
USER: "Let’s work on email."
AGENT: "You have 5 unread messages."
USER:
<Select message from Chuck>
USER:
<Open message>
USER:
<Visit http://foo.bar.com>
...long lunch...
USER: "What was I doing?"
AGENT: "Working on email.
Reading message from Chuck.
Reading message in its own ...
Done something using message.
<Visit http://foo.bar.com>
Expecting to react to message."
USER:
<Start new message>
USER: <Address message to Dan>
AGENT: "Why you sending email to Dan?
(a) reacting to msg from Chuck
(b) as a new goal "
USER: "I’m reacting to msg from Chuck."
...additional editing actions...
USER: "Done filling in message."
AGENT: "Let’s send, cancel or save msg."
USER: "Please save message."
AGENT: <Save message>
%
16/16
Download