On the Grey-Box Modelling Approach for ... - Semantic Scholar

1 downloads 0 Views 152KB Size Report
On the Grey-Box Modelling Approach for. Autonomous Agents. Mirko Viroli, Andrea Omicini∗. DEIS, Universit`a degli Studi di Bologna, via Rasi e Spinelli 176, ...
On the Grey-Box Modelling Approach for Autonomous Agents Mirko Viroli, Andrea Omicini∗ DEIS, Universit`a degli Studi di Bologna, via Rasi e Spinelli 176, 47023 Cesena (FC), Italy {mviroli,aomicini}@deis.unibo.it

Abstract. One of the main issues in the engineering of multi-agent systems is to give a formal semantics to agent communicative acts. This is generally done by describing how agent interactions with the environment affect and are affected by the agent inner behaviour – e.g., by the agent decisions its perception of the world. FIPA ACL semantics is one of the best-known examples of this approach. In this paper, we show how this technique can be seen in terms of providing a grey-box abstract model for agents, where only the agent part responsible for the interaction with the environment is represented, while the hidden part concerning the agent internal behaviour is abstracted away. We first provide a general framework for describing the semantics of communicative acts in terms of an operational semantics for agents, grounded on the framework of transition systems. Then, some examples are provided to show its flavours to encode typical aspects of ACL semantics.

1

Introduction

In the field of Multi-Agent Systems (MAS), modelling an agent behaviour is a difficult challenge, especially as far as both agent internal aspects and agent collaborative behaviour are concerned. On the one hand, agents are not amenable for a characterisation in terms of whitebox entities, i.e. whose internal machinery behaviour is fully represented. This machinery can either be simply too complex to fully understand and predict its dynamics, as in the case of intelligent agents, or it can be unknown independently from its complexity, in the relevant case of agents wrapping legacy systems. On the other hand, modelling agents as pure black-box entities, known only in terms of the set of actions they are able to perform on the environment, is often a too severe constraint, which badly supports a true engineering methodology. While this modelling technique is quite traditional in the field of concurrency theory – being the basis of the observational approach to the characterisation of interactive components, as promoted by process algebras [1] –, it seems somehow inadequate to agent-based systems. In fact, autonomy makes agent interactions and agent internal machinery loosely coupled, so that simply considering an agent interaction histories often provides very limited information on the actual status of the agent – e.g. its perception of the environment and its objectives. For instance, an agent receiving ∗

This work has been partially supported by MIUR, and by Nokia Research Center, Burlington, MA, USA.

Act

C

B FP / RE I

agent internal machinery

FP U

Figure 1: FIPA ACL abstract acrhitecture

a message provides very few information about any actual effect on the agent behaviour, for the agent can simply decide to ignore the message. As a result, the most reasonable way to tackle the problem of agent modelling seems to rely on an intermediate approach in between the white- and the black-box ones, namely a grey-box approach [10]. By this modelling technique, most agent inner details are abstracted away, and only the aspects directly related to the management of interactions with the environment are explicitly represented and described. In particular, the grey-box approach calls for a conceptual separation of an agent model: the white part, responsible for the interaction of the agent with its environment, and the black part, typically including the most complex – and often partially known – aspects of an agent behaviour, which only indirectly influence the interaction with the environment. While the hidden aspects of the black part are generally to be abstracted away, the grey-box modelling approach promotes the idea of just representing those aspects of the black part that may influence the evolution of the white part, thus resulting in some interaction with the environment. These aspects, in particular, are those typically taking into account the notion of agent proactiveness [11], that is, the ability of an agent to act on the environment as the result of an internal process. By the grey-box modelling technique, an agent interactive behaviour can be represented without describing its most cumbersome parts – e.g. those including planning and inference activities –, so that compact characterisations still provide for reasoning about an agent collaborative behaviour in MAS. Interestingly enough, the typical approaches to provide a semantics to an agent communication language (ACL) indeed implicitly rely on the grey-box modelling approach. The most notable example is the semantics proposed by the Foundation for Intelligent Physical Agents (FIPA) to its ACL [2]. In this proposal, any agent communicative act is formally described in terms of feasible preconditions (FP) that must hold in the act’s sender, and rational effects (RE) that the sender may suppose to occur on the receiver – even though these effects are not actually mandatory for the receiver, because of its need to preserve autonomy. In particular, the specification of FP and RE is given in terms of the Semantic Language (SL) [8], a multi-modal logic language with operators for Beliefs (B), Desires (D), Intentions (I), and Uncertain Beliefs (U) based on the BDI framework [7]. Providing this specification means to suppose that the agent is conceptually based on an abstract architecture following the greybox approach, which can be depicted as shown in Figure 1. FP are defined over beliefs, uncertain beliefs, and intentions, and are used to decide which communicative acts are to be sent out. Also, the agent internal machinery should be clearly aware of any communicative

