Professional Documents
Culture Documents
177
AAMAS 2009 • 8th International Conference on Autonomous Agents and Multiagent Systems • 10–15 May, 2009 • Budapest, Hungary
Norm Meaning therefore adopt a representation for norms in our system as follows:
obligation(p) add a goal to achieve state p, from
Activation to Expiration. norm(Activation, Expiration, N orm)
obligation(a) add a new plan with a Activation trig-
where Activation is the activation condition for the norm to be-
gering event, and action a in its body.
come active, Expiration is the expiration condition to deactivate
prohibition(p) prevent adoption of plans that bring
the norm, and N orm is the norm itself. For example, if an agent
about state p.
is obliged to drive on the left when it is in Britain, but not when it
prohibition(a) prevent adoption of plans that execute
leaves, the norm denoting this obligation is represented as norm(in
action a.
(britain), notIn(britain), obligation(driveOn(left))).
In this context, we focus on using norms to determine whether
Table 1: Summary of norms and their meaning.
plans and actions may be executed, and on the introduction of new
triggering events linked to plans to satisfy new obligations.
It is important to note that we are not concerned, at this point,
it considers that autonomous agents must always have choice over with handling more complex norm representation schemes in the
their behaviour. This paper focuses on autonomous agents and how way that a complete deontic logic does. Rather, we reduce norm
to achieve flexible behaviour, thus we take precisely this approach. representation to these two outcomes of prohibition and obligation
From an individual agent’s perspective, the main effect of norms to facilitate the creation of concrete agent behaviours aimed at com-
on its reasoning is to determine which behaviours must be carried plying with a set of norms. Ultimately, however, norms created
out, and which behaviours must not be carried out or else some with a more complex representation language must be reduced to
form of punishment ensues. Of course, other types of norms pre- these two outcomes in order to enable meaningful modifications to
scribing preferences or more complex stipulations are possible, but an agent’s behaviour to be inferred.
from a practical perspective, and using a closed world assumption There are many possible interpretations for such activation and
where everything not prohibited is permitted, the possibility of non- expiration conditions, so it is important to specify what each condi-
binding recommendations can be ignored, leaving an agent’s own tion means for an agent. We consider the activation condition to be
reasoning process to determine the best courses of action. This a logical formula that, once entailed by an agent’s beliefs, results
means that we ignore permissions, since they just recommend be- in the norm being applicable to the agent. Conversely, we consider
haviours rather than require behaviours to be changed. Although the expiration condition to be a logical formula that, once entailed
we could include permissions as norm-modification operators in by an agent’s beliefs, results in the norm ceasing to be applicable
the sense that a permission may invalidate an obligation or prohi- to the agent. In what follows, we assume these conditions under
bition, the resulting system would have effectively the same func- a monotonic logic framework, so that when a condition becomes
tionality in terms of behaviour modification yet would complicate true, it will remain true in the future. We make this assumption
the discussion in this paper. now in order to simplify the description of our behaviour modifica-
tion technique, so that norms can be activated and expire only once
2.2 Norms and Goal Types through their activation and expiration conditions. In this way, once
Norms may refer to either: declarative world states, in which an a norm has been accepted and acted upon, there is no need for an
agent must try to achieve or refrain from achieving certain world agent to keep track of which norms have been accepted in the past,
states; or actions, in which an agent must try to execute or refrain since monotonicity ensures their activation does not occur multiple
from executing a particular action [6], as is summarised in Table 1. times. We can later drop this assumption, but it is useful to keep
Norms must have a well defined validity period; that is, a spec- it for ease of explanation, eliminating the need for more elaborate
ification of when a certain norm is in force and when it ceases to bookkeeping in our algorithms.
be in force. This validity period is crucial for the enforcement of
norms, particularly in the case of obligations, as without a deadline, 2.3 Norm Perception
an obliged party is not compelled to fulfill its obligation at any par- In relation to accepting a norm, we consider its life cycle relative
ticular time. For example, if a consumer is obliged to pay his or her to an agent to start with the norm being issued in an environment
electricity bill, it is not possible to detect a violation without know- (or society), and perceived by an agent. When an agent perceives
ing when this payment is due. Conversely, for prohibitions, certain new norms it decides whether or not to accept them (and modify its
industrial research positions require a researcher to sign a form of behaviour) [1], or reject them (and suffer potential sanctions, but
non-disclosure agreement that includes provisions forbidding the this is a macro level issue). Although the issue of perceiving and
researcher to engage in any competing research for a set period of deciding on accepting a norm has seldom been considered in the lit-
time, usually one year after the termination of the initial contract. erature, it is of considerable importance in open dynamic systems
Therefore, norm encodings normally include a representation of the regulated by norms. For example, in real human societies, norms
activation and expiration of each norm, indicating when the deon- are not inherent to the world, but rather created by some relevant
tic modality referred to in the norm (e.g. obligation and prohibition) authority and then made known to the parties to which a norm ap-
should be complied with. plies under the expectation that these norms will be accepted and
Now, since most agent languages, such as AgentSpeak(L), 3APL, complied with, which is not always the case. Furthermore, when an
and others [2] use first-order logic to represent beliefs, it is appro- agent enters a new environment, it is possible that it will encounter
priate to adopt a similar type of norm representation. Such a logic- a set of norms different from those for which it was designed. Here,
based representation of norms allows for a more straightforward an agent must be made aware of these norms and change its be-
use of an agent language in detecting when norms are being com- haviour accordingly. Although the decision to accept or reject a
plied with. Moreover, we leverage representational concepts from norm is important, and must consider the future implications of ig-
the formalisation of Oren et al.[11], which includes notions of ac- noring a norm and later violating it, we do not detail it due to space
tivation and expiration of a norm, delimiting their validity through limitations. Nevertheless, this may require subsequent obligations
time, an important aspect of norms in a dynamic environment. We to remedy violations [10] or incur penalties, for example.
178
Felipe Meneguzzi, Michael Luck • Norm-Based Behaviour Modification in Bdi Agents
Accept Verify
ditions when modifying an agent’s behaviour lies in what must be
Norm Consistency done in reaction to the agent accepting new norms. The two most
evident situations regarding activation and expiration conditions
Environment /
Norms Accept?
Change are: when the activation condition is already true, which means
Society Behaviour
that the norm must be enacted immediately and any contrary be-
haviours stopped; and when an expiration condition is already true,
Reject
Norm
Sanctions which means that the norm has expired and can be ignored. Clearly,
there are a number of possible combinations of activation and expi-
ration conditions, and each combination results in a different set of
actions an agent must carry out in order to comply with the norm.
Figure 1: Overview of norms processing in our system. We therefore analyse these combinations in Section 3.1 providing
an overview of the outcome of each combination for an agent want-
ing to comply with the norm. Subsequently, we further detail al-
We use the distinction of perception and belief to denote whether gorithms that generate these outcomes, starting with algorithms to
or not a norm has been accepted. If an agent has added a perceived react to the activation of a norm in Section 3.2, followed by the
norm to its belief-base, we consider the agent to have implicitly results of norm expiration in Section 3.3.
accepted the norm, and behaviour modification must ensue. In
order to facilitate the integration of deontic states into an agent 3.1 Norm Outcomes
system, we adopt the view of Pörn [12] that deontic statements We summarise all norm condition combinations and their out-
themselves can be seen as states of affairs. Thus, from an agent’s comes in Table 2, for each type of deontic modality considered in
perception point of view, the fact that a book is over a table (e.g. this paper (i.e. obligation and prohibition), and for each type of tar-
over(book, table)) is no different than a norm obliging an agent to get for the modality (either an action or a world state). The activa-
drive on the right (e.g. norm(X, Y, obligation(drive(right)))). tion and expiration condition columns give the truth-value of these
Given this representation, the difference between perception and conditions at the time the agent accepts the norm, so that (following
belief indicates a norm’s status in terms of acceptance by an agent. our monotonic assumption) True means the expression is true and
After accepting a norm, an agent needs to make sure that the will remain so, while False means the expression is not yet true.
norm is not in conflict with the set of norms already in effect for The first case we consider for all deontic modalities is when both
that agent and then modify its behaviour. For example, if an agent the activation and the expiration condition are true, which results
accepts a norm n1 that prohibits it from performing an action act, in the norm being ignored, as its expiration condition has already
and later perceives a norm n2 that obliges it to perform action act, elapsed. Norms are also ignored when the activation condition is
then n1 and n2 are in conflict. Thus, it is necessary for an agent to false but the expiration condition is true since, again, the norm has
make sure it does not accept conflicting norms which would result already expired. Now, if the activation condition is already true
in inconsistent behaviours, such as creating and executing plans when an agent accepts an obligation, it must react to either achieve
that carry out prohibited actions. the world state specified in an obligation(p), or execute the action
These processes are illustrated in Figure 1, in which rectangles specified in an obligation(a).
represent agent reasoning processes, rounded rectangles represent If this same combination of conditions occurs for a prohibition,
environmental or societal processes, and diamonds represent deci- it means that an agent must refrain from achieving the offending
sions within an agent. The flow starts with the receipt of norms world state or executing the offending action. Since an agent might
from the environment and the decision to accept or reject a norm. have already adopted an offending plan, it must not only suppress
The processes that follow from this decision (including potential plans that might violate the prohibition, but also drop any instances
sanctions) consist of verifying consistency and subsequently chang- of these plans adopted as intentions.
ing behaviour. In this paper, we focus only on the behaviour mod- Finally, when both the activation and expiration conditions are
ification part at the end of the flow in the figure. In particular, we false, an agent must create new plans to enforce compliance as
avoid the issue of maintaining norm consistency, a very complex soon as the activation condition holds and add them to the plan li-
problem in itself, having been addressed by other efforts [14] that brary. This plan creation step is necessary because in this situation
can be easily integrated into ours, as we discuss in our conclusions. the norm has not yet been activated, but the agent must be pre-
The point here is that while norms have been considered more pared for its activation in the future. In particular, if the norm refers
generally, especially in the context of normative bodies within so- to an obligation to achieve a world state, the agent must create a
cieties, the impact of norms on agent architectures, in particular plan that achieves the specified world state whenever the activation
BDI architectures, has received little attention. Specifically, the condition holds, whereas if it refers to an obligation to execute an
impact of norms at the level of an agent’s control cycle has been action, the new plan must execute that action. (Note that plans to
largely overlooked. Therefore, building on previous efforts, in par- comply with obligations to achieve world states are created using
ticular the planning capabilities described by Meneguzzi and Luck some kind of planning capability, of which there are many, and we
[9], and the communication framework defined by Vieira et al.[16], will not consider this further here.) Furthermore, if the norm refers
we address norms from the point at which an agent receives them. to a prohibition to achieve a world state, the new plan must sup-
In the following sections we proceed to detail the expected ac- press all plans that achieve the prohibited world state whenever the
tions an agent must undertake in order to comply with norms under activation condition holds, whereas if it refers to a prohibition to
various combinations of activation and expiration conditions. execute an action, the new plan must suppress all plans containing
the prohibited action. In both these cases, not only must plans be
3. NORM PROCESSING suppressed, but violating intentions must also be dropped.
As we have seen, our norm representation includes conditions Now, we understand that creating new plans to comply with
for norm activation and expiration, denoting when these norms are newly accepted norms, and later removing these plans after a norm
to affect an agent’s behaviour. The main consequence of these con- has expired, from a pragmatic point of view, is not necessarily the
179
AAMAS 2009 • 8th International Conference on Autonomous Agents and Multiagent Systems • 10–15 May, 2009 • Budapest, Hungary
optimal solution. For example, it is certainly possible for an agent belief literals, and a list h1 , . . . , hn of goals or actions [13]. Trig-
to use existing plans in its plan library to accomplish an obligation, gers may consist of the addition (denoted by a leading plus sign)
avoiding the need to generate a new plan from scratch. However, or deletion (denoted by a leading minus sign) of beliefs, achieve-
an agent must still ensure that the plan’s invocation condition is ment goals (denoted by an exclamation mark), or queries (denoted
compatible with the activation condition of the obligation, as well by a question mark), so that the addition of an achievement goal
as ensuring that it does not also bring about undesirable effects. g is denoted as +!g. In addition, we need to differentiate actions
This analysis process is complex in itself, and it is unclear how (which can also include internal actions representing some func-
the cost of this process compares to planning from first principles. tionality internal to an agent) from beliefs, which we do with a
Furthermore, removing plans makes perfect sense under our mono- preceding dot symbol; then, the action to vacuum a room is repre-
tonic assumption, since a norm will never occur in the exact same sented as .vacuum(room) (and the action to remove a plan from
form again in the future. However, if we drop the monotonic as- the plan library is written .remove_plan(P lan)), whereas the be-
sumption, plans should no longer be simply deleted after the norm lief that a room is clean is represented as clean(room). (Note that
has expired, but must instead be suppressed and stored for reuse for the specifics of how particular internal actions work are not impor-
norms with multiply recurring activation and expiration conditions. tant at this point, and we discuss them in detail later in Section 4
along with other implementation concerns.) Finally, we adopt the
3.2 Norm Activation plan labelling convention used in the Jason interpreter [2], whereby
plans are given unique labels in the form of predicates preceded by
Now that we have considered the possible high-level outcomes
the at (@) sign. For example, a plan @id e : c <- a. is uniquely
for an agent seeking to comply with norms, we consider how to deal
identified by the label id, which can be used later for plan manipu-
with the receipt of obligations and prohibitions in more detail. In
lation operations referring to the plan e : c <- a..
what follows, we assume only a BDI-type language with constructs
for goals to be or goals to do or both; and a plan library or similar
construct to store plans, which can be modified to reflect the set of 3.2.1 Obligations
possible plans an agent may adopt. This plan library is the target When an agent chooses to comply with a newly perceived obli-
of our norm processing mechanism, which generates changes in the gation, the steps it must take are as stated in more detail in Al-
set of possible plans an agent may adopt either by adding new plans gorithm 1. While this is an algorithm, it is also a plan, since the
to comply with obligations or by preventing existing plans from algorithm must be encoded as a plan for an agent to be able to use
being executed to comply with prohibitions. To accomplish these it. The plan is very simple and follows the basic requirements of the
changes, we need to modify an agent’s reasoning ability to be able outcomes of accepting an obligation as shown in Table 2. That is,
not only to deal with the world through its actions, but also to deal if an obligation has already expired, it can be ignored; otherwise,
with its own data structures, its available plans in particular. As a new plans must be added to handle the activation and expiration
consequence, we need meta-level operators that can suppress plans conditions of the norm. If the obligation has been activated, it must
from being selected from a plan library or from being generated by be acted upon. Thus, Line 1 checks whether the agent believes the
a planner, and can introduce new plans to the plan library. norm has expired, and if so, ignores it. Next in Line 4, the agent
In the following sections we refer to some algorithms as tem- adds a new plan, from Algorithm 2, to deal with the activation con-
plates, or abstract algorithms that need to be further specified at dition. If the norm activation condition is true, the plan must be
runtime in order to be instantiated as concrete algorithms. This is performed immediately, either achieving a specified world state or
because most agent languages define agent behaviours in terms of executing an action. Finally, the agent adds a new plan to handle
reactions to certain conditions in the environment, and the norm the expiration of the obligation, which we explain in Section 3.3.
processing behaviours we specify are defined in terms of their ac- This newly added plan is detailed in Algorithm 2, and consists
tivation and expiration conditions. More specifically, we consider of either adding a new goal to achieve an obligatory world state,
the addition of plans to handle activation conditions for each type or executing an obligatory action upon the perception of the norm
of deontic modality in the algorithms shown in Sections 3.2.1 and activation event. Note that Algorithm 2 is a plan template; that is, it
3.2.2, and the plans to handle expiration conditions in Section 3.3. shows the general form of plans that are instantiated with informa-
Now, in order to illustrate the operation of these algorithms, we tion about a specific norm and its associated activation condition.
use an AgentSpeak(L) implementation as an example, instantiating Since we are not concerned in this paper with the process by which
the algorithms appropriately. For this to be meaningful, we must an agent decides whether to comply with a norm, in both plans we
introduce the notation used for AgentSpeak(L) plans. An Agent- assume that acceptance has been determined, indicated in the pre-
Speak(L) plan e : b1 & . . . &bm ← h1 ; . . . ; hn . is composed of a requisites of each algorithm. However, this decision to accept or
triggering event e, a context condition expressed by the b1 , . . . , bm reject a norm could be taken later in the reasoning process, depend-
180
Felipe Meneguzzi, Michael Luck • Norm-Based Behaviour Modification in Bdi Agents
181
AAMAS 2009 • 8th International Conference on Autonomous Agents and Multiagent Systems • 10–15 May, 2009 • Budapest, Hungary
Algorithm 4 Plan template to react to state prohibition activation. entails that once a norm has been activated and then expired, it will
Require: Acceptance of norm(Activ, Exp, prohibition(P )) never become active again. Thus, Algorithms 1 and 3, containing
Require: Receipt of Activ event plans for reacting to norms, also include a final step to add a plan
Require: Intention structure I; Plan library P L dealing with norm expiration to the plan library. Such norm ex-
Require: Plan uniquely labelled with label LActiv,prohibition(P ) piration plans aim to undo the behavioural changes effected when
Ensure: Suppressed plans are stored in set SP lans,prohibition(P ) the norms were activated, thus restoring the plan library to a state
1: for all Intention i ∈ I do in which an agent’s behaviour is not affected by them. Thus, the
2: if (P is a world state p) and (p is a consequence of i) then plan in Algorithm 5 consists both of removing the plan responsible
3: Drop intention i for dealing with obligation activation and afterwards of removing
4: else if P is an action a then itself from an agent’s plan library. Both these plans must be individ-
5: for all Steps s in remaining steps of i do ually identifiable within an agent’s plan library, so we label them
6: if s = a then respectively LActiv,obligation(O) and LExp,obligation(O) in order
7: Drop intention i to remove them when they are no longer needed.
8: end if Algorithm 5 Plan to react to the expiration of an obligation.
9: end for Require: Acceptance of norm(Activ, Exp, obligation(O))
10: end if Require: Receipt of Exp event
11: end for Require: Label LActiv,obligation(O) for a norm activation plan
12: for all Plans pl ∈ P L do Require: Plan library P L
13: if (P is a world state p) and (p is a consequence of i) then Ensure: Plan is uniquely labelled with label LExp,obligation(O)
14: Suppress pl 1: Remove plan LActiv,obligation(O) from P L
15: SP lans,prohibition(P ) = SP lans ∪ pl 2: Remove plan LExp,obligation(O) from P L
16: else if P is an action a then
17: for all Steps s in pl do The acceptance of prohibitions, on the other hand, not only adds
18: if s = a then new plans to react to norm activation and expiration, it also affects
19: Suppress pl which plans are available to an agent after a prohibition has been
20: SP lans,prohibition(P ) = SP lans ∪ pl activated. Thus, the plan to react to the expiration of a prohibi-
21: end if tion must not only remove the new plans added to comply with the
22: end for norm, it must also restore the plans previously suppressed to their
23: end if initial state of availability. The plan of Algorithm 6 accomplishes
24: end for this by unsuppressing the initially suppressed plans which, in the
plan of Algorithm 4, were stored in the set SP lans,prohibition(P ) ,
and then removing plans LActiv,prohibition(P ) and
be unsuppressed. LExp,prohibition(P ) from the plan library.
1 @prohibitionStart(in(classifRoom)) Algorithm 6 Plan to react to the expiration of a prohibition
2 +!Start : true
3 <- !findPlansWithEffect(in(classifRoom), SPlans); Require: Acceptance of norm(Activ, Exp, prohibition(P ))
4 !suppressPlans(SPlans); Require: Receipt of Exp event
5 +suppressedPlans(in(classifRoom),SPlans). Require: Label LActiv,prohibition(P ) for a norm activation plan
6
7 @prohibitionEnd(in(classifRoom)) Require: Plan library P L
8 +!End : suppressedPlans(in(classifRoom),SPlans) Require: SP lans,prohibition(P ) of suppressed plans
9 <- !unsuppressPlans(SPlans); Ensure: Plan is uniquely labelled with label LExp,prohibition(P )
10 .remove_plan(prohibitionStart(in(classifRoom)));
11 .remove_plan(prohibitionEnd(in(classifRoom))).
1: Unsuppress all plans from SP lans,prohibition(P )
Listing 2: Plans generated from a state prohibition. 2: Remove plan LActiv,prohibition(P ) from P L
3: Remove plan LExp,prohibition(P ) from P L
Plans to effect restrictions on executing actions are very simi-
lar to those relating to achieving world states, the only difference
being in the process for selecting the plans that need to be sup- 4. NORMATIVE AGENTSPEAK(L)
pressed. In this case, the plans searched for are those that contain In order to test the viability of our solution in a practical agent
a particular action. For example, if the cleaning agent might be language, we have developed an implementation of the strategies
obliged not to vacuum a table during its rounds of cleaning through outlined in Section 3 using an AgentSpeak(L) interpreter. An im-
the norm +norm(time(800), day(xmas), prohibition(vacuum( portant part of this involves the manipulation of an agent’s own
table)))[source(env)]. We do not include the example plans plan library, necessitating a means to perform meta-reasoning, al-
due to space constraints, but they should be obvious. lowing AgentSpeak(L) plans to manipulate other plans. With such
a meta-reasoning facility in place, we can create AgentSpeak(L)
3.3 Norm expiration plans that accomplish the norm-induced behaviour modification de-
Now that we have seen the plans needed to start complying with scribed above. We also point out that, while the plans shown in Sec-
norms under several circumstances, we need to examine how an tion 3 use constructs that were not described in detail, this section
agent behaviour is modified as a result of a norm expiring. When clarifies all the plan constructs used throughout the paper.
an agent accepts a norm and changes its behaviour as a result of
the norm becoming active, it either includes extra plans to comply 4.1 Meta-reasoning for AgentSpeak(L)
with obligations or suppresses some of its plans in order to vio- The AgentSpeak(L) language does not have explicit constructs
late a prohibition. However, these behaviour modifications should for the analysis of a plan library, yet this is required in the strate-
not become permanent within an agent if the norms that caused gies described in Section 3 and implemented in Section 4.2. In par-
them cease to be active. Moreover, our monotonicity assumption ticular, for an agent to evaluate its existing behaviours, encoded in
182
Felipe Meneguzzi, Michael Luck • Norm-Based Behaviour Modification in Bdi Agents
183
AAMAS 2009 • 8th International Conference on Autonomous Agents and Multiagent Systems • 10–15 May, 2009 • Budapest, Hungary
184