ArticlePDF Available

Abstract and Figures

Most of the available plan recognition techniques are based on the use of a plan library in order to infer user’s intentions and/or strategies. Until some years ago, plan libraries were completely hand coded by human experts, which is an expensive, error prone and slow process. Besides, plan recognition systems with hand-coded plan libraries are not easily portable to new domains, and the creation of plan libraries require not only a domain expert, but also a knowledge representation expert. These are the main reasons why the problem of automatic generation of plan libraries for plan recognition, has gained much importance in recent years. Even when there is considerable work related to the plan recognition process itself, less work has been done on the generation of such plan libraries. In this paper, we present an algorithm for learning hierarchical plan libraries from action sequences, based on a few simple assumptions and with little given domain knowledge, and we provide a novel mechanism for supporting interleaved plans in the input example cases.
Content may be subject to copyright.
Inteligencia Artificial. Revista Iberoamericana
de Inteligencia Artificial
ISSN: 1137-3601
revista@aepia.org
Asociación Española para la Inteligencia
Artificial
España
Marchetta, Martín; Forradellas, Raymundo
Supporting Interleaved Plans in Learning Hierarchical Plan Libraries for Plan Recognition
Inteligencia Artificial. Revista Iberoamericana de Inteligencia Artificial, vol. 10, núm. 32, 2006, pp. 47-
56
Asociación Española para la Inteligencia Artificial
Valencia, España
Available in: http://www.redalyc.org/articulo.oa?id=92503207
How to cite
Complete issue
More information about this article
Journal's homepage in redalyc.org
Scientific Information System
Network of Scientific Journals from Latin America, the Caribbean, Spain and Portugal
Non-profit academic project, developed under the open access initiative
´
AAAAAAAAAAAAAAAAAAAAAAAA
´
AAAAAAAAAAAAAAAAAAAAAAAA
ART´
ICULO
Supporting Interleaved Plans in Learning Hierarchical
Plan Libraries for Plan Recognition
Mart´ın Marchetta
, Raymundo Forradellas
Facultad de Ingenier´ıa, Universidad Nacional de Cuyo
Centro Universitario, (5500) Mendoza. Argentina
mmarchetta@fing.uncu.edu.ar, kike@uncu.edu.ar
Abstract
Most of the available plan recognition techniques are based on the use of a plan library in order to infer
user’s intentions and/or strategies. Until some years ago, plan libraries were completely hand coded by
human experts, which is an expensive, error prone and slow process. Besides, plan recognition systems with
hand-coded plan libraries are not easily portable to new domains, and the creation of plan libraries require
not only a domain expert, but also a knowledge representation expert. These are the main reasons why
the problem of automatic generation of plan libraries for plan recognition, has gained much importance in
recent years. Even when there is considerable work related to the plan recognition process itself, less work
has been done on the generation of such plan libraries. In this paper, we present an algorithm for learning
hierarchical plan libraries from action sequences, based on a few simple assumptions and with little given
domain knowledge, and we provide a novel mechanism for supporting interleaved plans in the input example
cases.
Keywords: Plan Recognition, Intelligent Agent, Machine Learning, Computer Aided Process Planning.
1 Introduction
Software applications and their interfaces have
reached a great complexity level. Applications
assisting users in knowledge rich domains, such
as Computer Aided Process Planning (CAPP)
in make-to-order or assembly-to-order produc-
tion strategies (our main application domain), are
more and more common nowadays. This situ-
ation yields the need of more natural, powerful
and easy interaction between humans and these
applications.
Plan recognition techniques have been studied
in many contexts, from natural language under-
standing [1], to interface agents [15]. These tech-
niques are useful for many domains, and in many
contexts, because the need of recognizing user’s
intentions from his behavior is present virtually
whenever a human interacts with intelligent ma-
chines. The inferring of user’s intentions is a key
point for building intelligent agents more inte-
grated in their environments, and more useful for
their users. Assistance given by intelligent agents
to their users is better if these agents understand
their users’ intentions, and plan recognition is a
useful technique for this task.
Most existing plan recognition techniques, are
based on the use of a plan library previously cre-
Also CONICET
Inteligencia Artificial, Revista Iberoamericana de Inteligencia Artificial. No. 32 (2006), pp. 47-56.
ISSN: 1137-3601. c
AEPIA (http://www.aepia.org/revista)
48 Inteligencia Artificial Vol. 10, No32, 2006
ated ([10], [11], [14], [7]). Until some time ago,
these plan libraries were completely hand coded
by human experts. In recent years, the auto-
matic and semi-automatic generation of plan li-
braries has gained much importance, and some
approaches, with different results, have been de-
veloped. These approaches automate some of the
tasks that are needed, in order to build plan li-
braries. However, all of them require labeled ex-
amples, or requires much hand-coded knowledge
what makes them very restrictive. As far as we
know, the automatic acquisition of hierarchical
plan libraries, from unlabeled example cases, has
not been achieved yet.
In [16], some preliminary ideas and an algorithm
for learning hierarchical plan libraries were pre-
sented. In this paper, we present a refinement
of that work, which includes not only the capa-
bility of learning hierarchical plan libraries from
unlabeled examples, but it also allows these ex-
amples to contain interleaved plans. In order to
illustrate the proposed approach, a simple exam-
ple from the flexible packaging industry domain
described in [8], is given in this work.
The rest of this paper is organized as follows. The
next section gives an overview of the motivation
and objectives of this work. Section 3 details
some of the issues that are addressed in this pa-
per. Section 4 presents the algorithm for generat-
ing plan libraries. Section 6 presents a discussion
of related work. Finally, section 7 presents the
conclusions of this paper and the future work.
2 Motivation
Even when the algorithms presented in this work
could be applied to plan recognition systems for
many different application domains, our main in-
terest is focused in CAPP domain (Computer
Aided Process Planning). In this section we
briefly describe some CAPP peculiarities, and
some issues of current plan recognition systems
that difficult their application to this domain.
2.1 The CAPP Domain
CAPP is a set of activities related to the manu-
facturing management and planning. It includes
tasks such as part routing design (i.e, definition
of the individual manufacturing processes needed
for the production of a part), machines and tools
selection, bill of materials elaboration, and pro-
duction scheduling [9]. Our interest is particu-
larly focused on the creation of intelligent agents
to interactively assist process planners in their
tasks.
There are several factors that affect decisions
of human process planners, such as experience,
knowledge of manufacturing processes, design
styles, etc. Additionally, different products to
be manufactured can share some parts of their
manufacturing process plans with other prod-
ucts. This situation gives opportunities to ap-
ply plan recognition techniques for creating intel-
ligent agents capable of assisting human process
planners in their design tasks. These kind of tech-
niques could automatically learn the “know-how”
from expert process planners, and then assist less
experienced engineers in these tasks. Moreover,
such systems could also help experienced process
planners during their tasks, by inferring their in-
tentions and helping them in several ways (cre-
ating partial plans on their behalf, giving them
advising or detecting errors based in the knowl-
edge stored in the plan library, etc).
2.2 Creating the Plan Library
Automatic generation of plan libraries is impor-
tant for many reasons. Hand-coding plan libraries
is expensive, tedious and error prone. It also re-
quires intensive work of a domain expert (the user
of the application), and a knowledge representa-
tion expert (the domain modeler). Moreover, a
specific plan library is required for each domain,
so the creation of these libraries is done many
times, which is a big burden in complex domains.
There also exist domains where primitive events
do not change frequently, while valid combina-
tions of these elements do vary. This is the case
of CAPP domain, where the basic manufactur-
ing capabilities of a factory do not change fre-
quently, while the combination of these capabili-
ties in complex manufacturing processes do.
In these scenarios, the automatic learning of plan
libraries, can significantly reduce the work of the
knowledge representation expert when the plan
libraries are created (e.g, when adapting the sys-
tem to a new domain), as well as when they are
maintained (e.g, when new manufacturing pro-
cesses are created or not used anymore). In this
work, we aim at learn a hierarchy of plans the user
usually pursues (which changes frequently), only
Inteligencia Artificial Vol. 10, No32, 2006 49
using hand-coded information about the primi-
tive events that could be observed (which does
not vary frequently).
There exist in the literature some approaches to
learning plan libraries. However, even when these
techniques alleviate the burden of generating li-
braries for new domains, they do it with limited
results or they require labeled examples. The
methods for generating expressive plan libraries,
still require human labeling and explicit training.
Moreover, as far as we know, these works do not
address explicitly the situation when the observed
action sequences contain interleaved plans.
The main reason why interleaved plans appear
in action sequences, is because humans fre-
quently executes simultaneously different tasks.
In the proposed application domain however,
interleaved plans could appear more frequently
when the system learns some concept that, even
when exist, is not useful during the recognition
process (such as some combination of manufac-
turing processes whose parts, even when observed
in some action sequence representing a process
plan, are not frequently related to each other).
A common example of the described situation is
that where a product, in order to be produced,
requires some special combination of manufactur-
ing processes that is only required for that prod-
uct. If the learning algorithm “remembers” all
this particular cases, the plan recognizer accuracy
could be reduced, as will be seen in following sec-
tions. The desired situation is that in which only
the important manufacturing processes (and their
subprocesses) are learned, discarding the rest of
them.
The learning of hierarchical libraries from un-
labeled examples that may contain interleaved
plans, using primitive actions representations as
the only hand-coded knowledge, is the central
topic of this paper.
3 Plan libraries generation
issues
A decomposition of an action (also called event,
or task), is a set of simpler actions that must
be done in order to accomplish it. The actions
corresponding to a decomposition, can be either
primitive or non-primitive. Besides, an action can
have alternative decompositions, and all of them
accomplishes it.
In order to infer such decompositions, a learn-
ing algorithm must be provided. Such an al-
gorithm, must have the capability of identifying
higher-level actions, based on the primitive ones
observed in the unlabeled action sequences.
Another problem that must be addressed, is that
of interleaved plans. Previous works assume that
each action sequence observed, contains only ac-
tions related to one goal [2], or that there may
be actions for more than one goal and the hier-
archical decomposition is not inferred, but given
by the trainer by means of labeled examples ([5],
[6]). This could be true if the action sequences,
are provided by an expert, or by somebody that
is explicitly training the system, but it would be
useful to have an algorithm that can operate even
with interleaved plans and unlabeled examples.
4 Hierarchical plan libraries
learning
In this paper, a similar model to that described
in [10] and [11] is used for plan libraries repre-
sentation. In the mentioned works, the represen-
tation language is first order logic, and a simpli-
fied graph representation is also proposed, which
we adopt here since it is enough to illustrate the
proposed learning mechanism of partial plan li-
braries.
Under this representation, a plan library is a
graph containing actions (also called events) as
its nodes. Actions are connected by 2 kinds of
edges: thick gray arrows represent “is a” rela-
tionships (abstractions); thin black arrows repre-
sent “part of” relationships (decompositions). A
special action called End Event, has a “is a” rela-
tion with all the “top-level” actions (actions ex-
ecuted for their own sake). The complete formal
model supports the representation of further fea-
tures (such as explicit representation of events or-
derings and arbitrary restrictions between them).
The algorithms proposed in this paper learn plan
libraries only partially, because these additional
(and necessary) features are not taken into ac-
count; despite of this, our internal representation
model supports them (for example, the decom-
positions’ model allows the specification of pairs
of actions where the first one must be executed
before the second one). These simplifications will
50 Inteligencia Artificial Vol. 10, No32, 2006
be relaxed in future works.
Some assumptions are made about the character-
istics of action sequences observed and the plan
libraries learned. In first place, we assume that
each action sequence is complete (i.e, contains at
least all the actions necessary to achieve every
goal present on it), and does not contain spuri-
ous actions. For example, if the action sequence
AS1contains actions for two interleaved plans P1
and P2, then it contains all the actions needed
for achieving the goals of P1and P2. Besides,
we assume that if two different plans appear al-
ways together in the observations, then they may
be considered as the same one (there is no evi-
dence that allows the plan library learner to infer
the division of the plans). Finally, if two actions
shares parts of their decompositions, the hierar-
chy generated may be one that is equivalent (but
not equal) to the real one.
The assumption that action sequences are com-
plete and free of spurious actions is particularly
important at this stage of the research. If the ac-
tion sequences are incomplete, as well as if they
contain spurious primitive actions (such as user’s
mistakes), the proposed algorithm will generate
plan libraries that include these anomalies. Spu-
rious actions will be included within the decom-
position of the inferred non-primitive ones, and
if some sequences are incomplete, non-primitive
events with incomplete decompositions will be in-
troduced in the plan library.
Additionally, if we assume that sooner or later the
correct action sequence is observed (i.e, the ac-
tion sequence that is complete and error free), the
processing of this sequence will result in the in-
clusion of the correct non-primitive event into the
knowledge base, so the consequence of processing
action sequences with the mentioned anomalies
will be that plan libraries learned could include
correct hierarchical definitions of objectives and
plans, and incorrect ones. Little work has been
done on this topic, and some approaches propose
very simple heuristics to filter out spurious ac-
tions (see [2]). The problem of avoiding incorrect
learning of plan libraries, or their later correction
will be addressed in future works.
4.1 Decompositions
A decomposition of a non-primitive event, is the
set of parts of that event that must be done in
order to accomplish it. In order to learn a hier-
archical plan library, an algorithm for inferring
such decompositions from the observed action se-
quences is needed.
A desirable feature of a hierarchical decomposi-
tion learning algorithm is it to be incremental,
and to work in an on-line fashion, so the pre-
viously made inferences are used in subsequent
steps, instead of storing the example cases and
process (or re-process) them in batch.
Figure 1. Simple plan library for packaging
industry domain
Intuitively, whenever a set of new actions ap-
pears in an action sequence, this set of actions
can be considered as a decomposition for some
new non-primitive one that represents the ob-
servation. Consider the plan library presented
in figure 1, as an example. Initially, the system
has an empty library, only containing the End
Event. Now, suppose that the system processes
the sequence:
AS1={LoadI nk, P r epareI mage, P rintSubst rate}
Because none of the actions have been seen be-
fore, the system creates a new composed action,
named P rintwith LoadI nk, P repareI mage and
P rintS ubstrate as its parts (we denote it with an
apostrophe to show that the system will assign an
arbitrary name to it).
When an observation contains parts of known
non-primitive events as well as unknown primi-
tive actions, they can be considered as the parts
of a more general event that represents the entire
sequence. For example, suppose that the system
processes:
AS2={LoadI nk, P repareI mage, P rintS ubstrate,
LoadP rintedS ubstrate, Laminate}
Here, events LoadInk,P r epareImag e and
P rintS ubstrate are identified as a decomposition
of P rint, so the algorithm will create a new com-
posed action named P rintLa minate, which has
Inteligencia Artificial Vol. 10, No32, 2006 51
P rint,LoadP rintedS ubstrate and Laminate as
its parts. In figures 2.a and 2.b, the states of the
plan library after the first and second observation,
are shown.
Figure 2. Plan library under construction
Now suppose that the action sequences were
seen in the inverse order. After the first
sequence, the system creates P rintLaminate,
with LoadInk,P repar eImage,P r intSubstrate,
LoadP rintedS ubstrate and Laminate as its
parts. When the second sequence is pro-
cessed, only a part of a known action is iden-
tified. In these cases, the system must figure
out that in fact, LoadInk,P r epareImag e and
P rintS ubstrate are part of P rint, which in turn
is part of P rintLamin ate. Thus, the action
taken by the system should be to create P rint,
and modify P rintLaminateas needed. Finally,
the new action is added to the plan library, in
accordance with the decomposition inferred, ob-
taining as before the state shown in figure 2.b.
Definition 1 (Complete decomposition). A
set of actions AS, containing all the parts of a
non-primitive event Ec, and no other events, is a
complete decomposition of Ec.
Definition 2 (Partial decomposition). A set
of actions AS, containing some parts of a non-
primitive event Ec, but not all of them, and no
other events, is a partial decomposition of Ec.
The base of the method described intuitively be-
fore, is the identification of unknown actions,
complete decompositions and partial decomposi-
tions. In absence of further information, all new
action sequences are considered to be a decom-
position of a new non-primitive event. With the
arrival of new example cases, the plan library is
refined successively. These refinements are based
on the complete and partial decompositions iden-
tified in the new observations.
A schematic algorithm, named HIDEL (HIerar-
chical DEcomposition Learner), for generating hi-
erarchical plan libraries is shown in Figure 3.
HIDEL(AS , PLibrary)
Inputs:
AS: A new action sequence
PLibrary: The current plan library
BEGIN
do
CompDec = IDENTIFYCOMPLETEDECOMPOSITIONS(AS)
for each decomposition Deciin CompDec
remove Decifrom AS
add composedEvent(Deci) to AS
while elementCount(CompDec) >0
PartDec = IDENTIFYPARTIALDECOMPOSITIONS(AS)
for each decomposition Deciin PartDec
if elementCount(Deci)>1
NewCompEvent = CREATEEVENT()
add Decito decomposition(NewCompEvent)
remove Decifrom AS
add NewCompEvent to AS
replace Deciwith NewCompEvent in PLibrary
if elementCount(AS) >1
NewCompEvent = CREATEEVENT()
add AS to decomposition(NewCompEvent)
add NewCompEvent to PLibrary as End Event
else
Event = getEvent(1,AS)
if not(isSpecialization(Event, End Event))
add Event to PLibrary as End Event
END HIDEL
Figure 3. HIDEL Schematic algorithm
We now briefly describe some functions present
in figure 3. The function composedEvent(seq)
returns the non-primitive event associated with
the (complete or partial) decomposition seq;
getEvent(i,seq) returns the i-th element of the ac-
tion sequence seq;decomposition(evt) returns a
reference to the list of events that are part of evt;
finally, isSpecialization(evt1, evt2) returns true if
evt1 is a specialization of evt2 (i.e, if evt1 “is
a” evt2). HIDEL identifies complete and partial
decompositions present in the action sequence be-
ing learned. The algorithm transforms the origi-
nal action sequence while processes each complete
and partial decomposition identified. The follow-
ing operations are done:
a. Complete decompositions are identified.
For each complete decomposition found, the
corresponding non-primitive event’s parts
are replaced in the action sequence by the
non-primitive event itself. This operation is
repeated until no more complete decompo-
sitions are detected in the processed action
sequence
b. For each partial decomposition identified, a
new non-primitive event is created with the
elements of the partial decomposition as its
parts. The partial decomposition is then
replaced by the new non-primitive event in
52 Inteligencia Artificial Vol. 10, No32, 2006
the action sequence. Finally, all the occur-
rences of the partial decomposition, are re-
placed in the plan library by the new non-
primitive event created.
c. Finally, if the processed sequence does not
correspond to a complete decomposition
(i.e, if the processed action sequence has
more than one event), a new non-primitive
event is created with the actions in the se-
quence as its parts. The new non-primitive
event is added to the plan library as an
End Event. On the other hand, if the pro-
cessed sequence has only one event (if it
corresponds to a single complete decompo-
sition), a check is made in order to know
if the corresponding event was already an
End Event, and if not a new abstraction re-
lationship is created between them.
The general idea of the algorithm is to recognize
known non-primitive events (present in the plan
library), by observing their parts in the action
sequences. Thus, when a complete decomposi-
tion is detected, it is replaced in the action se-
quence by the corresponding composed event, and
the algorithm repeats this process until it reaches
the “highest” non-primitive events whose compo-
nents were observed. Partial decompositions, on
the other hand, represent subsets of parts shared
by more than one composed event (at least one
already present in the plan library, and the new
one represented by the action sequence currently
being processed), so when they are detected, they
are grouped as parts of a new composed event, so
the partial decomposition (i.e, the shared subset
of events) is replaced in the plan library by the
new composed event created.
It is important to note that, if the parsed se-
quence corresponds to a complete decomposition
and the corresponding non-primitive event is al-
ready an End Event, the plan library is not modi-
fied since it already contains the information pro-
vided by the observation. Thus, if no new combi-
nations of primitive actions are presented to the
algorithm, no further modifications are made to
the plan library.
4.2 Interleaved plans
When an observed action sequence contains
events of more than one plan, some special prob-
lems arise. Interleaved plans generate difficulties,
because in absence of further information, a plan
library builder can not distinguish between two
interleaved plans, and an individual composed
one. Interleavings of plans included explicitly in
the plan library reduces the accuracy of the plan
recognizer, since whenever one of the interleaved
plans is seen in the user’s behavior, the other one
could be suggested as the next user’s step, and be-
cause this could delay the recognition. Thus, the
detection and removal of interleaved plans during
the plan library learning process is a desirable
feature.
To exemplify the interleaved plans problem dur-
ing the learning process, consider again the ab-
stract plan library shown in figure 1. Suppose
that the action sequence
AS1={LoadI nk, P r epareI mage, P rintSubst rate,
LoadP rintedS ubstrate, Laminate, C ut, P ack}
is observed. Without additional information,
it is difficult to infer if the whole observa-
tion corresponds to a single plan, or if it
corresponds to two interleaved plans (P rint
and LaminateC utP ack), so the system creates
I nterleavedP lansto represent AS1. Now sup-
pose that the following sequences are processed:
AS2={LoadInk , P repareI mage, P rintS ubstrate}
AS3={LoadP rintedSubstr ate, Laminate, Cut, P ack }
After that, two new events are created (the
first one has LoadI nk, P repa reImag e and
P rintS ubstrate as its parts, and the second has
LoadP rintedS ubstrate,Laminate,Cut,P ack).
In addition, I nterleavedP lansis updated. Fig-
ure 4.a and 4.b shows the plan library learned
after AS1,AS2and AS3are processed. As can
be seen, the new observations did not solve the
problem. If during the recognition process, the
plan recognizer concludes that the user is trying
to P rint, then it can consider the possibility that
the user is trying to execute I nterleavedP la ns,
which in general is not true.
Figure 4. Interleaved plans problem
Inteligencia Artificial Vol. 10, No32, 2006 53
The problem of interleaved plans can be tackled
in different ways, depending on which biases are
imposed to the plan library representation. Bi-
ases imposed to plan libraries represent assump-
tions about what these plan libraries will contain.
Thus, if some ambiguous case is processed, but
one of the possible interpretations of the case con-
tradicts the plan bias, then the ambiguity can be
solved by discarding the contradictory interpre-
tation (for more details about biases in machine
learning, see [17]).
In [10], a bias is imposed to the plan library such
that an event can be a part of another one, or
can be a “top-level event” (i.e, an event that is
not part of another one, and that is executed for
its own sake), but not both at the same time. If
an observed event Eis executed for its own sake
(i.e, it is not executed for accomplishing a more
general one), and then Eis present in other ob-
servation along with other events, it follows that
this last observation is an interleaving of plans,
since the bias imposed to the plan library does
not allow Eto be an end event, and be part of
another one at the same time.
Thus, if this bias is imposed to the representa-
tion of plan libraries, when an event that is part
of a non-primitive one appears alone in a new ob-
servation, as an end event, it follows immediately
that the previously inferred composed event was,
in fact, an interleaving of more than one plan.
The bias solved the ambiguity.
In the above example, when AS2is processed the
composed event P rintis created, and because
it appears as executed for its own sake, it fol-
lows that I nterleavedP lanscontains, at least,
two interleaved plans (P rintand the rest of
I nterleavedP lans), so a reasonable modification
to the plan library would be to remove P rint
from I nterleavedP lans.
The bias mentioned above simplifies the solution
of the problem of interleaved plans. However it
is sometimes too strong, because in some cases
it could be useful to allow an event to be a part
of another one, and a top-level event at the same
time (see [7]). This situation arises when an event
is executed sometimes for its own sake, and some-
times to accomplish a more general task. If this is
the case, another mechanism is required in order
to avoid the ambiguity of interleaved plans.
In this last scenario, we propose the use of a
probabilistic rule to infer if an event really exists
as a concept, or if it corresponds to interlaved
plans. For our proposal, we suppose that inter-
leaved plans appear sporadically and not system-
atically. If they appear systematically, they are
not considered as interleaved plans (although in
the domain conceptually they may be). Thus, we
want to calculate the probability that some ac-
tion Ais in fact the interleaving of several plans,
instead of a real non-primitive event. Let N(A
T)
be the number of observations in which Aor any
of its parts appears, and N(A
int) and N(A
¬int)
the number of action sequences where Ais and is
not an interleaving of plans, respectively. Then,
it holds that
N(A
T) = N(A
int) + N(A
¬int) (1)
The total number of observations that involve A,
is the sum of those that involves Aas a real con-
cept, and those that involve it as an interleaving
of plans. If the value of N(A
int) is known, then
the probability that Ais in fact an interleaving
of plans can be calculated as
P(A
int) = N(A
int)
N(A
T)(2)
The problem with this approach is that the sys-
tem does not know the real plan library (since it
is learning it from what it perceives), and we as-
sume an unsupervised learning mechanism, so it
can not, in principle, calculate the number of ob-
servations in which Ais an interleaving of plans.
If we assume that Ais an interleaving of plans
whenever one or more of its parts appears as end
events, then N(A
int) can be approximated as
N(A
int) = N(A
1e) + N(A
2e) + ···+N(A
ne) (3)
where the A
is are the actions that have to be done
in order to accomplish A, and N(A
ie) is the num-
ber of observations in which the action A
iappears
as end event. It is important to note that A
is are
the direct parts of A, i.e, they do not include
the decomposition of the parts of A(the parts
of Acould be themselves non-primitive events
with their own sub-parts, but when we mention
the parts of A, we refer to its direct parts). Ad-
ditionally, if we assume that Ais a real event
when it appears explicitly (when all its parts ap-
pear together), then equation (1) can be written
as
54 Inteligencia Artificial Vol. 10, No32, 2006
N(A
T) = N(A)
|{z }
N(A
¬int)
+N(A
1e) + ···+N(A
ne)
|{z }
N(A
int)
(4)
Replacing (3) and (4) in (2), the probability that
Ais an interleaving of plans can be approximated
as
P(A
int) = N(A
int)
N(A
T)=
=N(A
1e) + N(A
2e) + · · · +N(A
ne)
N(A
T)=
=P(A
1e) + P(A
2e) + ···+P(A
ne) (5)
The value of P(A
int) can be used in several ways:
1. Comparing directly P(A
int) and P(A
¬int)
to know how to interpret A(as a “real”
non-primitive event or as an interleaving of
plans)
2. Using a threshold for P(A
int), beyond
which Acan be considered as an interleav-
ing of plans
3. Using a threshold for the rate P(A
int)
P(A
¬int)
Note that equation (5), gives a meassure of the
probability that Ais in fact an interleaving of
plans, that changes only when an action sequence
that contains Aor any of its parts is processed.
In our experiments, when an interleaving of plans
is detected, we remove it from the plan library.
In the example shown in figure 4, the removal
of I nterleavedP lanswill result in a partial plan
library consistent with the real one (shown in fig-
ure 1).
5 Implementation
We have developed an implementation of the al-
gorithms described in section 4, and some prelim-
inary tests were carried out. The algorithms were
implemented in Java, and some of the knowledge
management required was built in SWI-Prolog 1.
The interaction between components built in Java
and Prolog was implemented using the JPL pack-
age for SWI-Prolog, which is a bidirectional Pro-
log/Java interface.
The experiments we conducted were based on
small datasets of simulated data. We provided
the unlabeled examples one by one to the algo-
rithm, and we evaluated the resulting changes in
the plan library. The results obtained are similar
to those expected, but we need bigger datasets of
real data in order to get more significant and reli-
able results. These topics are further commented
in section 7.
6 Related Work
Some work has been done for learning plan li-
braries, with different results. One of the first
approaches for acquiring plan libraries automati-
cally, was to generate all possible goals and plans
for a given domain, using some bias to allow only
valid goals and plans ([13], [12]). This approach
has some drawbacks. First, it requires the spec-
ification of predicates for building goals (predi-
cates are used as “building blocks” for construct-
ing goals). This is restrictive since the designer
must in advance, determine the possible sub-goals
(predicates) the user could need to satisfy in the
specific domain.
A second drawback is that it needs biases, in or-
der to generate valid goals and plans. The deter-
mination of biases is not an easy task, and must
be performed by an expert. If the biases are too
restrictive, some valid plans could be left out of
the plan library, making impossible the complete-
ness of the recognizer. If the biases are to weak,
invalid plans and goals could be included in the
library, thus reducing the soundness of the rec-
ognizer. In our approach, we replace the use of
biases by the use of example cases of the plans
actually executed by the observed agent.
Other type of approaches are based on the ac-
quisition of plan libraries from example cases. In
[2], a method for generating abstract plans from
labeled examples is presented. This method gen-
erates abstractions of a set of action sequences
that achieves some goal. In [3], a clustering ap-
proach is presented, that can be used to group ac-
tion sequences that corresponds to the same goal.
This eliminates the need of goal annotation for ex-
amples. These works use some knowledge about
an abstraction hierarchy of actions, and generates
non-hierarchical plan libraries.
1http://www.swi-prolog.org/
Inteligencia Artificial Vol. 10, No32, 2006 55
In [5] and [6], a technique for generating hierarchi-
cal task models is presented. These task models
are generated using a set of labeled examples. In
particular, decompositions are not inferred, but
given by the trainer.
Another approach is to avoid the use of a plan
library for plan recognition. In [18] and [19], a
method is presented for plan recognition, that
does not use an explicit plan library. Instead,
it uses a kind of planning algorithm in order to
explain the actions and effects observed. This ap-
proach requires the specification of the valid goals
that the observed agent could be pursuing.
Some concepts mentioned in this work were
pointed out in [4]. That early work, shares some
of the objectives of this work, and a conceptual
approach to address the automatic generation
of plan libraries, for plan recognition in intelli-
gent interface agents was proposed. An alterna-
tive plan library representation (also named task
model) is assumed, that is more suitable for inter-
face agents domain, and some preliminary ideas
for adapting the task model with new observa-
tions were proposed.
In [16], some ideas for acquiring hierarchical
plan libraries from unlabeled examples were pre-
sented. Alternative decompositions for non-
primitive events, and some considerations about
interleaved plans were exposed, and a preliminary
version of HIDEL algorithm was proposed.
Some of the works mentioned above automate
some of the tasks that are needed in order to build
plan libraries, and others propose methods for au-
tomatically generating plan libraries that are lim-
ited in expressiveness (notable exceptions are [16],
and the early work presented in [4]). However, as
far as we know, the automatic acquisition of hi-
erarchical plan libraries, from unlabeled example
cases, has not been achieved yet, and very lit-
tle work has been done in supporting interleaved
plans in action sequences used for learning.
7 Conclusions and future
work
An algorithm for learning hierarchical plan li-
braries from unlabeled example cases was pre-
sented in this paper. A mechanism for working
with interleaved plans was also provided. The
presented approach gives a first approximation
towards the automatic generation of expressive
plan libraries from example cases, in knowledge
rich domains.
We have implemented the algorithms reported in
this paper, and we have conducted some small
simulated experiments in order to test them. Our
experiments were carried out using small datasets
of simulated data, and the first results we ob-
tained are very promising. We consider however,
that further experiments are needed in order to
get more significant results.
We conclude that, even when the ideas presented
in this paper are promising, future work must in-
clude validation of the algorithms with real data
from a knowledge-rich domain (such as CAPP),
and some additional features must also be taken
into account: abstractions of actions (“is a” rela-
tions), the inferring of actions orderings, actions
with parameters, the inferring of restrictions on
these parameters, and support of spurious and
repeated actions.
References
[1] J. Allen. Recognizing intentions from natural
language utterances. Computational Models
of Discourse, The MIT Press, 1983.
[2] M. Bauer. Towards the automatic acquisi-
tion of plan libraries. 13th European Confer-
ence on Artificial Intelligence, 1998.
[3] M. Bauer. From interaction data to plan li-
braries: A clustering approach. 16th Inter-
national Joint Conference on Artificial Intel-
ligence, 1999.
[4] V. Eyharabide and A. Amandi. Automatic
task model generation for interface agent de-
veloping. 6th Argentine Symposium of Arti-
ficial Intelligence, 2004.
[5] A. Garland, N. Lesh, C. Rich, and C.L.
Sidner. Learning task models for collagen.
AAAI Fall Symposium, 2000.
[6] A. Garland, N. Lesh, and C.L. Sidner. Learn-
ing task models for collaborative discourse.
Workshop on Adaptation in Dialogue Sys-
tems, 2001.
[7] R.P. Goldman, C.W. Geib, and C.A. Miller.
New model of plan recognition. 15th Con-
ference on Uncertainty in Artificial Intelli-
gence, 1999.
56 Inteligencia Artificial Vol. 10, No32, 2006
[8] F. Iba˜nez, D. Diaz, and R.Q. Forradellas.
Scheduling for flexible package production.
IEPM, 1:385–400, 2001.
[9] S. Kalpakjian and S.R. Schmid. Manufac-
turing engineering and technology. Addison-
Wesley. 4th ed., 2002.
[10] H. Kautz. A formal theory of plan recogni-
tion. Ph.D. Thesis. University of Rochester,
1987.
[11] H. Kautz. A formal theory of plan recog-
nition and its implementation. Reasoning
about plans, chapter 2, Morgan Kaufmann,
1991.
[12] N. Lesh. Scalable and adaptive goal recog-
nition. Ph.D. thesis, University of Washing-
ton, 1998.
[13] N. Lesh and O. Etzioni. Scaling up goal
recognition. 5th International Conference on
Principles of Knowledge Representation and
Reasoning, 1996.
[14] N. Lesh, C. Rich, and Sidner C.L. Using
plan recognition in human-computer collabo-
ration. 7th International Conference on User
Modeling, 1999.
[15] P. Maes. Agents that reduce work and in-
formation overload. Communications of the
ACM, 37(7):30–40, 1994.
[16] M. Marchetta and R. Forradellas. A new
model for automatic generation of plan li-
braries for plan recognition. 3rd Interna-
tional Conference on Production Research
- Americas’ Region (ICPR-AMERICAS’
2006), 2006.
[17] T. Mitchell. Machine learning. McGraw Hill,
1997.
[18] M. Yin, W. Gu, and Y. Lu. Incorporat-
ing goal recognition into human-machine col-
laboration. 3rd International Conference on
Machine Learning and Cybernetics, 2004.
[19] M. Yin, H. Ou, W. Gu, Y. Lu, and R. Liu.
Fast probabilistic plan recognition without
plan library. 3rd International Conference
on Machine Learning and Cybernetics, 2004.
... One feasible technique for this, is the use of a probabilistic rule. In (Marchetta and Forradellas, 2006), an algorithm was presented that follows this approach. The solution proposed in that work is to compute the probability that some action A' is in fact the interleaving of several plans, instead of a real composed one. ...
... Thus, the resulting plan library defi nition is not equal (or even equivalent) to that presented in fi gure 1 This problem arises when the following conditions hold: Some modifi cation could be made to the segmentation algorithm in order to avoid this situation, but we think that the most feasible solution is to defi ne some mechanism to revise the defi nition of actions that could potentially share common steps, as new evidence is processed. The algorithm presented in (Marchetta and Forradellas, 2006) for handling interleaved plans, which was briefl y shown in the previous section, may solve this problem. In the proposed mechanism, with each new action sequence perceived by the intelligent agent, it computes for each non-primitive action of the plan library the probability that it is a real plan or an interleaving of two of them. ...
Article
Full-text available
In the context of Computer Aided Process Planning (CAPP), feature recognition as well as the generation of manufacturing process plans are very diffi cult problems. The selection of the best manufacturing process plan usually involves not only measurable factors, but also idiosyncrasies, preferences and the know-how of both the company and the manufacturing engineer. In this scenario, mixed-initiative techniques such as plan recognition, where both human users and intelligent agents interact proactively, are useful tools for improving engineer’s productivity and quality of process plans. In order to be effective, these intelligent agents must learn autonomously this preferences and know-how. The problem of learning plan libraries for plan recognition has gained much importance in recent years, because of the dependence of the existing plan recognition techniques on them, and the diffi culty of the problem. Even when there is considerable work related to the plan recognition process itself, less work has been done on the generation of such plan libraries. In this paper, we present some preliminary ideas for a new approach for acquiring hierarchical plan libraries automatically, based only on a few simple assumptions and with little given knowledge.
Article
Full-text available
We present a new abductive, probabilistic theory of plan recognition. This model differs from previous plan recognition theories in being centered around a model of plan execution: most previous methods have been based on plans as formal objects or on rules describing the recognition process. We show that our new model accounts for phenomena omitted from most previous plan recognition theories: notably the cumulative effect of a sequence of observations of partially-ordered, interleaved plans and the effect of context on plan adoption. The model also supports inferences about the evolution of plan execution in situations where another agent intervenes in plan execution. This facility provides support for using plan recognition to build systems that will intelligently assist a user.
Conference Paper
Full-text available
We present a new abductive, probabilistic theory of plan recognition. This model dif- fers from previous theories in being centered around a model of plan execution: most previous methods have been based on plans as formal objects or on rules describing the recognition process. We show that our new model accounts for phenomena omitted from most previous plan recognition theories: no- tably the cumulative effect of a sequence of observations of partially-ordered, interleaved plans and the effect of context on plan adop- tion. The model also supports inferences about the evolution of plan execution in situ- ations where another agent intervenes in plan execution. This facility provides support for using plan recognition to build systems that will intelligently assist a user.
Article
Full-text available
In the context of Computer Aided Process Planning (CAPP), feature recognition as well as the generation of manufacturing process plans are very diffi cult problems. The selection of the best manufacturing process plan usually involves not only measurable factors, but also idiosyncrasies, preferences and the know-how of both the company and the manufacturing engineer. In this scenario, mixed-initiative techniques such as plan recognition, where both human users and intelligent agents interact proactively, are useful tools for improving engineer’s productivity and quality of process plans. In order to be effective, these intelligent agents must learn autonomously this preferences and know-how. The problem of learning plan libraries for plan recognition has gained much importance in recent years, because of the dependence of the existing plan recognition techniques on them, and the diffi culty of the problem. Even when there is considerable work related to the plan recognition process itself, less work has been done on the generation of such plan libraries. In this paper, we present some preliminary ideas for a new approach for acquiring hierarchical plan libraries automatically, based only on a few simple assumptions and with little given knowledge.
Article
Full-text available
To give the user proper assistance, an interface agent should be able to predict the user's intentions. Usually, they achieve that through the use of a detailed task model for a particular application domain. However, to develop such knowledge representations is a difficult and time-consuming activity. Generally, it is tedious and annoying for the agent developers to express such knowledge manually. Also, the necessity to have an expert that offers information on the application domain is a problematic restriction. Therefore, this paper will focus on the automatic task model generation without previous knowledge on the application domain.
Article
The problem of recognizing an agent's plans arises in many contexts in work in artificial intelligence. The plan recognition techniques suggested in the literature are rarely formally justified. We view plan recognition as a special kind of non-monotonic reasoning, and demonstrate how formal techniques developed for such reasoning -- namely, circumscription and minimal entailment -- can be used in plan recognition. The first half of this paper reviews a broad range of work in artificial intelligence and philosophy which relates to plan recognition. A formal treatment of a simple case of plan recognition follows, and the paper concludes with proposals for future extensions of this work.
Article
Computer are becoming the vehicle for an increasing range of everyday activities. Acquisition of news and information, mail and even social interactions and entertainment have become more and more computer based. This article focuses on a novel approach to building interface agents. It presents results from several prototype agents that have been built using this approach, including agents that provide personalized assistance with meeting schedules, email handling, electronic news filtering and selection of entertainment.