act sent or received by the agent (Act). Notice that since RE are not mandatory for the agent, their logics is not conceptually part of the represented portion of the agent. Instead, details about RE can be used by an agent internal machinery to assume the effects of the sent messages on the receiver, whereas details about the FP can be used to infer information about the mental state of the sender. The goal of this paper is to investigate the relationship between the grey-box modelling approach and the description of an ACL formal semantics. In Section 2 a formal framework for grey-box modelling approaches is given. There, a general description of the agent white part is “compiled” into a transition system semantics, which describes the single-step computational and interactive capability of the agent, resulting in a so-called operational semantics. In Section 3 we describe how this framework fits the notion of ACL semantics, and we provide some examples where typical aspects of ACLs such as FP and RE can be encoded in our model. Section 4 provides concluding remarks and discusses future works. 2 2.1

The grey-box modelling approach Notation

Given any set X, ranged over by variable x by default, the set of multisets over X is denoted by X, and is ranged over by variable x. Union of multisets x and x0 is denoted by x|x0 , concatenation of sequences x b and x b0 by x b; x b0 , void multiset and empty sequence by •. Given any set X, symbol ⊥X is used to denote an exception value in set X⊥ defined as X ∪ {⊥X }. Variable x⊥ is automatically defined that ranges over set X⊥ . 2.2

Transition Systems

In this paper, we exploit the formal framework of (labelled) transition systems, which is widely used in the field of process algebra [1] to specify the behaviour of interactive components. In particular, a transition system is said to provide an operational semantics for a component, in that it describes its single-step computational and interactive capabilities. A transition system over set X is a triple hX, →, Acti where Act is called the set of actions and →⊆ X × Act × X is a relation. The occurrence of hx, act, x0 i in → means that the software component of interest may move from state x to state x0 processing action act – modelling either an internal computation or an interaction with environment –, and is represented by act notation x −→ x0 . Transition systems feature interesting properties that make them particularly appealing as mathematical structures for describing the behaviour of interactive systems. First of all, transition systems intrinsically take into account non-determinism – which is a peculiar aspect of the composition of interactive components in open environments. For instance, in a given transition relation both the triples hx, a, x0 i, hx, a0 , x00 i, and hx, a0 , x000 i can occur – which means that in state x, the component may either perform action a or a0 , and moreover, by performing a0 it can either move to x00 or x000 . Non-determinism is generally used as a powerful abstraction tool, in that the specification of a system actually provides a number of allowed behaviours. Associated to the concept of non-determinism, transition systems also promotes the idea of refinement of specifications. Actions in a transition system can be interpreted as a view of

the component transition from a state to another. According to a given semantics, it is then possible to characterise a component in terms of all possible behaviours it can exhibit through these actions. For instance, according to trace semantics [3], a component description can be associated to all the sequences of actions it can exhibit, called trace histories. By the idea of horizontal refinement [4], then, a component description is considered an “implementation” of another, if it allows for strictly more trace histories – which is the idea traditionally endorsed in [5, 9]1 . In this framework, transition systems can be generally exploited as a tool for both describing component abstract specifications and component implementations. The problem of checking conformance of an implementation with respect to an implementation can be addressed by providing both description in terms of transition systems, and then verifying if a preorder relation hold on them – according to the given semantics. Similarly, two components can be considered equivalent – hence, substitutable as subparts of a common supersystem – if their transition systems allow for the same set of behaviours. Notice that these two very cases, referred to as the process preorder and equivalence problems, are the main subject of the process algebra field. 2.3

Operational Semantics

