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 Artificial 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 Artificial 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, lets 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 Artificial 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 Artificial 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 Artificial 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 Artificial Intelligence
724