Late Bindings in AgentSpeak(L)
Frantisek Zboril
a
, Frantisek Vidensky
b
, Radek Koci
c
and Frantisek V. Zboril
d
Department of Intelligent Systems, Brno University of Technology, Bozetechova 2, Brno, Czech Republic
Keywords: BDI Agents, Planning, Agent Interpretation, AgentSpeak(L).
Abstract: For agents based on BDI theory, some problems remain open. These include parts of the interpretation of
these systems that are nondeterministic in the original specifications, and finding methods for their
determinism should lead to improved rationality of agent behaviour. These problems include the choice of a
plan suitable for achieving the goal, then the choice of the intention to be pursued by the agent at any given
time, and if a language based on predicate logic is used to implement such an agent, then there is also the
problem of choosing variable substitutions. One such agent-based system is systems using the AgentSpeak(L)
language, which will be the basis for this paper. We will introduce late binding into the interpretation of this
language and show that they do not make the agent lose the possibility of achieving the goal by making
unnecessary or incorrect substitutions in cases where such a decision is not necessary. We show that with late
binding substitutions the agent operates with all possible substitutions given by the chosen plan to the goals
in the plan structure, and that these substitutions are always valid with respect to the acts performed so far
within this plan.
1 INTRODUCTION
One way to create artificial agents is based on
Bratman's theory of intentions (Bratman, Intention,
Plans and Practical Reason, 1987). Intentions, as the
mental states of agents, are persistent goals (Cohen &
Levesque, 1990), which an agent decides to achieve
at the moment some of its desires have been found
attainable and are pursued until they are achieved or
the agent finds them unachievable. Systems
combining intentions with other mental states,
namely beliefs and desires, known as BDI systems
(Rao & Georgeff, Modeling Rational Agents within a
BDI-Architecture, 1991), have gained popularity.
Implementations of such systems include IRMA
(Bratman, Israel, & Pollack, Plans and resource-
bounded practical reasoning, 1988), PRS (Georgeff &
Lansky, 1987), dMars (d'Iverno, Kinny, Luck, &
Wooldridge, 1998), 2APL (Dastani, 2008), CAN
(Sardina & Padgham, 2011), as well as systems
interpreting the AgentSpeak(L) language (Rao,
AgentSpeak(L): BDI agents speak out in a logical
a
https://orcid.org/0000-0001-7861-8220
b
https://orcid.org/0000-0003-1808-441X
c
https://orcid.org/0000-0003-1313-6946
d
https://orcid.org/0000-0002-6965-4104
computable language, 1996). The principle of these
systems is based on the choice of intentions from the
desirec that the agent has, which may become
intentions at an opportune moment based on the
current state of the agent's beliefs. The plan then tries
to fulfill this intention by executing a plan, or plans,
that are hierarchically ordered. Each plan may declare
goals to be achieved, and a subplan is chosen to
achieve those goals. If the top-level plan that has been
chosen to achieve the goal of an intention is achieved,
that intention is also achieved.
The problems that are still a matter of research are
found in the non-deterministic parts of an agent's
decision making. This involves both the selection of
the appropriate means to achieve goals or subgoals in
the form of plans, but it also involves, when a
language based on predicate logic is used, the choice
of appropriate substitutions. In addition, the agent, if
pursuing multiple goals simultaneously, also has the
dilemma of which goal to pursue at any given step.
This text offers a solution for dealing with
substitutions such that if a plan is chosen, then
substitutions need not be applied immediately, but
Zboril, F., Vidensky, F., Koci, R. and Zboril, F.
Late Bindings in AgentSpeak(L).
DOI: 10.5220/0010897000003116
In Proceedings of the 14th International Conference on Agents and Arti๏ฌcial Intelligence (ICAART 2022) - Volume 3, pages 715-724
ISBN: 978-989-758-547-0; ISSN: 2184-433X
Copyright
c
๎€ 2022 by SCITEPRESS โ€“ Science and Technology Publications, Lda. All rights reserved
715
can be deferred until a decision needs to be made,
typically before a particular action is taken. Poorly
chosen substitutions during the practical reasoning
phase may indicate the choice of the wrong resource,
which may become apparent later during the
execution of the plan thus instantiated. Several ways
of handling substitutions during agent execution are
currently proposed. The 2APL system (Dastani,
2008) offers the possibility to create rules that specify
decision processes including the handling of possible
substitutions. For the CAN system (Sardina &
Padgham, 2011), knowledge of the substitutions used
is stored and, if a new plan has to be searched if a
previous attempt to achieve the intentions failed with
some substitutions, other possible substitutions can
be chosen for the same plan.
Our approach is based on trying to preserve all
possible variable bindings and during the execution
of a plan, it works with all of them. If some step (act)
of the plan is executed, then the number of these
options may be limited and only some of them survive
on. However, if at least one of the options persists,
then the plan can continue. We first introduced the
principle that leads to late variable binding in (Zboril,
Koci, Janousek, & Mazal, 2008) and later discussed
it in (Zboril, Zboril, & Kral, Flexible Plan Handling
using Extended Environment, 2013). In this paper, we
give a more precise and modified form of the basic
operations we need to create a late-binding
AgentSpeak(L) interpreter and specify the use of each
operation here.
The individual sections are organized as follows.
In Section 2, we briefly introduce the AgentSpeak(L)
language and give the motivation for introducing late
binding for its interpreter. Section 3 defines the
operations that are necessary for such an
interpretation, and in Section 4, we introduce the
concept of weak plans and events, which we build on
by introducing the execution of a single plan or a
hierarchy of plans with a late binding approach.
2 EXECUTION OF AgentSpeak(L)
An agent that is executed according to some program
written in AgentSpeak(L), is a tuple
โŒฉ
๐‘ƒ๐ต,๐ธ๐‘„,๐ต๐ต,๐ด๐‘†,๐ผ๐‘†,๐‘†
๎ฐŒ
,๐‘†
๎ฏผ
,๐‘†
๎ฏถ
โŒช
where PB is a plan base,
EQ is an event queue, BB is a belief base, AS is a set
of actions that are executable by the agent, IS is a set
of intention structures and ๐‘†
๎ฐŒ
,๐‘†
๎ฏผ
,๐‘†
๎ฏถ
are functions for
selections of events, options and intentions (Rao,
AgentSpeak(L): BDI agents speak out in a logical
computable language, 1996). The program itself
written in this language defines knowledge as
formulas of first-order predicate logic, for simplicity
we will consider beliefs in the form of atomic
formulas of this logic as facts are defined in PROLOG
as a predicate. Goals can be declared as achievement
or test goals. In the first case, the predicate is given
with the preposition ! and in the latter with the
preposition ?. The core part of a program in
AgentSpeak(L) is the plan of how to achieve some
goal in the form of plans. This looks like the
following ๐‘ก
๎ฏ˜
:ฮจโŸต๐‘๐‘™๐‘Ž๐‘› and consists of the
triggering even ๐‘ก
๎ฏ˜
, context conditions ฮจ and planโ€™s
body. Triggering events are written in the form
+event or -event, where an event can be a test goal,
an achievement or just a predicate. A plan is then
relevant to some goal in the form of an event, when
its triggering event is unifiable with that event, and it
is further applicable if the context conditions are valid
in the current state of the agent's BB. If we have a
substitution for which the plan is relevant and
applicable, then the plan is a possible means of
achieving the goal.
The interpretation of an agent programmed in
AgentSpeak(L) is presented in the original paper
(Rao, AgentSpeak(L): BDI agents speak out in a
logical computable language, 1996), and the
operational semantics is presented more formally in
(Winikoff, 2005). The problem we address and offer
a solution to is that if a plan is chosen, a substitution
is chosen that may not be appropriate for the agent's
next acts. As difficult as it is to predict which of the
possible behaviors will lead to success in a dynamic
environment, it is possible to either try to estimate
these substitutions based on previous experience, or
to defer the decision about substitutions until this
becomes necessary. We use the latter approach and
now wish to demonstrate its potential appropriateness
and usefulness.
Let us return to the aforementioned interpretation
of plan selection for some goal in the form of an event
e. Then there may exist one or more plans from
agentโ€™s plan base such that their triggering events are
unifiable with e for some most general unifier (mgu)
ฯƒ. Thus, let us have such plans
๐‘ก๐‘’
๎ฌต
:ฮจ
๎ฌต
โŸต๐‘๐‘™๐‘Ž๐‘›
๎ฌต
,
๐‘ก๐‘’
๎ฌถ
:ฮจ
๎ฌถ
โŸต๐‘๐‘™๐‘Ž๐‘›
๎ฌถ
โ€ฆ ๐‘ก๐‘’
๎ฏก
:ฮจ
๎ฏก
โŸต๐‘๐‘™๐‘Ž๐‘›
๎ฏก
and ๐œŽ
๎ฌต
๎ตŒ
๐‘š๐‘”๐‘ข
๏ˆบ
๐‘’,๐‘ก๐‘’
๎ฌต
๏ˆป
, ๐œŽ
๎ฌถ
๎ตŒ๐‘š๐‘”๐‘ข
๏ˆบ
๐‘’,๐‘ก๐‘’
๎ฌถ
๏ˆป
โ€ฆ ๐œŽ
๎ฏก
๎ตŒ๐‘š๐‘”๐‘ข
๏ˆบ
๐‘’,๐‘ก๐‘’
๎ฏก
๏ˆป
are
the mgu for the event and individual triggering
events. These plans are relevant but only applicable if
๐ต๐ต| ๎ตŒ ฮจ
๎ฌต
๐œŽ
๎ฌต
for the first plan, etc. Thus, again, we
look for substitutions that unify the individual context
conditions in the agent's BB, letโ€™s denote them as
๐œŒ
๎ฌต
,๐œŒ
๎ฌถ
โ€ฆ๐œŒ
๎ฏก
. Then the agent selects one of these plans
to achieve the goal represented by event e, say plan j,
and the agent is going to execute the body of this plan
ICAART 2022 - 14th International Conference on Agents and Arti๏ฌcial Intelligence
716
with the appropriate substitutions to achieve the
event.
Thus, only one option is chosen from all that can
be found. Not only is it potentially possible to find
multiple plans for a single goal, but also it is possible
to find multiple substitutions for which these plans
are relevant and applicable.
By introducing the context as a set of possible
substitutions, we generalize the execution of one plan
to the execution of several possibilities found for that
plan during practical reasoning. We will refer to a
plan as a structure given in the program,
supplemented with context as a set of substitutions, as
a weak instance of the plan. That is, if for the plan
๐‘ก๐‘’
๎ฏœ
:ฮจ
๎ฏœ
โŸต๐‘๐‘™๐‘Ž๐‘›
๎ฏœ
it is possible to find multiple
substitutions that unify this planโ€™s ๐‘ก๐‘’
๎ฏœ
with the event
๐‘’
๎ฏœ
and for which this plan is applicable in the agent's
BB, letโ€™s say
๐‘๐‘ก๐‘ฅ, then ๎ต๐‘’
๎ฏœ
:ฮจ
๎ฏœ
โŸต๐‘๐‘™๐‘Ž๐‘›
๎ฏœ
,ctx๎ต is a
weak instance of the plan ๐‘’
๎ฏœ
:ฮจ
๎ฏœ
โŸต๐‘๐‘™๐‘Ž๐‘›
๎ฏœ
. The context
๐‘๐‘ก๐‘ฅ will allow to postpone the decision about
substitutions until the moment when this is necessary.
We therefore view this approach as a late binding for
the interpretation of AgentSpeak(L). The weak plan
instance is executed using the operations we present
in the next section. After introducing them, we will
also show how the acts in the weak plan instance are
interpreted and how subplans and transitions between
plan levels are handled, which will allow us to
conclude by showing that such an interpretation is
done correctly and that it expands the decision-
making options for these types of agents.
3 OPERATIONS AND
FUNCTIONS FOR LATE
BINDINGS
The basic terms of the formal description of our
approach are the sets of unifiers and substitutions.
(Substitution is a set of tuples, in this text [t/x], where
x is variable and t is term. Unifier is a substitution that
unifies some two formulas). Sets of substitutions play
an essential role in our interpretation, as they are
created and modified during agent's interpretation.
For a specification on how the corresponding
operations work, we must write some definitions.
First, we introduce broad unification as a function that
creates a set of unifiers.
Definition 1: Broad unification is denoted as ๐œŒ๐‘ˆ is a
function that maps the predicate p and predicates pโ€™
from the BB to a set of all possible mgu without
variables renaming. Using function ๐‘š๐‘”๐‘ข
๏ˆบ
๐‘,๐‘
๏‡ฑ
๏ˆป
for
finding the mgu of ๐‘ and ๐‘
๏‡ฑ
without variable
renaming we define it formally as
๐†๐‘ผ
๏ˆบ
๐’‘,๐‘ฉ๐‘ฉ
๏ˆป
โ‰
๏ˆผ
๐’Ž๐’ˆ๐’–
๏ˆบ
๐’‘,๐’‘
๏‡ฑ
๏ˆป
:๐’‘
๏‡ฑ
โˆˆ๐‘ฉ๐‘ฉ
๏ˆฝ
(1)
In this definition we say that BB is a set of
predicates. Because beliefs are also in the form of
predicates, then any BB is also a set of predicates.
Variable renaming is important in the unification for
making the formulasโ€™ logical equivalent. However, in
our case we need the unification just for specification
of the predicate ๐‘ in such a way that it is valid in the
BB in any interpretation. For this reason, we need not
unify the name of the variables. However, even
though such a function from Definition 1 does not
unify the predicates in the correct sense, we will use
the /term unification for this anyway.
The result of the broad unification is a set of
unifiers that we call to be a possible unifier set (in this
text we write PUS). The set of predicates consists in
this case of all beliefs that form the agent's BB.
Further, in the text we will use a symbolic
representation of the broad unification of a predicate
p and a belief base BB in the simplified form ๐œŒ๐‘ˆ
๎ฎป๎ฎป
๎ฏฃ
,
or when the parts are not necessary, we will write just
๐œŒ๐‘ˆ. Second, we use in some further definitions when
we refer to the set just as certain PUSs and we do not
need a precise determination of the predicate and
belief base.
Conversely, an instance set is a set of predicates
containing every predicate that rises, after the
application of every unifier, from a PUS to a
predicate.
Definition 2: We denoted the instance set as ๐ผ๐œŽ,
and it is a function that maps a predicate and a PUS
to a set of predicates. We define it in the following
way:
๐ผ๐œŽ
๏ˆบ
๐‘,๐œŒ๐‘ˆ
๏ˆป
โ‰
๏ˆผ
๐‘๐œŽ:๐œŽ โˆˆ ๐œŒ๐‘ˆ
๏ˆฝ
Notice that an instance set is not inverse to the
broad unification in the sense that if we have ๐œŒ๐‘ˆ
๎ฎป๎ฎป
๎ฏฃ
,
then ๐ผ๐œŽ๎ตซ๐‘,๐œŒ๐‘ˆ
๎ฎป๎ฎป
๎ฏฃ
๎ตฏ need not be equal to the BB and vice
versa.
Definition 3: Shorting is a function denoted by โ‰บ and
we define it as:
๐œŒ๐‘ˆ โ‰บ ๐‘ โ‰ (2)
๎ต›๐œŽ: โˆƒ๐œŽ
๏‡ฑ
๎ตซ๐œŽ
๏‡ฑ
โˆˆ๐œŒ๐‘ˆ,๐œŽโŠ†๐œŽ
๏‡ฑ
,โˆ€
๏ˆพ
๐‘ก/๐‘ฅ
๏ˆฟ
โˆˆ๐œŽ
๏‡ฑ
๏ˆบ
๐‘‹โˆˆ๐‘‰๐‘Ž๐‘Ÿ
๏ˆบ
๐‘
๏ˆป
โ†’
๏ˆพ
๐‘ก/๐‘ฅ
๏ˆฟ
โˆˆ๐œŽ
๏ˆป
๎ตฏ๎ตŸ
The resulting substitution set contains just those
substitutions that substitute free variables from p. The
Var function is used here in the usual way, which
means that by using Var(p) we get a set of free
variables in p. Then, only the variable substitutions
from
๐œŒ๐‘ˆ unifiers that substitute any of the Var(p)
persist in
๐œŒ๐‘ˆ โ‰บ ๐‘.
Late Bindings in AgentSpeak(L)
717
The functions and operations that we call
merging, restriction, shorting, and decision-making
are used for the transformation of PUSs and play an
essential role for late bindings. The purpose of the
first operation, which we call โ€›mergingโ€™, is to create
substitution from two other substitutions. It unites the
substitutions when every variable substituted in both
of them is substituted for the same term. This means
that there must not be a conflict where the
substitutions map the same variable to two different
terms. If this occurs, then the result of the merging is
an empty set.
Definition 4: We denote the merging by โ‹‰ and it
is defined for a certain two unifiers as follows:
๐œŽ
๎ฌต
โ‹‰๐œŽ
๎ฌถ
โ‰ (3)
๐œŽ
๎ฌต
โˆช๐œŽ
๎ฌถ
๐‘–๐‘“๐‘“ โˆ€
๏ˆพ
๐‘ฅ
๎ฌต
/๐‘ก
๏ˆฟ
โˆˆ๐œŽ
๎ฌต
โˆ€
๏ˆพ
๐‘ฅ
๎ฌถ
/๐‘ก
๏ˆฟ
โˆˆ๐œŽ
๎ฌถ
๏ˆบ
๐‘ฅ
๎ฌต
๎ตŒ๐‘ฅ
๎ฌถ
โ†’๐‘ก
๎ฌต
๎ตŒ๐‘ก
๎ฌถ
๏ˆป
๏ˆผ๏ˆฝ
๐‘’๐‘™๐‘ ๐‘’
Let the first substitution be a unifier for a
predicate and a belief base, and the second unifies
another predicate in another belief base. If the result
of the merging of these unifiers is a nonempty set of
substitutions, then this set of substitutions unify both
predicates with some belief in the belief bases. If the
result is an empty set, then the unifiers cannot be
united. However, there can be another pair of unifiers
for which the merging produces a non-empty set. For
finding each such pair, we define the restriction
operator.
Definition 5: The restriction operator is denoted
as
โŠ“ and is defined for some two PUS ๐œŒ๐‘ˆ
๎ฌต
and ๐œŒ๐‘ˆ
๎ฌถ
as
๐†๐‘ผ
๐Ÿ
โŠ“๐†๐‘ผ
๐Ÿ
โ‰
โ‹ƒ
๐ˆ
๐Ÿ
โ‹‰๐ˆ
๐Ÿ๐ˆ
๐Ÿ
โˆˆ๐†๐‘ผ
๐Ÿ
,๐ˆ
๐Ÿ
โˆˆ๐†๐‘ผ
๐Ÿ
(4)
Using the restriction, an agent obtains pairs of
unifiers from both PUSs that work as extended
unifiers for both pairs of predicate/belief bases for
which it makes the original PUSs.
The following Theorem 1 shows a key property
of this operation, which is fundamental for the
functionality of the late bindings.
Theorem 1: The restriction of two PUSs created
by some broad unifications ๐œŒ๐‘ˆ
๎ฎป๎ฎป
๎ฐญ
๎ฏฃ
๎ฐญ
and ๐œŒ๐‘ˆ
๎ฎป๎ฎป
๎ฐฎ
๎ฏฃ
๎ฐฎ
results
in a set of unifiers that contains all the mgu that unify
both ๐‘
๎ฌต
in belief base ๐ต๐ต
๎ฌต
and ๐‘
๎ฌถ
in another belief
base ๐ต๐ต
๎ฌถ
.
Proof: First, we prove that all such unifiers work
properly for both pairs of predicates and belief bases
(1). Moreover, we need to show that they are in their
most general form (2). Then we prove that there is no
other mgu (3).
Ad 1) Let ๐œŽโˆˆ๐œŒ๐‘ˆ
๎ฎป๎ฎป
๎ฐญ
๎ฏฃ
๎ฐญ
โŠ“๐œŒ๐‘ˆ
๎ฎป๎ฎป
๎ฐฎ
๎ฏฃ
๎ฐฎ
be a unifier that
unifies p
1
in BB
1
and p
2
in BB
2
. From Definitions 4
and 5 it follows that ๐œŽ is a union of the original
unifiers. If the predicates are unified to a ground
belief, then every variable in p
1
and p
2
must be
substituted in the same way as they were substituted
in the original unifiers. There cannot be a conflict,
because if both unifiers substitute the same variable,
by definition of the merging operator, it follows that
it was substituted in the same way. Even if it unifies
them with a lighted predicate, then one unifier may
cause the substitution of a variable that remained free
in the second unification; this means that, for
example, ๐œŽ substitutes a variable in p
1
, but in the
original ๐œŒ๐‘ˆ
๎ฎป๎ฎป
๎ฐญ
๎ฏฃ
๎ฐญ
this variable remained free. However,
this is just the specification in the predicate logic and
by the rule of specification this substitution makes p
1
also valid in BB.
ad 2) If ๐œŽ is not the mgu for both unifications,
then there must be a unifier
๐œŽ
๎ฌต
and a substitution ๐›ฟ
where ๐œŽ๎ตŒ๐œŽ
๎ฌต
๐›ฟ. Definition 5 says that every mapping
of a variable in
๐›ฟ must also be in either ๐œŒ๐‘ˆ
๎ฎป๎ฎป
๎ฐญ
๎ฏฃ
๎ฐญ
or
๐œŒ๐‘ˆ
๎ฎป๎ฎป
๎ฐฎ
๎ฏฃ
๎ฐฎ
. If ๐œŽ
๏‡ฑ
works for both unifications, then there
must be a unifier ๐œŽ
๎ฌถ
for the first or second unification
which is more general, then a unifier from
๐‘ˆ
๎ฎป๎ฎป
๎ฐญ
๎ฏฃ
๎ฐญ
and
๐œŒ๐‘ˆ
๎ฎป๎ฎป
๎ฐฎ
๎ฏฃ
๎ฐฎ
, respectively. However, because these unifiers
are mgu, this is not possible. From another point of
view, because unifications produce ground
predicates, then the number of variable substitutions
in the unifier must be equal to the number of free
variables in ๐‘
๎ฌต
and ๐‘
๎ฌถ
that is valid for the results of
the restriction operation.
ad 3) Let us consider that there is, a unifier, ๐œŽ that
is mgu for both predicates and belief sets and that this
unifier is not included in the restricted set. Then there
must be some other mgu unifiers
๐œŽ
๎ฌต
โŠ†๐œŽ and ๐œŽ
๎ฌถ
โŠ†๐œŽ
which are equal to or more general than ๐œŽ, which
means
๐œŽโŠ†๐œŽ
๎ฌต
โˆง๐œŽโŠ†๐œŽ
๎ฌถ
and ๐‘
๎ฌต
๐œŽ
๎ฌต
โˆˆ๐ต๐ต
๎ฌต
and ๐‘
๎ฌถ
๐œŽ
๎ฌถ
โˆˆ
๐ต๐ต
๎ฌถ
. However because ๐œŒ๐‘ˆ
๎ฎป๎ฎป
๎ฐญ
๎ฏฃ
๎ฐญ
๐‘Ž๐‘›๐‘‘ ๐œŒ๐‘ˆ
๎ฎป๎ฎป
๎ฐฎ
๎ฏฃ
๎ฐฎ
contains
every mgu for individual predicates and belief bases,
then both ๐œŽ
๎ฌต
and ๐œŽ
๎ฌถ
belong to these sets and because
๐œŽโŠ†๐œŽ
๎ฌต
โˆช๐œŽ
๎ฌถ
then either ๐œŽ or a more general unifier ๐œŽ
must be included in the restriction.
From Theorem 1 it follows that if a restriction is
applied to ๐œŒ๐‘ˆ
๎ญ†๎ญ†๎ฌต
๎ฏฃ
๎ฐญ
๐‘Ž๐‘›๐‘‘ ๐œŒ๐‘ˆ
๎ฎป๎ฎป๎ฌถ
๎ฏฃ
๎ฐฎ
then it results in every
possible substitution that still fulfils both queries of
๐‘
๎ฌต
to ๐ต๐ต
๎ฌต
and ๐‘
๎ฌถ
to ๐ต๐ต
๎ฌถ
.
We will add one more lemma to this definition,
which we will use later.
Lemma 1: If we obtain PUS by restriction
๐œŒ๐‘ˆ ๎ตŒ ๐œŒ๐‘ˆ
๎ฌต
โจ…๐œŒ๐‘ˆ
๎ฌถ
,
then it is valid that
โˆ€ฯƒโˆƒฯƒ
๎ฌต
๏ˆบ
๐œŽโˆˆ๐œŒ๐‘ˆโˆง๐œŽ
๎ฌต
โˆˆ๐œŒ๐‘ˆ
๎ฌต
โˆง ๐œŽ
๎ฌต
โŠ†๐œŽโˆง๐œŽโˆˆ
๏ˆผ
๐œŽ
๎ฌต
๏ˆฝ
โจ…๐œŒ๐‘ˆ
๎ฌถ
๏ˆป
ICAART 2022 - 14th International Conference on Agents and Arti๏ฌcial Intelligence
718
Proof: We need to show that if a substitution
arises by performing a restriction operation, then for
every substitution ฯƒ in this result there is at least one
substitution in the first operand ๐œŽ
๎ฌต
, that is a subset of
๐œŽ such that the substitution ๐œŽ would arise by
performing the restriction even if the first operand
were the set containing olny that substitution ๏ˆผ๐œŽ
๎ฌต
๏ˆฝ .
Since such a substitution must have arisen as a result
of the merging operation ๐œŽ๎ตŒ๐œŽ
๎ฌต
โ‹‰๐œŽ
๎ฌถ
and ๐œŽ
๎ฌต
โˆˆ๐œŒ๐‘ˆ
๎ฌต
.
From Definition 4, this operation is performed as
๐œŽ
๎ฌต
โˆช๐œŽ
๎ฌถ
and it is clear that ๐œŽโŠ†๐œŽ
๎ฌต
โˆช๐œŽ
๎ฌถ
. But then
since ๐œŽ
๎ฌถ
โˆˆ๐œŒ๐‘ˆ
๎ฌถ
then ๏ˆผ๐œŽ
๎ฌต
๏ˆฝโจ…๐œŒ๐‘ˆ
๎ฌถ
will also perform
merging ๐œŽ
๎ฌต
โ‹‰๐œŽ
๎ฌถ
and its result will also be part of the
resulting set of substitutions.
An essential aspect of the BDI agents is that they
build a hierarchy of plans. If the agent is about to go
from one plan to another in the hierarchy, it must also
transfer appropriate substitutions. For this purpose,
we introduce the PUS intersection function.
Definition 6: The intersection is a function
denoted by the symbol โˆฝ and is defined for one PUS
๐œŒ๐‘ˆ and two predicates ๐‘
๎ฌต
a ๐‘
๎ฌถ
as follows:
๐‘
๎ฌต
,๐œŒ๐‘ˆโˆฝ๐‘
๎ฌถ
โ‰๐œŒ๐‘ˆ๎ตซ๐‘
๎ฌถ
,๐ผ๐œŽ
๏ˆบ
๐‘
๎ฌต
,๐œŒ๐‘ˆ
๏ˆป
๎ตฏ (5)
Definition 7: The intersection function for two
PUS ๐œŒ๐‘ˆ
๎ฌต
and ๐œŒ๐‘ˆ
๎ฌถ
and two predicates ๐‘
๎ฌต
and ๐‘
๎ฌถ
is
defined as follows:
๐‘
๎ฌต
,๐œŒ๐‘ˆ
๎ฌต
โˆฝ๐‘
๎ฌถ
,๐œŒ๐‘ˆ
๎ฌถ
โ‰
๏ˆบ
๐‘
๎ฌต
,๐œŒ๐‘ˆ
๎ฌต
โˆฝ๐‘
๎ฌถ
๏ˆป
โŠ“๐œŒ๐‘ˆ
๎ฌถ
(6)
The last function which we define is called
decision-making. Contrary to the previous operations
and functions, this one is defined abstractly. Here we
only declare its structure without any further
specification on how to realize it.
Definition 8: Decision-making is a function
denoted as Dec that for a PUS and a predicate p
provides a ground substitution which is a subset of a
substitution from the PUS.
When we write that
๐ท๐‘’๐‘
๏ˆบ
๐œŒ๐‘ˆ,๐‘
๏ˆป
๎ตŒ๐œŽ then it must be
valid that
โˆƒ๐œŽ
๎ฌต
๏ˆบ๐œŽ
๎ฌต
โˆˆ๐œŒ๐‘ˆ,๐œŽโŠ†๐œŽ
๎ฌต
,๐‘‰๐‘Ž๐‘Ÿ
๏ˆบ
๐‘
๏ˆป
๎ตŒ๐‘‘๐‘œ๐‘š๏ˆบ๐œŽ๏ˆป) (7)
and ๐œŽ is a ground substitution for p.
So the agent decides on some substitution from
๐œŒ๐‘ˆ and from that determines the binding of the free
variables in ๐‘. If this substitution is applied to ๐‘, then
it makes
๐‘ a ground predicate. But in addition, this
substitution is based on those substitutions that the
agent keeps as possible.
4 EXECUTING PLANS USING
LATE BINDINGS
We have already mentioned that we will be working
with a set of substitutions, i.e. some PUS that will be
stored during the execution of the agent's plan. The
plan becomes part of the agent's intent when the
reasoning process chooses it for some event. At that
same moment, the plan is assigned a PUS that the
agent operates on while executing the plan. These
substitutions are made by the agent in the course of
its practical reasoning. So, unlike other
AgentSpeak(L) interpreter systems, in our case the
plan variables do not have to be replaced
immediately, but can be kept separately as PUSs,
which we will now call the plan context. This context
changes as the agent performs actions and achieves
goals from the plan body. If such a PUS is assigned
to an event, we will speak of an event context. This
will arise from the actual context of the plan that
triggered the event, and we explain this in more detail
below. Further in this text, we will talk about weak
instances of plans and events when plans and events
have contexts and other information associated with
them according to the following definitions.
Definition 9: A weak plan instance is a triple
โŒฉ
๐‘ก๐‘’, ๐’‰,๐‘๐‘ก๐‘ฅ
โŒช
containing a plan trigger event ๐‘ก๐‘’, a plan
body
h = โ„Ž
๎ฌต
;โ„Ž
๎ฌถ
;โ€ฆโ„Ž
๎ฏ 
, and a plan context ctx.
Similarly, we define weak event instances as
tuples.
Definition 10: A weak event instance is a tuple
โŒฉ
๐‘’๐‘ฃ๐‘ก, ๐‘๐‘ก๐‘ฅ
โŒช
where ๐‘’๐‘ฃ๐‘ก is an event, and ctx is a context.
Its purpose is to represent an event that has arisen
during the execution of a weak plan instance. It is
necessary to have weak event instances because when
an agent is pursuing a goal by a weakly instantiated
plan, it need not know the exact substitution of the
goal variables. Instead, the agent selects a single
event with a context representing all possible goals
that are sufficient to satisfy the declared goal. The
agent decides how to proceed based on which goal or
goals the agent subplan will achieve. It means, that it
is sufficient to meet only one or a subset of these
goals.
Furthermore, we will use the abbreviations WEI
for weak event instances and WPI for weak plan
instances.
4.1 Practical Reasoning for Weak
Instances
What differs from the original interpretation is the
way the applicability and relevance are recognized.
Late Bindings in AgentSpeak(L)
719
When there are WEIs and a plan, then a plan is
relevant to the WEIs when its triggering event and the
WEI event are unifiable concerning the WEI context.
At the beginning, the plan has no context that would
play a role in the unification process. Then it is
enough that the PUS intersection of the triggering
event, the goal event, and its context create a set
containing at least one substitution. This can be seen
as a query by triggering event to the base, which is
formed as a set of instantiations from the WEI. Notice
that it is valid also when the substitution is an empty
set, i.e. if the resulting set contains a single element,
namely the empty set. This is what would happen if
the planโ€™s triggering event were ground. Now let us
define this formally.
Definition 11: A plan
๐‘ก๐‘’:๐‘
๎ฌต
โˆง๐‘
๎ฌถ
โˆงโ€ฆ๐‘
๎ฏก
โ†
โ„Ž
๎ฌต
;โ„Ž
๎ฌถ
;โ€ฆโ„Ž
๎ฏ 
is relevant to a WEI
โŒฉ
๐‘’๐‘ฃ๐‘ก, ๐‘๐‘ก๐‘ฅ
โŒช
when
๏ˆบ
๐‘’๐‘ฃ๐‘ก,๐‘๐‘ก๐‘ฅ โˆฝ ๐‘ก๐‘’
๏ˆป
๎ต
๏ˆผ
๏ˆฝ
A plan is applicable when every of the plan's
context conditions (here ๐‘
๎ฌต
โ€ฆ๐‘
๎ฏก
) is satisfied in the
actual state of the agent's belief base. This means that
it is possible to find a PUS for every context condition
and the belief base and consequently to make
restrictions among them. From Theorem 1, it follows
that if the restrictions result in a nonempty set, then
there is at least one unifier for every context condition
of the plan and an agent's belief in its belief base.
Definition 12:
A plan ๐‘ก๐‘’:๐‘
๎ฌต
โˆง๐‘
๎ฌถ
โ€ฆ๐‘
๎ฏก
โ†
โ„Ž
๎ฌต
;โ„Ž
๎ฌถ
;โ€ฆโ„Ž
๎ฏ 
is applicable in the actual agentโ€™s belief
base BB, when ๐œŒ๐‘ˆ
๏ˆบ
๐‘
๎ฌต
,๐ต๐ต
๏ˆป
โŠ“โ€ฆโŠ“๐œŒ๐‘ˆ
๏ˆบ
๐‘
๎ฏก
,๐ต๐ต
๏ˆป
๎ต
๏ˆผ
๏ˆฝ
Every plan which is both relevant and applicable
can be considered as a means for the goal and the
agent may choose it as its intended means. When the
plan is both relevant and applicable, then the
restriction of the PUS from Definition 11 and the PUS
from Definition 12 must be also a non-empty PUS.
Using the PUS intersection from Definition 7, we
may write
๐‘๐‘ก๐‘ฅ
๎ฌต
๎ตŒ๎ตซ๏ˆบ๐‘’๐‘ฃ๐‘ก,๐‘๐‘ก๐‘ฅโˆฝ๐‘ก๐‘’๏ˆปโŠ“ ๐œŒ๐‘ˆ
๏ˆบ
๐‘
๎ฌต
,๐ต๐ต
๏ˆป
โŠ“โ€ฆโŠ“
๐œŒ๐‘ˆ
๏ˆบ
๐‘
๎ฏก
,๐ต๐ต
๏ˆป
๎ตฏ๎ต
๏ˆผ
๏ˆฝ
and then ๐‘๐‘ก๐‘ฅ
๎ฌต
is an context which,
together with the planโ€™s body โ„Ž
๎ฌต
;โ„Ž
๎ฌถ
;โ€ฆโ„Ž
๎ฏ 
, forms
new WPI that can be an intended means for the WEI.
We can think of a WEI as a specification of more
than one goal in the form of an event. By creating a
set of instances for a given predicate in a WEI and for
all substitutions from a given context, we obtain all
event instances that represent all reachable goals
represented by that WEI. To satisfy a given WEI, it is
sufficient for the agent to satisfy at least one of these
goals. The following Lemma will show that for a WEI
and a chosen plan, its default context contains all
substitutions for which this plan is relevant and
applicable to some WEI instance. In the remainder of
this paper, when we refer to a WEI instance, we will
mean a single instance created by applying the WEI
context to a WEI predicate. By a WEI instance, we
will then also mean one particular goal represented by
this WEI.
Lemma 2: The result of practical reasoning for
some WEI
โŒฉ
๐‘’๐‘ฃ๐‘ก,๐‘๐‘ก๐‘ฅ
โŒช
, if a suitable plan is found, is a
PUS that contains all the most general substitutions
for which the chosen plan
๐‘ก
๎ฏ˜
:ฮจโŸต๐‘๐‘™๐‘Ž๐‘› is relevant
with respect to a given some event instance
๐‘’โˆˆ
๐ผ๐œŽ
๏ˆบ
evt,ctx
๏ˆป
and applicable in the current state of the
agent's belief base.
Proof: First consider a plan without the context
conditions
๐‘ก
๎ฏ˜
โŸต๐‘๐‘™๐‘Ž๐‘›. Then the result of practical
reasoning is ฮ˜๎ตŒ
๏ˆบ
๐‘’๐‘ฃ๐‘ก,๐‘๐‘ก๐‘ฅ โˆฝ ๐‘ก๐‘’,
๏ˆป
. By Definition 6,
๏ˆบ
๐‘’๐‘ฃ๐‘ก,๐‘๐‘ก๐‘ฅ โˆฝ ๐‘ก๐‘’
๏ˆป
๎ตŒ๐œŒ๐‘ˆ๎ตซ๐‘ก
๎ฏ˜
,๐ผ๐œŽ
๏ˆบ
๐‘’๐‘ฃ๐‘ก, ๐‘๐‘ก๐‘ฅ
๏ˆป
๎ตฏ and further by
Definition 1,
ฮ˜๎ตŒ
๏ˆผ
๐‘š๐‘”๐‘ข
๏ˆบ
๐‘ก
๎ฏ˜
,๐‘
๏‡ฑ
๏ˆป
:๐‘
๏‡ฑ
โˆˆ๐ผ๐œŽ
๏ˆบ
๐‘’๐‘ฃ๐‘ก, ๐‘๐‘ก๐‘ฅ
๏ˆป
๏ˆฝ
.
Assume that there is a substitution ฯ†โˆ‰ฮ˜, for which
this plan is relevant with respect to some
๐‘’โˆˆ
๐ผ๐œŽ
๏ˆบ
evt,ctx
๏ˆป
and applicable in the agent's BB. Since,
due to the absence of context, every relevant plan is
also applicable, then suppose that ฯ† is mgu for some
๐‘ก
๎ฏ˜
and an event instance ๐‘’ , but then ฯ†โˆ‰
๏ˆผ
๐‘š๐‘”๐‘ข
๏ˆบ
๐‘ก
๎ฏ˜
,๐‘
๏ˆป
:๐‘โˆˆ๐ผ๐œŽ
๏ˆบ
๐‘’๐‘ฃ๐‘ก,๐‘๐‘ก๐‘ฅ
๏ˆป
๏ˆฝ
which is a
contradiction. From a different perspective, we can
view such inference as querying ๐‘ก
๎ฏ˜
into the BB
containing all instances of a given WEI, and the result
of this query is all possible mgu for which this query
is satisfied. Thus, in the first stage of practical
reasoning, we obtain all the substitutions that make
this plan relevant to some instance of the event. All
these substitutions are mgu for all event instances of
the WEI and the planโ€™s triggering event. Assume, that
the context were non-empty
ฮจ๎ตŒ๐‘
๎ฌต
โˆงโ€ฆโˆง๐‘
๎ฏก
and we
have ฯ† which is a substitution for which the plan is
relevant and applicable. Suppose now that ฯ†โˆ‰ฮž
where ฮž is calculated, as we showed above, as
intersection by
๎ตซ๏ˆบ๐‘’๐‘ฃ๐‘ก, ๐‘๐‘ก๐‘ฅ โˆฝ ๐‘ก๐‘’๏ˆป โŠ“ ๐œŒ๐‘ˆ
๏ˆบ
๐‘
๎ฌต
,๐ต๐ต
๏ˆป
โŠ“โ€ฆโŠ“
๐œŒ๐‘ˆ
๏ˆบ
๐‘
๎ฏก
,๐ต๐ต
๏ˆป
๎ตฏ and we know that ฮ˜๎ตŒ
๏ˆบ
evt,๐‘๐‘ก๐‘ฅ โˆฝ ๐‘ก
๎ฏ˜
,
๏ˆป
provides all mgu for ๐‘ก
๎ฏ˜
and the instance of WEI under
consideration, ฯ† must also be a superset of some such
mgu of ฮ˜ . Furthermore, if we consider the first
condition ๐‘
๎ฌต
of the context condition ฮจ and perform
ฮ˜โŠ“,๐œŒ๐‘ˆ
๏ˆบ
๐‘
๎ฌต
,๐ต๐ต
๏ˆป
, then by Theorem 1 we obtain all
substitutions for which they are valid both with
respect to the relevance of the plan and with respect
to the context condition ๐‘
๎ฌต
. Similarly, for ฮ˜โŠ“
,๐œŒ๐‘ˆ
๏ˆบ
๐‘
๎ฌต
,๐ต๐ต
๏ˆป
,โ€ฆโŠ“๐œŒ๐‘ˆ
๏ˆบ
๐‘
๎ฏก
,๐ต๐ต
๏ˆป
, the result is all
substitutions that make the plan relevant and all
context conditions are satisfied, so the condition ฯ†
must be present in ฮž.
Thanks to Lemma 2, we know that if a plan is
adopted and a WPI containing that plan and some
context is created, then that context contains all
possible substitutions for which the execution of that
ICAART 2022 - 14th International Conference on Agents and Arti๏ฌcial Intelligence
720
plan is applicable and, in particular, valid against
some WEI for which it was chosen. Again, this can
be looked at from a different perspective. The
selection of the appropriate plan can be seen as a
successful query in which we use the planโ€™s triggering
event and event instance set. The choice of the
applicable plan is then seen as a series of queries for
each part of the context conditions to the agent's BB.
The resulting substitutions according to Theorem 1
contain all substitutions that satisfy all these queries.
Now we want to find out all the substitutions that,
on the one hand, still satisfy that the plan is a relevant
means for them to achieve some event instance, but
also make all the acts of the plan, including possible
subplans, feasible. We will do this sequentially.
4.2 Plan Body Execution
We start with the simplest example where the plan
does not contain any act, and choosing it would
already result in the event being fulfilled. Then the
substitutions found during the practical reasoning
provide the goals that have been achieved.
Example 1: For some WEI, where the event
predicate is !transport_means๏ˆบX,Y,M๏ˆป. is to
represent the location X from which someone or
something is to be moved to location Y and M is the
means of transport and the WEI context may be
๏ˆผ๏ˆผ๏ˆพ๐‘๐‘’๐‘Ÿ๐‘™๐‘–๐‘›/๐‘‹๏ˆฟ๏ˆฝ,๏ˆผ๏ˆพ๐‘๐‘Ÿ๐‘Ž๐‘”๐‘ข๐‘’/๐‘‹๏ˆฟ๏ˆฝ๏ˆฝ. The relevant plan is for
example ๎ต…!๐‘ก๐‘Ÿ๐‘Ž๐‘›๐‘ ๐‘๐‘œ๐‘Ÿ๐‘ก_๐‘š๐‘’๐‘Ž๐‘›๐‘ ๏ˆบX,Y,M๏ˆป:๐‘”๐‘’๐‘ก_๐‘ก๐‘š๏ˆบ๐‘‹,๐‘€๏ˆป
and this contains only one context condition and if the
agent's belief base contains for example
๐‘”๐‘’๐‘ก_๐‘ก๐‘š๏ˆบ๐‘๐‘Ÿ๐‘Ž๐‘”๐‘ข๐‘’,๐‘๐‘Ž๐‘Ÿ๏ˆป.
๐‘”๐‘’๐‘ก_๐‘ก๐‘š๏ˆบ๐‘๐‘’๐‘Ÿ๐‘™๐‘–๐‘›,๐‘Ž๐‘–๐‘Ÿ๐‘๐‘™๐‘Ž๐‘›๐‘’๏ˆป.
๐‘”๐‘’๐‘ก_๐‘ก๐‘š๏ˆบ๐‘๐‘’๐‘Ÿ๐‘™๐‘–๐‘›,๐‘ก๐‘Ÿ๐‘Ž๐‘–๐‘›๏ˆป.
๐‘”๐‘’๐‘ก_๐‘ก๐‘š๏ˆบ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ ,๐‘๐‘ข๐‘ ๏ˆป.
then for
the given WEI the initial and resulting context is
๏ˆผ๏ˆผ๏ˆพ๐‘๐‘’๐‘Ÿ๐‘™๐‘–๐‘›/๐‘‹๏ˆฟ,๏ˆพ๐‘Ž๐‘–๐‘Ÿ๐‘๐‘™๐‘Ž๐‘›๐‘’/๐‘€๏ˆฟ๏ˆฝ,๏ˆผ๏ˆพ๐‘๐‘’๐‘Ÿ๐‘™๐‘–๐‘›/๐‘‹๏ˆฟ,๏ˆพ๐‘ก๐‘Ÿ๐‘Ž๐‘–๐‘›/
๐‘€๏ˆฟ๏ˆฝ,๏ˆผ๏ˆพ๐‘๐‘Ÿ๐‘Ž๐‘”๐‘ข๐‘’/๐‘‹๏ˆฟ,๏ˆพ๐‘๐‘Ž๐‘Ÿ/๐‘€๏ˆฟ๏ˆฝ๏ˆฝ.
In the following paragraphs, our focus will be on
how the WPI changes from the moment of its creation
to the moment of its successful execution. We won't
even go into how the agent responds to situations
where the WPI fails. This would occur when the
context in the WPI transforms to an empty set.
However, we will assume that each execution of an
act in the body of the WPI plan will result in the
transformation of its context into another context that
is not an empty set. We will show specifically how
this context will be transformed, one by one, by the
possible acts that the agent can execute.
First, we define the test goals and their
interpretation.
Definition 13: A test goal is executed for some
WPI
๎ต๐‘ก
๎ฏ˜
,?๐‘
๏ˆบ
๐’•
๏ˆป
;๐‘๐‘™๐‘Ž๐‘›๐‘๐‘œ๐‘‘๐‘ฆ,๐‘๐‘ก๐‘ฅ๎ต and if successfully
executed, then the new WPI is
๎ต๐‘ก
๎ฏ˜
,๐‘๐‘™๐‘Ž๐‘›๐‘๐‘œ๐‘‘๐‘ฆ,๐‘๐‘ก๐‘ฅโŠ“๐œŒ๐‘ˆ
๏ˆบ
๐‘
๏ˆบ
๐’•
๏ˆป
,๐ต๐ต
๏ˆป
๎ต
By executing one test goal ?๐‘
๎ฏœ
๏ˆบ
๐’•
๏ˆป
the context is
changed to include all substitutions that match all
previous queries and must now include this new
query. Let us denote the result of the testing goal by
๐œŒ๐‘ˆ and this contains all mgu for ๐‘
๎ฏœ
๏ˆบ
๐’•
๏ˆป
and some
belief from the agent's current BB. If we perform
๐‘๐‘ก๐‘ฅ
๏‡ฑ
๎ตŒ๐‘๐‘ก๐‘ฅโŠ“๐œŒ๐‘ˆ, then we get a new context ๐‘๐‘ก๐‘ฅ
๏‡ฑ
,
which, by Theorem 1, contains all substitutions that
are valid for all queries performed so far (including
those performed during practical inference).
Definition 14: Performing actions either external
or internal transforms the context from WPI
๎ต๐‘ก
๎ฏ˜
,๐‘Ž
๏ˆบ
๐’•
๏ˆป
;๐‘๐‘™๐‘Ž๐‘›๐‘๐‘œ๐‘‘๐‘ฆ,๐‘๐‘ก๐‘ฅ๎ต so that the new WPI is
๎ต๐‘ก
๎ฏ˜
,๐‘๐‘™๐‘Ž๐‘›๐‘๐‘œ๐‘‘๐‘ฆ,๐‘๐‘ก๐‘ฅ โŠ“ ๎ต›๐ท๐‘’๐‘๎ตซ๐‘๐‘ก๐‘ฅ,๐‘Ž
๏ˆบ
๐’•
๏ˆป
๎ตฏ๎ตŸ ๎ต
The agent can create a ground predicate for the
action before executing it. Thus, all free variables
must be bound to a specific atom. This is the case
when the
๐ท๐‘’๐‘ function of Definition 8 is used. This is
a situation that causes non-determinism in the agent's
behavior and we do not provide a concrete
implementation of it in this text. Anyway, the agent
performs the action described as
๐‘Ž
๏ˆบ
๐’•
๏ˆป
where ๐’• are
terms (in our case we consider atoms or variables).
After this action is performed, all variables from the
terms ๐’• are uniquely bound to the same variables in
all context substitutions.
Example 2: For an action ๐‘”๐‘œ
๏ˆบ
๐ด,๐ต
๏ˆป
with context
๐‘๐‘ก๐‘ฅ ๎ตŒ ๏ˆผ
๏ˆผ๏ˆพ
๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /๐ด
๏ˆฟ
,
๏ˆพ
๐‘๐‘Ž๐‘Ÿ/๐ต
๏ˆฟ
,๏ˆพ๐‘š๐‘œ๐‘›/๐‘‹๏ˆฟ
๏ˆฝ
,
๏ˆผ
๏ˆพ๐‘Ÿ๐‘–๐‘œ/
๐ด๏ˆฟ,๏ˆพ๐‘๐‘™๐‘Ž๐‘›๐‘’/๐ต๏ˆฟ,๏ˆพ๐‘ก๐‘ข๐‘’/๐‘‹๏ˆฟ
๏ˆฝ
,
๏ˆผ
๏ˆพ๐‘๐‘Ÿ๐‘›๐‘œ/๐ด๏ˆฟ.๏ˆพ๐‘๐‘ฆ๐‘๐‘–๐‘๐‘™๐‘’/๐ต๏ˆฟ,๏ˆพ๐‘ ๐‘ก๐‘‘/
๐‘‹๏ˆฟ
๏ˆฝ
,
๏ˆผ
๏ˆพ๐‘๐‘Ÿ๐‘›๐‘œ/๐ด๏ˆฟ.๏ˆพ๐‘๐‘ฆ๐‘๐‘–๐‘๐‘™๐‘’/๐ต๏ˆฟ,๏ˆพ๐‘ ๐‘ข๐‘›/๐‘‹๏ˆฟ
๏ˆฝ
๏ˆฝ the agent can
decide to perform one of ๐‘”๐‘œ
๏ˆบ
๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ ,๐‘๐‘Ž๐‘Ÿ
๏ˆป
,
๐‘”๐‘œ
๏ˆบ
๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ ,๐‘๐‘™๐‘Ž๐‘›๐‘’
๏ˆป
or ๐‘”๐‘œ
๏ˆบ
๐‘๐‘Ÿ๐‘›๐‘œ, ๐‘๐‘ฆ๐‘๐‘–๐‘๐‘™๐‘’
๏ˆป
. The first action
is created by performing the first substitution on the
original action, the second action by performing the
second, and the third action by performing the third
or fourth. The resulting contexts are then
๐‘๐‘ก๐‘ฅ ๎ตŒ
๏ˆผ
๏ˆผ๏ˆพ
๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /๐ด
๏ˆฟ
,
๏ˆพ
๐‘๐‘Ž๐‘Ÿ/๐ต
๏ˆฟ
,๏ˆพ๐‘š๐‘œ๐‘›/๐‘‹๏ˆฟ
๏ˆฝ
for the first action,
๐‘๐‘ก๐‘ฅ ๎ตŒ ๏ˆผ
๏ˆผ
๏ˆพ๐‘Ÿ๐‘–๐‘œ/๐ด๏ˆฟ,๏ˆพ๐‘๐‘™๐‘Ž๐‘›๐‘’/๐ต๏ˆฟ,๏ˆพ๐‘ก๐‘ข๐‘’/๐‘‹๏ˆฟ
๏ˆฝ
for the second
action, and
๐‘๐‘ก๐‘ฅ ๎ตŒ ๏ˆผ
๏ˆผ
๏ˆพ๐‘๐‘Ÿ๐‘›๐‘œ/๐ด๏ˆฟ,๏ˆพ๐‘๐‘ฆ๐‘๐‘–๐‘๐‘™๐‘’/๐ต๏ˆฟ,๏ˆพ๐‘ ๐‘ก๐‘‘/
๐‘‹๏ˆฟ
๏ˆฝ
,
๏ˆผ
๏ˆพ๐‘๐‘Ÿ๐‘›๐‘œ/๐ด๏ˆฟ,๏ˆพ๐‘๐‘ฆ๐‘๐‘–๐‘๐‘™๐‘’/๐ต๏ˆฟ,๏ˆพ๐‘ ๐‘ข๐‘›/๐‘‹๏ˆฟ
๏ˆฝ
๏ˆฝ
for the third
action.
The result of performing an action is to reduce the
context to only those substitutions that are consistent
with the action performed and the agent loses those
options that do not match the action performed. From
the above, we summarize the following Lemma. Its
proof follows from the above definitions and their
analysis.
Lemma 3: Executing a plan. which contains only
actions and test goals (i.e., does not invoke subplans
by the act of achievement goal) the original WPI is
transformed into another whose context contains all
Late Bindings in AgentSpeak(L)
721
the substitutions for which this one is relevant to the
original WEI that invoked it, was applicable with
respect to the specified context conditions, and
corresponds to all the executed acts of this plan.
Before we move on to the implementation of the
subplans, let's take a closer look at the relationship
between the resulting context and the WEI that
triggered the plan. We want to show that it is true that
if the execution of a WPI succeeded, then for some
event that can be instantiated from the predicate and
context in that WEI, the plan would also succeed, it
means that our approach sounds.
Lemma 4: If the execution of a plan invoked by a
WEI succeeds, then the execution of the plan would
also succeed for at least one event instance from the
WEI if used alone.
Proof: The context is changed only by using the
restriction operation in the case of both types of acts
(testing, action). According to Lemma 1, we know
that each substitution thus produced is a non-strict
superset of a substitution from the previous context.
The second operand in the restriction is given by the
act performed. Since non-strict superset is a transitive
relation, then every substitution in the resulting
context is an non-strict superset to some mgu arising
during the practical reasoning, which we denote by ฮ˜
in the proof of Lemma 2. Thus, if the context changes
from ฮ˜ to ฮž๎ตŒ๐‘๐‘ก๐‘ฅ
๎ฌด
and then by carrying out the acts
of the plans to ๐‘๐‘ก๐‘ฅ
๎ฌต
,๐‘๐‘ก๐‘ฅ
๎ฌถ
โ€ฆ๐‘๐‘ก๐‘ฅ
๎ฏก
, then by Lemma 1
for each ๐œŽ
๎ฏก
โˆˆ๐‘๐‘ก๐‘ฅ
๎ฏก
there is a sequence ๐œŽ
๎ฏฅ
โˆˆฮ˜, ๐œŽ
๎ฌด
โˆˆ
ctx
๎ฌด
,๐œŽ
๎ฌต
โˆˆ๐‘๐‘ก๐‘ฅ
๎ฌต
โ€ฆ๐œŽ
๎ฏก๎ฌฟ๎ฌต
โˆˆ๐‘๐‘ก๐‘ฅ
๎ฏก๎ฌฟ๎ฌต
such that ๐œŽ
๎ฏฅ
โŠ†
๐œŽ
๎ฌด
โŠ†๐œŽ
๎ฌต
โŠ† โ€ฆ๐œŽ
๎ฏก๎ฌฟ๎ฌต
โŠ†๐œŽ
๎ฏก
. Furthermore, thanks to the
same Lemma, this sequence would be replayed using
the same actions, according to Definition 13 and
Definition 14. That is, if some one mgu from ฮ˜ were
taken during practical reasoning, above ๐œŽ
๎ฏฅ
, then the
plan would be feasible.
A corollary of this Lemma is that if the plan is
successfully executed, the analysis of the resulting
substitutions can determine for which all mgu of ฮ˜
the plan would be successfully executable. A simple
way to determine this is that if an element from ฮ˜ is
a subset of some element from the resulting context,
then this element determines the goal that will be
achieved by the plan, since it is the mgu obtained
during practical reasoning in the search for a relevant
plan for some WEI.
Example 3: For a WEI
๎ต!๐‘”๐‘œ
๏ˆบ
๐‘‹,๐‘Œ,๐‘
๏ˆป
,๏ˆผ๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /
๐‘‹๏ˆฟ๏ˆฝ.๏ˆผ๏ˆพ๐‘Ÿ๐‘–๐‘œ/๐‘‹๏ˆฟ๏ˆฝ ๎ต
the plan with triggering event
๎ต…!๐‘”๐‘œ
๏ˆบ
๐ด,๐ต,๐ถ
๏ˆป
is chosen. The plan is relevant and the
ฮ˜๎ตŒ๏ˆผ
๏ˆผ
๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /๐ด๏ˆฟ,๏ˆพ๐‘Ÿ๐‘–๐‘œ/๐ด๏ˆฟ
๏ˆฝ
๏ˆฝ contains all the mgu for
the WEI and triggering event of the plan. The
resulting context after such a plan is executed is for
example
๏ˆผ๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /๐ด๏ˆฟ,๏ˆพ๐‘๐‘Ž๐‘Ÿ/๐ต๏ˆฟ,๏ˆพ๐‘š๐‘œ๐‘›/๐ถ๏ˆฟ๏ˆฝ,๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /
๐ด๏ˆฟ,๏ˆพ๐‘ก๐‘Ÿ๐‘Ž๐‘–๐‘›/๐ต๏ˆฟ,๏ˆพ๐‘ก๐‘ข๐‘’/๐ถ๏ˆฟ๏ˆฝ๏ˆฝ.
We can see, that this plan is
feasible for the goal ๐‘”๐‘œ
๏ˆบ
๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ ,๐‘Œ,๐‘
๏ˆป
because ๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /
๐ด๏ˆฟ๏ˆฝ โŠ† ๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /๐ด๏ˆฟ,๏ˆพ๐‘๐‘Ž๐‘Ÿ/๐ต๏ˆฟ,๏ˆพ๐‘š๐‘œ๐‘›/๐ถ๏ˆฟ๏ˆฝand ๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /๐ด๏ˆฟ๏ˆฝ โŠ†
๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /๐ด๏ˆฟ,๏ˆพ๐‘ก๐‘Ÿ๐‘Ž๐‘–๐‘›/๐ต๏ˆฟ,๏ˆพ๐‘ก๐‘ข๐‘’/๐ถ๏ˆฟ๏ˆฝ,
but is not feasible for
๐‘”๐‘œ
๏ˆบ
๐‘Ÿ๐‘–๐‘œ,๐‘Œ,๐‘
๏ˆป
. Moreover, we know that this plan could
have been feasible if we had driven on Monday, or
taken the train on Tuesday.
The above example shows that plan execution
could be used to find the answer as understood in
(Sardina & Padgham, 2011). The answer-seeking
principle is familiar from the execution of programs
in PROLOG, and the process of querying and
obtaining answers can be seen in the execution of the
goals specified in the agent's plans. The query is given
in the form of a predicate that need not be ground, and
the answers are possibly bindings to variables for
which such a predicate is valid in the database. Since
we have shown that the resulting context contains all
substitutions for which a plan is feasible for some
WEI, these substitutions are also all possible answers
to the queries, which can be considered as all the
entities of a given WEI. The example above shows
that these answers could be reached through the
trigger event and final context of the plan. Creating
the instance set from them creates a base, which we
query with a predicate from the WEI. Thus, in
Example 3, such a base would contain two predicates
๐‘”๐‘œ
๏ˆบ
๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ ,๐‘๐‘Ž๐‘Ÿ,๐‘š๐‘œ๐‘›
๏ˆป
and ๐‘”๐‘œ
๏ˆบ
๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ ,๐‘ก๐‘Ÿ๐‘Ž๐‘–๐‘›,๐‘ก๐‘ข๐‘’
๏ˆป
which we obtained by applying substitutions
๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /
๐ด๏ˆฟ,๏ˆพ๐‘๐‘Ž๐‘Ÿ/๐ต๏ˆฟ,๏ˆพ๐‘š๐‘œ๐‘›/๐ถ๏ˆฟ๏ˆฝ and ๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /๐ด๏ˆฟ,๏ˆพ๐‘ก๐‘Ÿ๐‘Ž๐‘–๐‘›/๐ต๏ˆฟ,๏ˆพ๐‘ก๐‘ข๐‘’/
๐ถ๏ˆฟ๏ˆฝ
to the trigger event ๐‘”๐‘œ
๏ˆบ
๐ด,๐ต,๐ถ
๏ˆป
. The question
would be
๐‘”๐‘œ
๏ˆบ
๐‘‹,๐‘Œ,๐‘
๏ˆป
, which will provide answers
๏ˆผ๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /๐‘‹๏ˆฟ,๏ˆพ๐‘๐‘Ž๐‘Ÿ/๐‘Œ๏ˆฟ,๏ˆพ๐‘š๐‘œ๐‘›/๐‘๏ˆฟ๏ˆฝ,๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /๐‘‹๏ˆฟ,๏ˆพ๐‘ก๐‘Ÿ๐‘Ž๐‘–๐‘›/
๐‘Œ๏ˆฟ,๏ˆพ๐‘ก๐‘ข๐‘’/๐‘๏ˆฟ๏ˆฝ
.
We summarize the above in the following
Lemma, which we provide without proof, noting that
we have demonstrated its validity above.
Lemma 5: For some WEI and for a selected
relevant and applied plan containing only actions or
test goals, the interpreted system interpreting the
program with late bindings will provide all possible
answers with respect to the chosen actions.
We can now consider plans that contain some
achievement goals, and show that what is stated in the
previous Lemma holds for them as well. But first we
need how the achievement goal is implemented.
Definition 15: Achievemnt goal is executed for
some WPI
๎ต๐‘ก
๎ฏ˜
.!๐‘
๏ˆบ
๐’•
๏ˆป
;๐‘๐‘™๐‘Ž๐‘›๐‘๐‘œ๐‘‘๐‘ฆ,๐‘๐‘ก๐‘ฅ๎ต such that WEI
๎ต!๐‘
๏ˆบ
๐’•
๏ˆป
,๐‘๐‘ก๐‘ฅ
๏‡ฑ
๎ต where ๐‘๐‘ก๐‘ฅ
๎ฌต
๎ตŒ๐‘๐‘ก๐‘ฅโ‰บ๐‘
๏ˆบ
๐’•
๏ˆป
is
generated, (see Definition 3). The execution of the
WPI is suspended until the sub-plan is successfully
executed, which ends up as
๎ต!๐‘
๏ˆบ
๐’•
๎ฌถ
๏ˆป
,๐‘›๐‘ข๐‘™๐‘™,๐‘๐‘ก๐‘ฅ
๎ฌถ๎ฏ™
๎ต.
The original WPI then continues as
ICAART 2022 - 14th International Conference on Agents and Arti๏ฌcial Intelligence
722
๎ต๐‘ก
๎ฏ˜
.๐‘๐‘™๐‘Ž๐‘›๐‘๐‘œ๐‘‘๐‘ฆ,๏ˆบ๐‘
๏ˆบ
๐’•
๐Ÿ
๏ˆป
,๐‘๐‘ก๐‘ฅ
๎ฌถ๎ฏ™
โˆฝ๐‘
๏ˆบ
๐’•
๏ˆป
,๐‘๐‘ก๐‘ฅ๏ˆป๎ต
The change of context here is done according to
Definitions 6 and 7, by which we can break this
operation down as
๐‘
๏ˆบ
๐’•
๐Ÿ
๏ˆป
,๐‘๐‘ก๐‘ฅ
๎ฌถ๎ฏ™
โˆฝ๐‘
๏ˆบ
๐’•
๏ˆป
,ctx๎ตŒ
๏‰€
๐‘
๏ˆบ
๐’•
๐Ÿ
๏ˆป
,๐‘๐‘ก๐‘ฅ
๎ฌถ๎ฏ™
โˆฝ๐‘
๏ˆบ
๐’•
๏ˆป
๏‰
โŠ“ctx๎ตŒ
๐œŒ๐‘ˆ
๏‰€
๐‘
๏ˆบ
๐’•
๏ˆป
,๐ผ๐œŽ๎ตซ๐‘
๏ˆบ
๐’•
๐Ÿ
๏ˆป
,๐‘๐‘ก๐‘ฅ
๎ฌถ๎ฏ™
๎ตฏ
๏‰
โŠ“ctx.
Thus, the query
๐‘
๏ˆบ
๐’•
๏ˆป
to the basis ๐ผ๐œŽ๎ตซ๐‘
๏ˆบ
๐’•
๐Ÿ
๏ˆป
,๐‘๐‘ก๐‘ฅ
๎ฌถ๎ฏ™
๎ตฏ
is performed as a broad unification using the
predicate of the original achievement goal
!๐‘
๏ˆบ
๐’•
๏ˆป
. This
query provides all answers according to the
successfully executed chosen plan. These answers are
then restricted by the context of the original plan and
the result is the new context of the original WPI.
Example 4: Suppose that there is a WPI
๎ต!๐‘ฃ๐‘–๐‘ ๐‘–๐‘ก
๏ˆบ
๐‘‰,๐‘‹
๏ˆป
,!๐‘”๐‘œ
๏ˆบ
๐‘‹,๐‘Œ,๐‘
๏ˆป
; ๐‘๐‘™๐‘Ž๐‘›๐‘๐‘œ๐‘‘๐‘ฆ,
๏ˆผ
๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /
๐‘‹๏ˆฟ,๏ˆพ๐‘ข๐‘›๐‘๐‘™๐‘’/๐‘‰๏ˆฟ๏ˆฝ,๏ˆผ๏ˆพ๐‘Ÿ๐‘–๐‘œ/๐‘‹๏ˆฟ,๏ˆพ๐‘“๐‘Ÿ๐‘–๐‘’๐‘›๐‘‘/๐‘‰๏ˆฟ๏ˆฝ
๏ˆฝ
๎ต
which was generated for this WEI. Such a plan
could be implemented for an agent who wants to go
on a trip and visit someone at the same time. The
context of this plan gives the possibilities of visiting
an uncle in Paris, or a friend in Rio. The achievement
goal
!๐‘”๐‘œ
๏ˆบ
๐‘‹,๐‘Œ,๐‘
๏ˆป
is to find a means of getting to some
place the agent would like to be. This plan in Example
3 ended with the agent receiving the answers
๏ˆผ๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /๐‘‹๏ˆฟ,๏ˆพ๐‘๐‘Ž๐‘Ÿ/๐‘Œ๏ˆฟ,๏ˆพ๐‘š๐‘œ๐‘›/๐‘๏ˆฟ๏ˆฝ,๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /๐‘‹๏ˆฟ,๏ˆพ๐‘ก๐‘Ÿ๐‘Ž๐‘–๐‘›/
๐‘Œ๏ˆฟ,๏ˆพ๐‘ก๐‘ข๐‘’/๐‘๏ˆฟ๏ˆฝ
. after obtaining all possible answers
according to this plan. This is the result of the
operation
๐‘
๏ˆบ
๐‘”๐‘œ๏ˆบ๐ด, ๐ต,๐ถ๏ˆป
๏ˆป
,๏ˆผ๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /๐ด๏ˆฟ,๏ˆพ๐‘๐‘Ž๐‘Ÿ/๐ต๏ˆฟ,๏ˆพ๐‘š๐‘œ๐‘›/
๐ถ๏ˆฟ๏ˆฝ,๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /๐ด๏ˆฟ,๏ˆพ๐‘ก๐‘Ÿ๐‘Ž๐‘–๐‘›/๐ต๏ˆฟ,๏ˆพ๐‘ก๐‘ข๐‘’/๐ถ๏ˆฟ๏ˆฝ๏ˆฝ โˆฝ ๐‘”๐‘œ๏ˆบ๐‘‹,๐‘Œ,๐‘๏ˆป. By
Definition 15, the restriction with the original WPI
context which was
๏ˆผ
๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /๐‘‹๏ˆฟ,๏ˆพ๐‘ข๐‘›๐‘๐‘™๐‘’/๐‘‰๏ˆฟ๏ˆฝ,๏ˆผ๏ˆพ๐‘Ÿ๐‘–๐‘œ/
๐‘‹๏ˆฟ,๏ˆพ๐‘“๐‘Ÿ๐‘–๐‘’๐‘›๐‘‘/๐‘‰๏ˆฟ๏ˆฝ
๏ˆฝ
is to be made and then the new
context is
๏ˆผ๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /๐‘‹๏ˆฟ,๏ˆพ๐‘๐‘Ž๐‘Ÿ/๐‘Œ๏ˆฟ,๏ˆพ๐‘š๐‘œ๐‘›/๐‘๏ˆฟ,๏ˆพ๐‘ข๐‘›๐‘๐‘™๐‘’/
๐‘‰๏ˆฟ๏ˆฝ,๏ˆผ๏ˆพ๐‘๐‘Ž๐‘Ÿ๐‘–๐‘ /๐‘‹๏ˆฟ,๏ˆพ๐‘ก๐‘Ÿ๐‘Ž๐‘–๐‘›/๐‘Œ๏ˆฟ,๏ˆพ๐‘ก๐‘ข๐‘’/๐‘๏ˆฟ,๏ˆพ๐‘ข๐‘›๐‘๐‘™๐‘’/๐‘‰๏ˆฟ๏ˆฝ๏ˆฝ
.
Theorem 2: If for some WEI
โŒฉ
๐‘’๐‘ฃ๐‘ก, ๐‘๐‘ก๐‘ฅ
โŒช
a plan is
successfully executed, and the resulting WPI of this
plan is
๎ต๐‘ก
๎ฏ˜
,๐‘›๐‘ข๐‘™๐‘™,๐‘๐‘ก๐‘ฅ
๎ฏ™
๎ต , then the result of executing
the achievement goals according to the predicate
๐‘’๐‘ฃ๐‘ก
and the substitutions in the context of
๐‘๐‘ก๐‘ฅ is a result
encompassing all the goals achieved by the plan with
respect to the selected actions and subplans.
Proof: Thanks to the above Lemma 5, we know
that if we have a WEI of the form
โŒฉ
๐‘’๐‘ฃ๐‘ก,๐‘๐‘ก๐‘ฅ
โŒช
and a WPI
of some plan that does not contain an achievement
goal is successfully executed, then all possible
answers to the given goals that can be achieved by
executing this WPI are obtained. Thus, if we have an
achievement goal
!๐‘
๏ˆบ
๐’•
๏ˆป
within some plan, then a WEI
๎ต!๐‘
๏ˆบ
๐’•
๏ˆป
,๐‘๐‘ก๐‘ฅโ€ฒ๎ต wbere ๐‘๐‘ก๐‘ฅโ€ฒ is the actual context is
created, and if this goal was achieved by the WPI of
some plan without other achievement goals, then the
agent would receive all possible answers to
!๐‘
๏ˆบ
๐’•
๏ˆป
.
According to the definition of the implementation
of this type of goals, we know that the new context is
given by these (all) answers and restrictions with the
original context and thus, according to Theorem 1,
contains all possible substitutions that agree with the
original context and the answers received. Such a
WPI, if successfully executed, will provide through
the resulting context all possible substitutions that
agree with the executed plans. By induction, if an
agent would need more immersions in subplans for
some goal, say up to level n, then we can prove that
WPIs that need at most two levels of subplans achieve
all possible substitutions, and then proceed similarly
up to level n.
5 CONCLUSIONS
In this paper, we have presented an interpretation of
the execution of a plan written in AgentSpeak(L)
using late binding of variables. What this approach
brings to the interpretation of this language is that the
agent thus has available at any point in time all the
substitutions that are valid with respect to all the acts
it has performed with a given WPI. This in itself does
not necessarily improve the rationality of the agent's
behaviour. Still, at some points the agent has to decide
for some substitutions when it has to perform an
action. However, late binding of variables can help
avoid premature erroneous choices of substitutions,
because by delaying their selection, the agent has the
opportunity to evaluate the situation when it must
make the decision. Moreover, if the agent maintains
all the ways it can still bind variables, this can be
beneficial even when the agent is pursuing multiple
goals and can look for synergies between plans for
these goals, but also for synchronizing the actions of
agents in a multi-agent group.
Systems that have addressed this so far either do
not work with variables at all, or consider variable
binding as an alternative when the initially chosen
binding fails (Sardina & Padgham, 2011) (Dastani,
2008). When researchers do work with focuses and
with the choice of plans for goals, they currently work
with goal plan trees, in which formulas are written as
propositional and thus do not consider predicates as
such (Yao & Logan, Action-Level Intention Selection
for BDI Agents, 2016) (Yao, Logan, & Thangarajah,
Robust execution of BDI agent programs by
exploiting synergies between intentions, 2016). We
believe that a system that can handle multiple options
at once by storing possible bindings until a decision
Late Bindings in AgentSpeak(L)
723
must be made will yield an increase in agent
behaviour in these respects. However, these are
suggestions for our future research, in which we
intend to use the principle of late bindings introduced
in this paper.
ACKNOWLEDGEMENTS
This work has been supported by the internal BUT
project FIT-S-20-6427.
REFERENCES
Bratman, M. E. (1987). Intention, Plans and Practical
Reason. Harvard University Press.
Bratman, M. E., Israel, D. J., & Pollack, M. E. (1988). Plans
and resource-bounded practical reasoning. Philosophy
and AI: Essays at the interface, strรกnky 7-22.
Cohen, P. R., & Levesque, H. J. (1990). Intention is choice
with commitment. Artificial Intelligence, Volume 42,
Issues 2-3, strรกnky 213-261.
Dastani, M. (2008). 2APL: a practical agent programming
language. Autonomous Agents and Multi-Agent Systems
volume 16, strรกnky 214-248.
d'Iverno, M., Kinny, D., Luck, M., & Wooldridge, M.
(1998). A Formal Specification of dMARS. Lecture
Notes in AI, 1365, strรกnky 155-176.
Georgeff, M. P., & Lansky, A. L. (1987). Reactive
reasoning and planning. Proceedings of the Sixth
National Conference on Artificial Intelligence (AAAI-
87), strรกnky 198-204.
Rao, A. S. (1996). AgentSpeak(L): BDI agents speak out in
a logical computable language. MAAMAW 1996:
Agents Breaking Away, strรกnky 42-55.
Rao, A. S., & Georgeff, M. (1991). Modeling Rational
Agents within a BDI-Architecture. Australian Artificial
Intelligence Institute.
Sardina, S., & Padgham, L. (2011). A BDI agent
programming language with failure handling,
declarative goals, and planning. Autonomous Agents
and Multi-Agent Systems 23, strรกnky 18-70.
Winikoff, M. (2005). An AgentSpeak Meta-interpreter and
Its Applications. Proceedings of the Third international
conference on Programming Multi-Agent Systems,
strรกnky 123-138.
Yao, Y., & Logan, B. (2016). Action-Level Intention
Selection for BDI Agents. Proceedings of the 2016
International Conference on Autonomous Agents &
Multiagent Systems.
Yao, Y., Logan, B., & Thangarajah, J. (2016). Robust
execution of BDI agent programs by exploiting
synergies between intentions. Proceedings of the
Thirtieth AAAI Conference on Artificial Intelligence
(AAAI-16), (strรกnky 2558-2564).
Zboril, F., Koci, R., Janousek, V., & Mazal, Z. (2008).
Reactive Planning with Weak Plan Instances.
Proceedings of ISDA 2008.
Zboril, F., Zboril, F. V., & Kral, J. (2013). Flexible Plan
Handling using Extended Environment. 12th
International Scientific Conference on Informatics,.
ICAART 2022 - 14th International Conference on Agents and Arti๏ฌcial Intelligence
724