Our intention here is to represent an agent in terms of a software abstraction interacting with its environment either by (i) receiving a communicative act, changing its internal state, and reactively sending communicative acts (reactive action), or (ii) proactively changing state and sending communicative acts (proactive action). 2 Following the grey-box approach, the agent is conceptually split in two loosely coupled parts: the (agent) internal machinery and the (agent) core – which are respectively the white and black part of its specification. Both parts have a local status, orderly the observation status (O) and the internal status (I), with an intermediate part called the agent place (P) mediating between them, but still conceptually included in the agent core. Internal machinery behaviour is abstracted away, and is only considered as far as it can affect core behaviour. This is supported by the set E of (internal) events raised by the internal machinery and affecting the agent place. The corresponding semantics is then represented by e a transition system E = hP, −→E , Ei, so that p − →E p0 means that place p moves to p0 when event e is raised. On the other hand, the agent core is the part implementing the interactive behaviour of the agent, that is, processing input communication acts (ic) or internal events (e) and correspondingly sending output communicative acts (oc). This can be described by the transition system O = hP × O, −→O , (Ic ∪ E) × Oc ⊥ i. Transitions icBoc

⊥ 0 0 hp, oi −−−−→ O hp , o i

eoc

⊥ 0 0 hp, oi −−−→ O hp , o i

respectively represent (i) the reactive action where core state hp, oi moves to hp0 , o0 i by receiving act ic and correspondingly sending act oc ⊥ , and (ii) the proactive action where core state hp, oi moves to hp0 , o0 i by intercepting internal event e and sending act oc ⊥ . 1

The notion of vertical refinement that can be obtained by the so-called action refinement [4] – where the concept of “implementation” is interpreted as “more fine grained transitions” – has historically received less attention, and is not discussed here. 2 In this framework, we also suppose to represent by communications any kinds of agent interactions with the environment.

?

O

O

P

P

?

O

O

E

I

B B

A

O

P

A Figure 2: Pictorial representation of transition systems for an ACL specification

So, given an ACL whose input communicative acts range in Ic and output communicative acts range in Oc (which are typically the same set), its semantics is given by the couple hO, Ei, which is represented in the upper-left part of Figure 2. In particular, this specification can be exploited for defining the interactive behaviour of the agent by a transition system B = hP × O, −→B , Ic ⊥ × Oc ⊥ i, with −→B defined by rules: eoc

e

icBoc

p− →E p 0

⊥ 0 0 hp, oi −−−−→ O hp , o i

⊥ 00 0 hp0 , oi −−−→ O hp , o i

⊥ oc

icBoc

⊥ 00 0 hp, oi −−Ic−−−→ B hp , o i

⊥ 0 0 hp, oi −−−−→ B hp , o i

The action ic B oc ⊥ denotes reception of input act ic and possible reactive production of output act oc ⊥ (if this is not ⊥Oc ), and simply wraps the corresponding action of transition system O. The action ⊥Ic oc ⊥ denotes either a silent action (if oc ⊥ =⊥Oc ) or a proactive production of output act oc ⊥ (otherwise), and occurs when an internal event is (unpredictably) produced by the internal machinery. Transition system B defines the possible interactive behaviour of agents complying to the semantics given by hO, Ei, and is pictorially represented in upper-right part of Figure 2. On the other hand, an actual implementation of this specification – that is, the description of a compliant agent – can be defined by providing the black-part complete behaviour. This pB can be done in terms of transition system I = hI, −→I , P ∪ Ei, where a transition i −→I i0 represents the internal machinery moving from state i to i0 as agent place moves to p, while e transition i − →I i0 represent the internal machinery raising event e and moving from i to i0 . So, the agent behaviour can now be expressed in terms of structure hI, O, Ei by transition system A = hP × O × I, −→A , Ic ⊥ × Oc ⊥ i, defined by rules: icBoc

⊥ 0 0 hp, oi −−−−→ O hp , o i

p0 B

i −−→I i0

icBoc

⊥ 0 0 hp, o, ii −−−−→ A hp , o , ii

e

i− →I i0

e

p− →E p0

eoc

⊥ 00 0 hp0 , oi −−−→ O hp , o i

⊥ oc

⊥ 00 0 0 hp, o, ii −−Ic−−−→ A hp , o , i i

The resulting system has a provably more refined interactive behaviour than the characterisation provide by transition system −→B , as shown in lower part of Figure 2. According to the common process algebra preorder semantics of processes [1, 5], this means that the whitebox system defined by −→A can be seen as an “implementation” of the specification defined by grey-box model −→B ; conversely, the latter can be seen as an abstraction of the former. 3

ACL semantics

Specifying the semantics of communicative acts means to describe which kind of agent internal behaviour results in sending messages, and what are their effects on the receiver. From this point of view, it is clear that providing such a semantics is equivalent to describe the agent model by the grey-box approach – i.e., in terms of structure hO, Ei, so that the aspects specified by the ACL semantics have a counterpart description in the agent core. In fact, the actual agent behaviour can be obtained by specifying the grey-box model, giving the internal machinery specification. Some examples are provided to show how some intuitive communicative acts semantics can be represent in terms of a grey-box model. 3.1

Unspecified semantics

As a first introductory example, we consider the trivial case where no actual specification is associated to communicative acts, so that no information can be actually inferred by the b (that is, O agent interaction history. This behaviour can be captured considering O = Ic storing sequences of input acts – namely, the queue of incoming requests) and P defined as a couple hIc ⊥ , Oc ⊥ i including the input act currently processed and the output act waiting to be sent. Internal events are of the kind (i) get representing an internal request for consuming the next input act, and (ii) o(oc), representing the production of act oc to be sent. Their semantics is defined by the simple rules: o(oc)

hic ⊥ , ⊥i −−−→E hic ⊥ , oci

get

hic ⊥ , ⊥i −→E hic ⊥ , ⊥i

While o(oc) puts oc in P , get has no direct effect on P , but causes an act to be retrieved from queue by the successive proactive transition. The transition system O is now simply defined by the three rules: get⊥

b −−−→O hhic, ⊥i, ici b hhic ⊥ , ⊥i, ic; ici o(oc)oc b −−−−→O hhic ⊥ , ⊥i, ici b hhic ⊥ , ⊥i, ici icB⊥ b − b hhic ⊥ , ⊥i, ici −−→O hhic ⊥ , ⊥i, ic; ici The above rules respectively mean that (i) event get causes a message to be transferred from the queue to the place (starting its evaluation), (ii) event o(oc) causes oc to be sent out, and (iii) an incoming act is put in the queue. 3.2

Abstract FIPA ACL semantics

In FIPA ACL semantics, some FP and RE are associated to each communicative act. However, RE are not mandatory for the receiver: they can be just used by the sender so as to hypothesise

the effect of sending a message, which may be used to figure out plans to achieve goals. On the other hand, an agent can emit an act only if its feasibility preconditions are satisfied. We model this behaviour by considering P as a triple hIc ⊥ , Oc, Si, orderly representing the input act processed, the (multi-)set of output acts whose FP are currently satisfied, and state S on which FP are calculated – e.g. in the specific case of FIPA ACL semantics: beliefs, uncertain beliefs, and intentions. We suppose function fp ∈ S 7→ Oc takes elements in S and yields the set of allowed output acts. Internal events are now either get to consume an input act, upd(s) to updates state S to new element s, and o(oc) to send act oc, with semantics defined by rules: get

hic ⊥ , oc, si −→E hic ⊥ , oc, si upd(s0 )

hic ⊥ , oc, si −−−−→E hic ⊥ , oc, s0 i o(oc)

hic ⊥ , oc|oc, si −−−→E hic ⊥ , oc|oc, si Transition system operational semantics is built so that function fp is computed each time component S changes, that is: get⊥ b − b hhic ⊥ , oc, si, ic; ici −−→O hhic, oc, si, ici o(oc)oc b − b hhic ⊥ , oc|oc, si, ici −−−→O hhic ⊥ , oc, si, ici 0

upd(s )oc b − b hhic ⊥ , oc, s0 i, ici −−−−−→O hhic ⊥ , fp(s0 ), s0 i, ici icB⊥ b − b hhic ⊥ , oc, si, ici −−→O hhic ⊥ , oc, si, ic; ici

3.3

On Rational Effects

Whereas FIPA ACL semantics promotes full autonomy for agents, and so it mandates no RE to their communicative acts, here it is interesting to consider also the case where the reception of a message causes some RE to be applied. First of all, a function re ∈ S × Ic 7→ S has to be defined that takes the current state s and the input act to be evaluated, and yields the new state s0 after applying RE. Then a new internal event eval has to be considered that represents an agent actually evaluating an input act in P – that is, after it has been retrieved from the queue. The proactive action corresponding to this new internal event works by both consuming act ic which is dropped from P , and applying rational effect to state S: eval⊥ b − b hhic, oc, si, ici −−−→O hh⊥, oc, re(s, ic)i, ici

3.4

Protocol-Based Semantics

As discussed in [6], one of the main drawbacks of current semantics of FIPA ACL is its lack of the concept of protocol. Indeed, agents can cooperate by exploiting well-defined interaction protocols, where a statically fixed sequence of communicative acts has to be produced in order to achieve the intended aim – for instance, negotiating an auction. Whereas FIPA ACL includes protocol-oriented performatives, the burden of setting up the proper interactions protocols is left unspecified. As our framework suggests, this means that the corresponding management is meant to be conceptually located within the inner machinery. We could add protocol-oriented aspects to the semantics of communicative acts by including their specification within the agent core. Formal details are omitted here for brevity,

whereas only the basic intuition about the idea is provided. An interaction protocol can be considered as a sequence of communicative acts; at a given time an agent can participate to a number of such protocols. For each of them, the agent core keeps track of the information about the acts already sent and received – somehow representing the agent viewpoint of the state of the protocol. By representing this information in the agent core, the requirements an agent has to satisfy in order to participate to a protocol can be moved outside the internal machinery and become first-class concepts of the ACL specification. Basically, their specification is moved from the agent internal machinery – i.e., outside the scope of each specific implementation scope – to the agent core – becoming part of the ACL semantiics. 4

Conclusions

In this paper we studied the relationship between the grey-box modelling approach for agents and the specification of semantics of ACLs. We provided a general framework for grey-box agents, and show how it can be specialised so as to define the behaviour of agents adhering to different kinds of ACL semantics, including current FIPA approach, as well as following other proposals such as the protocol-based approach in [6]. Future works will be devoted to study the impact of providing an operational semantics to communicative acts on MAS engineering, both at the design and verification level. References [1] Jan A. Bergstra, Alban Ponse, and Scott A. Smolka, editors. Handbook of Process Algebra. NorthHolland, Amsterdam, London, New York, Oxford, Paris, Shannon and Tokyo, 2001. [2] FIPA. FIPA communicative act library specification. XC00037H.

http://www.fipa.org, 2000.

Doc.

[3] R.J. van Glabbeek. The linear time – branching time spectrum I. The semantics of concrete, sequential processes. In Bergstra et al. [1], chapter 1, pages 3–100. [4] Robero Gorrieri and Arend Rensink. Action refinement. In Bergstra et al. [1], chapter 16, pages 1047– 1147. [5] Robin Milner. Communication and Concurrency. Prentice Hall, Campus 400, Marylands Avenue, Hemel Hempstead, Hertfordshire, HP2 7EZ, UK, 1989. [6] Jeremy Pitt and Ebrahim Mamdani. A protocol-based semantics for an agent communication language. In Thomas Dean, editor, 16th Intl. Joint Conf. on Artificial Intelligence (IJCAI ’99), pages 486–491, Stockholm, Sweden, 1999. Morgan Kaufmann. [7] A.S. Rao and M.P. Georgeff. BDI agents: From theory to practice. In First International Conference on Multi-Agent Systems (ICMAS’95), pages 312–319, San Francisco (CA), 1995. [8] M.D. Sadek. Attidues mentales et interaction rationellle: Vers une th´eorie formelle de la communication. Th`ese de Doctorat Informatique, Universit`e de Rennes I, France, 1991., 1991. [9] A. W. Roscoe Stephen D. Brookes, C. A. R. Hoare. A theory of communicating sequential processes. Communications of the ACM, 31(3):560–599, June 1984. [10] Mirko Viroli and Andrea Omicini. Modelling agents as observable sources. Journal of Universal Computer Science, 8(4), 2002. [11] Michael Woolridge. Reasoning about Rational Agents. The MIT Press, Cambridge, Massachusetts, and London, England, 2000.