• Tidak ada hasil yang ditemukan

FinalEntcsFsen05.pdf

N/A
N/A
Protected

Academic year: 2024

Membagikan "FinalEntcsFsen05.pdf"

Copied!
15
0
0

Teks penuh

(1)

found atthe ENTCS Maro Home Page.

Flexible Communiation of Agents based on

FIPA-ACL

Jamshid Bagherzadeh 1

S. Arun-Kumar 2

Indian Institute of Tehnology Delhi

New Delhi, India

Abstrat

Communiation in multi-agent systems is an important subjet of the urrent re-

searh. In this paper, the syntax and semantis of a multi-agent programming

language, alled ECCS is dened. We fous speially on the ommuniation of

agents. The mainontributionof thispaperisa newand exiblewayof ommuni-

ationof agents. Wedesribea logitospeifydesirablepropertiesofagents. This

an be usedto verify the orretness of agents. We nally work out a well known

protoolas anexample.

Key words: Multi-agent systems, agent ommuniation

languages, CCS,FIPA-ACL.

1 Introdution

A multi-agent system is a olletion of agents, whih have their individual

goals (and perhaps someommongoals), and they ooperate with eahother

(through an agent ommuniation language), tofulll their goals. In the last

deadeseveralnewagentorientedlanguages(AOLs)andagentommuniation

languages (ACLs), like KQML and FIPA-ACL, have been dened. Two of

ACLshavegotmoreattentionintheliterature: KQML[3℄andFIPA-ACL[4℄.

The semantis of theseACLs havebeen dened interms of onditionson the

mental state of agents whih is supposed to have beliefs, desires, intentions

and so on.

We assume when an agent sends a message, it should satisfy some pre-

onditions, and moreover aftersendingthe message, itmightupdate itsloal

informationtosaveneessary informationwhihwe allthe eets ofsending

the message. On the other side, the reeiver might update its loal infor-

mation upon reeiving a message. In [1℄ we have dened a language, ECCS,

1

Email: jamshidse.iitd.ernet.in

2

Email: sakse.iitd.ernet.in

(2)

for multi-agent programming, and dened the semantis of the language in

terms of strutural operational semantis [10℄. One of the shortomings of

that semantis is the stati nature of preonditions and eets of a message,

i.e., the preonditions and eets of messages are xed and the programmer

annothangethem. Thishastwodrawbaks,rstly,aprogrammermightnot

likethe speiedonditions and eets hold and he mightliketodene some

other onditions and eets to be assumed during the sending or reeiving a

message. Seondly, the rationality of programs is low, in the sense that all

the agentsare treatedinthe same fashion, but the programmermight like to

have dierent agents ommuniating in dierent ways. For example sending

of a message to a trusted agent might have dierent eets than those of an

untrusted agent. In this paperwe have hanged ECCS toapture this issue.

To do this, we have assumed a programmer will dene a set of ommu-

niative ations whih we all performatives where eah performative has a

preondition and a post-ation. The preondition ould be a formula and

the post-ation is a proedure whih desribes the hanges in the informa-

tion store of the agent after ommuniation. For a partiular performative,

an agent eithersends or reeives the performative. Foreah of these irum-

stanes the orresponding preonditions and eets need to be dened. The

eetofsendingaperformativeisdirentfromtheeet ofreeivingthesame

performative. Any agent programhas itsown eets (perhaps dierent from

other agents).

The literature ontains several agent-oriented languages with a variety of

ommuniativeats(eg. AGENT-0[12℄,AgentSpeak(L)[11℄,GoGOLOG[7,5℄,

3APL [6℄, et.). Even the ats themselvesmay be dierent, they are allbeset

with the sameshortommings asECCS [1℄.

Although ommuniation issues have been onsidered inthese languages,

they formonly asmallsubset of CAs mostly from KQML(or FIPA-ACL).

Our attempt inthis paperis to dene a method whih gives enoughex-

ibility to the programmer to dene new performatives and dene their pre-

onditions and eets on both sides of the ommuniation. Thus the set of

ommuniation ats is not xed and the new ones an be added.

WeuseCCS[8℄andextenditwithsomeprimitiveCAsfromFIPA-ACL[4℄.

Wedeneastruturaloperationalsemantis[10℄ofthelanguage. Thispaperis

organizedasfollows. Insetion2weshowthestruture ofthe theinformation

store. Setion3denes the syntaxofagentprogramminglanguageECCSand

the semantis of ECCS is dened in setion 4. In setion 5 we work out the

FIPA-request protool, and setion 6 isthe onlusion.

2 Information Store

Let Ag =f1;:::;ng be a set of agents. Eah agent has an Information Store

(IS)whihinludesaset of beliefsandaset ofgoals. Weuse modaloperators

B

i

and G

i

tostand forbeliefsandgoals ofagenti2Ag respetively. Wehave

(3)

assumed a logi KD45 for belief operator and a logi KD for goals. These

axioms for belief operator are: (assumeF and H are twoformulas)

K: `B

i

(F )H))(B

i

F )B

i

H) 4: `B

i

F )B

i B

i F

D: `B

i

F ):B

i

:F 5: `:B

i

F )B

i :B

i F

In addition toabove axioms we dene following axioms whih represent rea-

sonable relationsbetween beliefs and goals of anagent.

B

i G

i

, G

i

B

i :G

i

, :G

i

2.1 TheLogiBG

n [2℄

Assume D is adomain representing the set of objets of the system, Const is

a set of onstants eah of them representing an objet of the domain D, Var

is a set of variablesymbols,and P =fp;q;r;:::gis a set of atomi prediates

suh that every atomi prediate has a predened arity. A term t is either

a onstant or a variable (variables are universally quantied over the largest

sope). Assume i2Ag is anagent, then formulas of BG

n

are dened as:

trueand false are formulas of BG

n

;

Anyatomiprediatep(t

1

;:::;t

n

)2P isinBG

n

,wheret

1

;:::;t

n

areterms;

IfF and H are inBG

n

then soare :F ; F _H ; F ^H ; B

i

F ; G

i F

We assume eah agent (say i) has a nite belief base, denoted

B

i , and

dened as:

Bi

f! j where ! is a losedBG

n

formulag

A formulaislosedif itdoesnot haveany freevariables. Notie thatbeliefor

goal bases may have formulas with nested modalities. The semantis of the

logi BG

n

is dened in afairly standard fashion in[2℄. Weassume the set of

beliefsis onsistent, i.e.,

B

i

6j=false.

Any agent i has a nite set of goals alled the goal base of i. The goal

base of agent i,denoted as

Gi

, is dened as:

Gi

f! j where! isa losed BG

n

formulag

Note that the goal base of an agent should be onsistent, and it may not

ontain twoinonsistent goals simultaneously. I.e.,

G

i

6j=false .

Thesatisfationrelationbetweenpairsofformh

i

;iwhere

i

=(

B

i

;

G

i )

is a (onsistent) informationstore of agenti, and 2BG

n

, is dened as:

i j=B

i i

B

i j=

i j=G

i

i 9! 2

G

i

; !j=

We dene satisfation relation for intention as:

i j=I

i i

i j=G

i and

i 6j=B

i .

(4)

First rulestates thatanagentbelievessomeformula, if isalogialonse-

quene of its belief base. The seond rule states that agent i has as a goal

if is a logial onsequene of some formula! 2

G

i

. The third rule states

that anagent intends aformula if is a onsequene of some goaland the

agent doesnot believe.

Inthispaperwedon'tdisussthebeliefandgoalrevisionindetail,asthey

have been disussed already in[2℄. We have alsogiven a sound and omplete

proof system in[2℄ forthe propositional fragment of BG

n

. We haveassumed

that the belief revision funtion dened there, works for both the belief and

goal bases. We assume funtion revise(

Bi

, ) updates the belief base with

, and revise(

G

i

, ) updates the goal base with . Moreover the operator

is used for deletingformulas fromthe belief or the goal bases. To delete a

formula from a belief base

Bi

, we perform revise(

Bi

, ). To remove

a formula from the goal base we use revise(

G

i

, ) whih removes the

goals whih imply.

3 Syntax of Agent Programming Language

The following BNFdenes the programming languageL.

::= 0 j ( ): j ( ): j update(O

i

!): j perform(Bat):

j query(!): j observe(l): j

1 +

2 j A(

!

t )

(1)

The intuitive meaning of dierent onstruts are as in CCS [8℄. Operators

( ) and ( ) are used for sending and reeivinginformation between agents

respetively,whereisanunidiretionalommuniation hannelbetween two

agents(with an input port and output port ) and is a message type or

performative suh as inform(!) or request(a). These performatives will be

explained in the sequel. Operators update(O

i

!) (where O

i

2 fB

i

;G

i g and

! 2 BG

n

) and query(!) are used respetively for updating and querying

the information store. observe(l) is used to observe the literal l from the

environment, where l = p or l = :p and p2 P is anatomi prediate. Bat

is an internal ation (basi ation) whih is dened by the programmer, and

perform(Bat) whould run Bat. Basi ationswould beexplained later.

The meaning of the omposition operators is as usual. a: is a proess

that an perform ation a and then beome the proess ,

1 +

2

is hoie,

whih means either

1 or

2

willbe exeuted. A(

!

t ) is the allof a label (or

proedure inimperative languages) withatual parameters

!

t .

Formally an ECCS agent is a tuple M

i

= h i, 0

B

i ,

0

G

i

, Bats, Ch, LB,

, P ats i where i is the identity of the agent, 0

Bi

is its initialbelief base

and 0

G

i

is initial goal base, Bats is a set of basi ations, and Ch is a list

of hannels whih are used by i forommuniation. LB isaset of proedures

whih we all labels,and 2 L is the main program. Finally P ats is a set

of performative ats tobeused in ommuniation.

(5)

Abasi ationisdened ashb(

!

x):(

!

x); (

!

x)i, whereb isthe nameof

the ation,

!

x is a set of formal parameters and pre(b(

!

x)) = (

!

x) 2 BG

n ,

and post(b(

!

x))= (

!

x)2BG

n

are itspre and postondition respetively. A

hannel is dened as (s,r) where is the name of hannel, s is the sender,

and r is the reeiver. Labels are dened as A(

!

x) =

def (

!

x), where 2 L

is a program of the grammar (1), and

!

x is a set of formal parameters. A

performative at(P at) issimilarto abasi ation,with a preondition,but

insteadofthe postondition,ithasapost-ationwhihisarestritedprogram

ofthegrammar(1)(withoutommuniationandlabels). AnyP atshows the

onditions tobesatisedbeforeommuniationandthe eetstobeahieved

after the ation. P ats would bedisussed ompletelyinthe setion 4.1.

Finally a multi-agent system is a parallel omposition of various agents

whih may ommuniatetogether. Its syntax isdened as:

M = M

1 j M

2

j :::jM

n

whereM

i

(i2Ag)are agents.

3.1 Performatives of FIPA-ACL

Some of the performatives of FIPA-ACL[4℄are presented in table 1.

perf. syntax semantis

inform hs;inform(r;!)i

FP:B

s

!^:B

s (Bif

r

!_Uif

r

!) RE:B

r

!

request hs;request(r;a)i

FP :(FP(a)[snr℄)^B

s

Agent(r;a)^:B

s I

r

Done(a)

RE:Done(a)

hs;agree(r;<s;at>;)i= hs;inform(r;)i where=I

s

Done(<s;at>;)

hs;refuse(r;<s;at>;)i= hs;disonrm(r;)i;hs;inform(r;)i

where=Feasible(<s;at>) , =^:Done(<s;at>)^:I

s

Done(<s;at>)

hs;failure(r;a;)i=hs;inform(r;)i

=(9e)Single(e)^Done(e;Feasible(a)^I

s

Done(a))^^:Done(a)^:I

s

Done(a)

Table 1

Some oftheperformativesof FIPA-ACL.

Thersttwoperformativesareprimitiveandthenext threeareomposite

performatives, whih are dened based onthe primitive ones. The syntax of

eah performative is of the form < s;at(r; ) >, where s is the sender, r is

the reeiver, at is the type of ation, and is the ontent of the message.

The semantis of eah performativeonsists of Feasibility Preondition(FP),

whih need to be satised before the at is performed, and Rational Eet

(RE), whih isthe eet expeted by the sender afterthe at isperformed.

In this table, U

r

! means that r is unertain about !. Although this op-

erator is dened in the semantis of FIPA-ACL performatives, its semantis

is vague, and we will ignore it in our framework. The problem of using the

unertainty operatorappearswhenweombineitwithbeliefsandgoalsinthe

(6)

ontext of proof method dened in [2℄. We believe that the proof methodin

this ase beomesvery diÆult.

Moreover, in this table, Bif

r

(!) = B

r

!_B

r

:!, Uif

r

(!) = U

r

! _U

r :!.

FP(a)[snr℄ denotes the part of the FPs of a whih are mental attitudes of

s, Agent(r,a) means that agent r an perform ation a, Done(a,) means

thatationaisdone(ifB

i

Done(a;))orintendedtobedone(ifI

i

Done(a;))

and was true just before the performane of the ation, Done(a)=Done(a,

true),Single(e)meansationeisanatomiationand Feasible(a)meansthat

preonditionsofationaaresatised. Wewillbaktotheseinthesetion4.1.

4 Semantis of ECCS

ThesemantisofECCSisdenedbyStruturalOperationalSemantis(SOS)[10℄.

Many of the semanti rules are extensions of those for CCS [8℄. Let P be a

set of atomi prediates, p 2 P be an atomi prediate, and l = p or l =:p

bea literal.

At

=fg[f( );( ) j is a ommuniative atg[fobserve(l)g

The ongurationofanagentinludesthosepartswhihmighthangeduring

exeution. For an agent, i, it is a tuple h

i

;

i

;

i

;did(i;a)i, where

i is the

ontinuationoftheagent'smainprogram,

i

isitsinformationstore,whihis

dened as

i

=(

B

i

;

G

i

)representing the beliefbase andthe goal baseof i

respetively,and

i

isavariable-valuebindingwhihbindsvariablestovalues.

did(i,a) speies that ationa was done by i in the previous transition.

Theoperationalsemantisofupdate, query andbasiations aredenedin

table2. It isassumed thatO2fB;Gg,! 2BG

n ,and

0

i

=( 0

B

i

; 0

G

i

)isthe

0

i

=revise(

i

;O

i

!

i )

hupdate(O

i

!):

i

;

i

;

i

;i!h

i

; 0

i

;

i

;did(i;)i

i j=!

i

hquery(!):

i

;

i

;

i

;i!h

i

;

i

;

i

;did(i;)i

i

j=pre(b(

!

t

i

=

!

x))and 0

i

=revise(

i

;post(b(

!

t

i

=

!

x)))

hperform(b(

!

t)):

i

;

i

;

i

;i!h

i

; 0

i

;

i

;did(i;)i

Table 2

Semantisofinternaloperations.

information store of agent i after revision. The operator query(!) is used to

query! fromthe informationstore andbind thefreevariables. Thisoperator

is exeuted if there is a ground substitution suh that !

i

is satised by

(7)

information store of agent i, otherwise it won't proeed. We assume is a

ground substitution suh that Free(!

i

)Dom(). Here Dom() isthe list

of variablesof and Free(!

i

)is the set of freevariablesof !

i .

In the semantis of basi ations, b(

!

x) is a basi ation, and

!

t

i is a

ground list of terms and (

!

t

i

=

!

x) is a substitution of the parameters of

!

x

with the orrespondingground terms from

!

t

i .

4.0.1 Observe:

observe(l(

!

t )) where l is a literal, is used for updating the informationof an

agent by observing some atomi prediate from the environment. There are

two purposes for observe: observing some new information fromthe environ-

ment or verifying the existing beliefsfrom the environment. In the following

we assume is a ground substitution suh that Free(

!

t

i

) Dom(), and

Env denotestheenvironmentanditontainsthetruthvalueofaset ofrelated

prediates.

3

9Envj=l(

!

t

i );

0

i

=revise(

i

;B

i l(

!

t

i ))

hobserve(l(

!

t )):

i

;

i

;

i

; i!h

i

; 0

i

;

i

;did(i;observe(l(

!

t

i )))i

Note that if l(

!

t

i

) is already believed, then the revision will not hange

the set of beliefs. If

!

t

i

is ground then the environment needs satisfy only

l(

!

t

i

). Finally if there is no substitution suh that l(

!

t

i

) is implied by

the environmentthen wehave the followingrule:

8:Env 6j=l(

!

t

i )

hobserve(l(

!

t)):

i

;

i

;

i

; i !h

i

; 0

i

;

i

;did(i;)i

In this rule if l(

!

t

i

) is ground then 0

Bi

= revise(

B

i

; B

i l(

!

t

i

)), i.e.

B

i l(

!

t

i

) willbe deleted from the set of beliefs. But if l(

!

t

i

) is not ground

then 0

Bi

=

B

i

. We assume at any time at most one substitution may be

observed for

!

t

i

. I.e., ifEnv has morethan one possiblesubstitution ,only

one of themwill beobserved.

4.0.2 Label:

LetA(

!

x)=

def (

!

x)beanagentname,and

!

t alistofterms. Thesemantis

of A(

!

t ) is dened as:

h(

!

t

i

=

!

x);

i

;

i

; i!h 0

; 0

i

; 0

i

;did(i;a)i

hA(

!

t );

i

;

i

; i!h 0

; 0

i

; 0

i

;did(i;a)i

3

Environment might be assumed as an agent, whih is ommuniated by the observe

ommand.

(8)

4.1 Communiation Operators

We have two operators for ommuniation of agents:

sr

(m) and

sr

(m) for

reeiving and sending informationm through hannel

sr 4

, respetively. We

assume m is of the form perf( ), where perf is a message type like inform or

request, and is the ontent of the message. Assume perf is a typial per-

formative. To send a message, the sender must satisfy some preonditions.

In addition there might be some revisions in the mental states of the agents

involved in the ommuniation. We don't x any onstant preondition and

revisions of mental state in the semantis of the ommuniation operators,

instead,welettheprogrammerdenethesepreonditionsand appropriatere-

visions for any partiular performative. The programmeris allowed todene

a performativeat (P at), perf

out

for any performative perf. This P at has

a preondition and a post-ation whih show the onditions to be satised

before sending the perf, and the revisions after sending. Similarly the pro-

grammer an dene a P at, perf

in

for any performative perf, to speify the

orresponding revisions afterreeiving a message.

Formallytheseationsaredenedas: perf

out

(r, )=h!(self;r; );(self;r; )i

(for sending), and perf

in

(s, ) = h ;(self;s; )i (for reeiving), where r,

are formalparameters, and !(self;r; ) isaformulaofBG

n

denotes the pre-

ondition of the performativeperf. (self;r; ) is aprogram of the following

grammar (2) whih shows the internal ations to be done by self immedi-

ately after the ommuniation. selfis the owner of the ation. Consideringa

proedure, instead of aformulainpost-ation,givesusmore exibilityto at

rationally. Usingthismethodanagentmaydodierentrevisionsaftersending

thesamemessagetodierentagents. Toavoidnonterminatingproedures,we

allowonly thesimple sequential programs withinternal ationswithoutom-

muniationats and reursion. The formalsyntax of this simpliedlanguage

is:

::= 0j update(O

i

!):j perform(Bat): jquery(!):j observe(p): j

1 +

2

(2)

Thelanguageobtainedfromthisgrammarisasubsetofthelanguageobtained

fromthegrammar(1). Weassumepre(perf

out

(r; ))=!andpost(perf

out

(r; ))=

. Notethat perf

in

does not haveany preondition usually.

Example 4.1 Assume wewanttodene aperformativealled informin our

framework. We might dene aP at inform

out

for agent i as:

inform

out

( r, ):

pre = B

self

^:B

self Bif

r

post = update( B

self B

r B

self ).

query( B

self

Trusts(r,self) ).

4

Rememberthatthehannel

sr

hasasendingport

sr

whihisusedbysandareeiving

port

sr

whih isusedbyr.

(9)

update( B

self B

r

^ G

self B

r )

Here self denotes the agent whih inludes the P at, i.e., agent i in this

example. Wemightdene a P at inform

in

for agenti:

inform

in

( s, )

post= update( B

self B

s ).

update( B

self G

s

Done(a)^ B

self B

s G

self

Done(a)).

query( Trustable(s) ). update( B

self )

where a 2 f

s(sel f)

(inform( )),

s(sel f)

(inform if( )) g

Preonditionsofinform

out

aresimilartothosegiven intable1. Initspost-

ation weaddB

sel f B

r B

sel f

, andif selfbelievesthat rtrusts self,then itwill

imply that r would believe and deletes the goal for B

r

beause self has

believed B

r

Intuitivelyselfafterreeivinginform( ) whihissentby s,believesthat s

believes ,beauseitsupposes thats issinere. Inadditionitwillimplythat

s doesnotintendanymore todoinform( ),and itdoesnotbelieveany more

that s believes that self intends a (self might already intend that s should

inform ). If self trusts s, then itbelieves too.

4.1.1 Output ation

Beforedeningthesemantisoftheoutputation,wedenesomerelatedon-

epts. Wedene Done(hi, i, )to desribe asituationwhere the expression

isdoneintheprevious stepby i,and 2BG

n

wastrue justbeforetheper-

formaneof. Weassumeisaprogramofthegrammar2. Done(<i;>;)

an be heked by looking at the previous ations of i whih are kept in the

onguration of i.

On the other hand an agent, say i, an not hek the previous ations of

another agent, say j. Thus Done(hj;i, ) should be stored expliitly in the

IS ofi. WhenDone(hi;i, )omes intheontextof agoaloperator,(likeG

i

Done(hi;i, ) orG

i

Done(hj;i, )), itis manipulatedas a prediate whih

should be expliitly kept in the information store. In general we have the

followingases:

B

i

Done(hi; i, ), Done(hi;i ,) /*if is reallydone by i */

B

i

Done(hj;i, )^ i6=j ,

i j=B

i

Done(hj;i, )

G

i

Done(hj;i, ) ,

i j=G

i

Done(hj;i, )

The next operator whihis used in this setionis Feasible() 5

, whih means

that is feasible, and its preonditions hold. A sequene of ations =

a:

0

is feasible in the onguration C if the rst ation, a, is feasible in the

ongurationC,andinthenextonguration,C 0

,obtainedfromtheeetsof

a on C,the sequene 0

isfeasible. This an be doneindutively by applying

5

Here mighthaveommuniationationalso.

(10)

theeets ofationsintheongurations. Ahoieofationsisfeasibleifone

of the hoies is feasible. If is a ommuniative at then its preonditions

is dened by the orresponding P at, otherwise if itis an internal (orbasi)

ation, then its preondition is dened in the orresponding basi ation. In

general we have the followingases:

i j=B

i

Feasible(a) i

i

j= pre(a) if a isan internalor ommuniativeation of i

Bi

j= Feasible(a) if a is an internalation of j 6=i

B

i j= B

j

pre(a) if a isa ommuniative at of j 6=i

i j=G

i

Feasible(a)i

G

i

j= pre(a) if a is aninternal oromuniativeat of i

G

i

j= pre(a) if a is aomuniativeat of j 6=i

It is not possible for i to make feasible an ation a, if a is an internal ation

of j 6=i, beause i doesnot knowthe preonditionsof internal ationsof j.

The next operator is Agent(i;a) whih denotes that i is an agent whih

an do the ation a. It is assumed that there is a global funtion Agt where

any agent i an read globally, but write loally, i.e. only the ations whih

an be done by i might be updated by i. This funtion is dened as Agt: Ag

At ! ftrue, falseg, whih given an agent andan ation,speies whether

the agent an perform the ation ornot. To hek B

i

Agent(j;a), we use the

funtion Agt (with parameters j and a). Cheking the nested formulas like

B

i B

k

Agent(j,a) alsois possible using the funtion Agt, and it willredue to

hekonlyAgt(j,a). Thisisbeause,iknows thatkhasaesstothisfuntion.

Finally let , 0

and 00

be proesses of grammar(2), , 0

, 00

be infor-

mation stores, , 0

, 00

be substitutions, and 2L be a main program. We

dene the big-step transitionrelation=) as:

h:; ;; i

=)h:; ;; i

h:; ;; i

!h 0

:;

0

; 0

; i ; h 0

:;

0

; 0

; i

=)h 00

:;

00

; 00

; i

h:; ;; i

=)h 00

:;

00

; 00

; i

The forth element of the ongurationis not important inthe transition=)

andweshowitby 0 0

. Nowwearereadytodenethe semantisoftheoutput

ation. Let i and j be the sender and the reeiver agents,

ij

be a hannel

from i to j, be the ontents of the message, !=pre(perf

out (j,

i

)), and =

post(perf

out (j,

i

)), Semantis of message sendingis dened as following:

i

j=!; h:

i

;

i

;

i

; i

)h

i

; 0

i

; 0

i

; i

h

ij

(perf( )):

i

;

i

;

i

; i !h

i

; 0

i

; 0

i

;did(i;

ij

(perf(

i )))i

(11)

Table 3representsthe default denitions of perf

out

(j; )) for someperfor-

mative. We have written the post-ations of the performatives as a simple

proedure, though a rational agent might have a omplex proedure. In the

table, we abbreviated self as s. Some disussion is needed about table 3.

request

out

( j, a) /*sdenotesself*/

pre= :B

s G

j

Done(hj;ai)^ B

s

Agent(j,a) ^I

s

Done(hj;ai)

post=revise(B

s B

j G

s

Done(hj;ai)). query(B

s

Trusts(j,s)). revise(B

s G

j

Done(hj;ai))

agree

out

( j, a)

pre=B

s ^:B

s Bif

j

post=revise(B

s B

j

), where=G

s

Done(hs;ai)

refuse

out

(j, a )

pre= B

s

:Feasible(a) ^B

s B

j

Agent(s,a)^ B

s

^ :B

s Bif

j

post=revise(B

s B

j

:Feasible(a)^B

s B

j

), where=:Done(hs;ai)^:G

s

Done(hs;ai)

failure

out

( j,a )

pre=B

s ^:B

s Bif

j

post=revise(B

s B

j )

=Done(hs; i,Feasible(a) ^G

s

Done(hs;ai))^ :Done(hs;ai)^:G

s

Done(hs;ai)

Table 3

Defaultdenitions ofperf

out (j, ).

In request

out

(j;a) the preondition is similar to those in the table 1 without

FP(a)[snj℄, and moreover self intends that a to be done. In its post-ation,

self will believe that j believes that self has a goal to do a and if self knows

that j trusts self, it will imply that j will reate a goal to do a. In ontrast

with table1,herewe donot onsider FP(a)[selfnj℄forthe sakeofsimpliity.

The preonditions of agree

out

are the same as those of inform

out

(dened

before)but!isreplaedwith ,whihisdenedas=G

sel f

Done(hself;ai)

and its post-ation simply adds a new formulaB

sel f B

j G

sel f

Done(hself;ai).

In the preondition of failure

out

, Done( ,Feasible(a) ^ G

sel f

Done(a)) means

that an ation has been done and before performane of that ation, a was

feasible and self had a goal to do a, although in both of the performatives

refuse

out

and failure

out

, self does not intend any more todo a (it is shown in

the denition of ).

4.1.2 Input ation

Assume perf

in

(i, )isaP at ofagentj, whereiisthe sender, =post( perf

in (

i,

j

)), and is a valuation of the free variables of

j

, whih will be

initialized during the ommuniation. This will be laried in the parallel

ompositionrule. The semantis of reeiving isdened as:

h:

j

;

j

;

j

; i

)h

j

; 0

j

; 0

j

; i

h

ij

(perf( )):

j

;

j

;

j

; i !h

j

; 0

j

; 0

j

;did(j;

ij

(perf(

j )))i

(12)

Table4representsthe defaultpost-ationofthe P at,perf

in

(i; )forvarious

performatives.

post(request

in

(i,a )) /*sdenotesself*/

revise(B

s G

i

Done(hs;ai)).

fquery(B

s

Feasible(a) ). revise(I

s

Done(hs;ai))

+query( B

s

: Feasible(a) ). revise(:G

s

Done(hs;ai))g

post(agree

in

( i,a ))

revise(B

s G

i

Done(hi;ai) )

post(refuse

in

( i,a))

revise(B

s

). revise(B

s B

i G

s

Done(hi;ai))

where=:Feasible(hi;ai)^ :Done(hi;ai)^:G

i

Done(hi;ai)

post(failure

in

( i,a ))

revise(B

s B

i ^B

s

). revise(B

s B

i G

s

Done(hi;ai))

=Done(hi; i, Feasible(a) ^G

i

Done(hi;ai))^:Done(hi;ai)^:G

i

Done(hi;ai).

Table 4

Default post-ation ofthe P atperf

in .

Let us explain the meaning of the P ats of the table 4. After reeiving

request(a),the reeiverself willometobelievethatiintendsatobedoneby

self anditbelievesthati believesthat selfis abletodoa. Ifaisfeasible then

self willintend to do a, otherwise if a is not feasible then self willnot intend

to doa. In post-ation of agree

in

(i,a), the reeiver self willbelievethat i has

intended to do a. In the refuse

in

(i,a), self believes that i believes and self

believes too. Moreoverself doesnot believe thati believes thatself intends

a to be done by i (see request

out

for understanding the reason for this). In

this post-ation states that a is not feasible and it is not done by i and it

is notintended anymore tobe done. The post-ation offailure

in

issimilar to

refuse

in

but with adierent denition of .

4.2 Summation and Parallel omposition

Semantis of summation

1 +

2

isdened asusual. Let a2At

then:

h

i

1

;

i

;

i

; i!h 0

i

1

; 0

i

; 0

i

;did(i;a)i

h

i1 +

i2

;

i

;

i

; i!h 0

i1

; 0

i

; 0

i

;did(i;a)i

h

i

2

;

i

;

i

; i!h 0

i

2

; 0

i

; 0

i

;did(i;a)i

h

i1 +

i2

;

i

;

i

; i!h 0

i2

; 0

i

; 0

i

;did(i;a)i

In the semantis of parallel omposition there are two ases:

(13)

1: Forany l 2fg[ literals:

h

i

;

i

;

i

; i!h 0

i

; 0

i

; 0

i

;did(i;l)i

[:::jh

i

;

i

;

i

; ij:::℄![:::jh 0

i

; 0

i

; 0

i

;did(i;l)ij:::℄

2: Let (perf ( )) be the message to be sent by i, and (perf()) be the

messagetobereeived. Thenthe ommuniationoftwoagentsiandj anbe

done if there is amost general unier suh that

i

=

j

. The semantis

of this ommuniation is dened as:

h

i

;

i

;

i

; i!h 0

i

; 0

i

; 0

i

;did(i;)i; h

j

;

j

;

j

;i!h 0

j

; 0

j

; 0

j

;did(j;)i

[:::jh

i

;

i

;

i

; ij:::jh

j

;

j

;

j

;ij:::℄!

[:::jh 0

i

; 0

i

; 0

i

;did(i;)ij:::jh 0

j

; 0

j

; 0

j

;did(j;)ij:::℄

where =(perf(

i

)) and =(perf(

j )).

5 Example: FIPA request Protool

We now explain FIPA request protoolin the ontext of our framework. We

will show the evolution of the IS during the running of the protools. This

protool allows one agent to request another agent to perform some ation,

and the reeiving agent either performs the ation or replies, in some way,

that it annot[4℄.

Figure1presentstheECCSode ofthisprotool. Inthisodeweusesome

new notations instead of previously dened symbols. If=(i;j) isa hannel

from i to j, we use the notation (i;j)! instead of to represent that i sends

a messageto j. The notation(i;j) is used by j to represent that j reeivesa

message fromi. Weuse Bel i p to express B

i

p, and Goal i p insteadof G

i p.

Figure 2 shows a sample exeution of this protool between two agents

i and j. The preonditions and post-ations of messages are applied from

the previous tables. In the exeution of protools we have assumed that the

additionofnewbeliefsorgoalswouldresultintheremovaloftheontraditory

old beliefs or goals and their onsequenes. For example note that the last

state of agent i does not have formula 2 (beause of B

i

Done(hj;ai) and

formulas 4 and 5 beause of the post-ation of r inform. In the last state of

j, formulas 3, 5 and 6 are deleted beause of the addition of 8, semantis of

post-ation of s inform, and addition of 7respetively.

6 Conlusion and Future Work

InthispaperwehavedenedalanguageECCS,withitssyntaxandsemantis.

We saw that how new ommuniative ats an be dened with appropriate

operational semantis.

In [13℄ an operational semantis for agent ommuniation languages has

been proposed whih suggests a similar work to be done in FIPA-ACL. We

(14)

Global funtion Agt = {(j,a)=true }

Agent i:

Initial_beliefs ={ Bel i Trustable(j) }

Initial_goals ={ Goal i Done(<j,a>) }

Comm_hannels ={ =(i,j), d=(j,i) }

Main program:

query(Goal i Done(<k,at>)). /*atisbound toa,andkisbound toj*/

(i,k)!(request(at))./*insteadofhannelnamewewriteitspartiipantshere*/

{ (k,i)(agree(at)) +

(k,i)(refuse(at))

}.

{ query(Bel i (Goal j (Done<j,at>))).

{ (k,i)(inform(Done(at))) +

(k,i)(failure(at)) }

}

Agent j:

Initial_beliefs ={Bel j Trusts(i,j), pre(a)} /*pre(a)isthepreonditionofa*/

Initial_goals ={ }

Comm_hannels ={ =(i,j), d=(j,i) }

Main program:

(i,j)(request(at)). /*atisboundtoa*/

{ query(Int j Done(<j,at>)).

(j,i)!(agree(at)).

perform(at).

{ (j,i)!(inform(Done(<j,at>))) + /*eitherinformorfailurewillrun

(j,i)!(failure(<j,at>)) } aordingtotheirpreonditions*/

} +

{ query(not Int j Done(<j,at>)).

(j,i)!(refuse(<j,at>))

}

Fig. 1. FIPA request protool, implementedin ECCS.

Agenti

Agentj

1. B

j

Feasible(a) 2.B

j

Trusts(i,j) 1.B

i

Agent(j,a)2. I

i

Done(hj;ai)

3.B

i

Trustable(j)

4.B

i B

j I

i

Done(hj;ai)

1,2,3,4,5

inform(Done(a))

1,3, 6.BiDone(hj;ai)

1,2,3,4,5, 6. B

j B

i I

j

Done(hj;ai) agree(a)

5. B

i I

j

Done(hj;ai) 1,2,3,4,

andB

j

Done(hj;ai)holds Internalationaisdone 1,2,3,

1,2,4

7.B

j B

i B

j

Done(hj;ai)

8. B

j B

i

Done(hj;ai) request(a)

5. I

j

Done(hj;ai) 4. B

j B

i

Agent(j,a) 3. B

j I

i

Done(hj;ai) 1,2,

Fig. 2. FIPA-request protool.

think this is one step to go in suh a diretion. The main ontribution of

this paper is the exibility of dening various semantis for ommuniative

ats and ability to dene new performatives. However we have onsidered

protools of FIPA-ACL in our mind when dening some of the preondition

and post-ations of performatives. Programmers an hange the semantis

(15)

when they want to use new protools. In [9℄ an approah similar to this is

suggested forommuniation.

Thiswork extends the framework of [1℄ invarious ways. The most impor-

tants are a new method of ommuniation, and the use of a more expressive

logi for informationstore taken from [2℄. However beause of spae limitwe

havenotputmodelhekingalgorithmshere,butitanbedenedinasimilar

fashionas[1℄. Inthisase,weansimplyhekFIPAomplianepropertiesas

well asother properties of the agents. An issue for future workis to onsider

the omplete set of FIPA-ACL performativesand protools.

Referenes

[1℄J. Bagherzadeh and S. Arun-kumar. A multi-agent framework based on

ommuniationandonurreny. InLNCS,volume3326.Springer-Verlag,2004.

[2℄J. Bagherzadeh and S. Arun-Kumar. Layered lausal resolution in the multi-

modallogiof beliefs and goals. InLNCS, volume3452, pages544{559, 2005.

[3℄T.Fininandet.al. KQMLasanAgentCommuniationLanguage. InN.Adam

and et.al.,editors,Pro.of CIKM'94, pages456{463, USA, 1994.ACMPress.

[4℄Foundation for Intelligent Physial Agents(FIPA). Fipa2000 agent

speiation, http://www.pa.org.

[5℄G. De Giaomo, Y. Lesperane, and H. Levesque. ConGolog, a onurrent

programming languagebased on thesituation alulus. Artiial Intelligene,

121(1{2):109{169 , 2000.

[6℄K. V. Hindriksand et. al. Agent programming in3APL. Autonomous Agents

and Multi-Agent Systems, 2(4):357{401, 1999.

[7℄H. Levesque and et. al. GOLOG: A logi programminglanguage for dynami

domains. Journal of Logi Programming, 31:59{84, 1997.

[8℄R.Milner. Communiation and Conurreny. Prentie-Hall, 1989.

[9℄J. Pitt and E. H. Mamdani. A protool-based semantis for an agent

ommuniation language. In Pro. of the Int. Joint Conf. on Artiial

Intelligene,pages 486{491, 1999.

[10℄G. D. Plotkin. A strutural approah to operational semantis. Tehnial

report,DAIMI, FN19,Deptt. Comp. Si.,Univ. ofAarhus,Denmark, 1981.

[11℄A. S. Rao. AgentSpeak(L): BDI Agents speak out in a logial omputable

language. InW. Van deVelde and J.Perram, editors,Pro. of MAAMAW'96,

number1038 inLNAI, pages42{55, The Netherlands,1996. Springer-Verlag.

[12℄Y. Shoham. Agent-oriented programming. Artif. Intell.,60(1):51{92, 1993.

[13℄R. M. van Eijk and et. al. Operational semantis for agent ommuniation

languages. In Frank Dignum and Mark Greaves, editors, Issues in Agent

Communiation,pages 80{95. Springer-Verlag, 2000.

Referensi

Dokumen terkait

Abstract : In this paper, we attempt to introduce a new method for performing risk analysis studies by effectively adopting and adapting medical research

For English teachers are to give information in their attempt to decide the using focus group discussion method and in improving students’ achievement in writing recount.

Moreover, our results indicate a rather good performance of both the Borda and the Coombs rules, whereas negative plurality gives rise to the selection of an alternative different

 If the patient do appreciate the light touch, then you have to assess whether there are differences in feeling to the touch with cotton on both sides of the body, and also between the

These new books by Broderick and Egan, Transcension and Schild’s Ladder, are at the genre’s cutting edge.. Both writers attempt to imagine worlds that have undergone truly radical

This research used the descriptive qualitative method in attempt to describe the translation techniques, translation methods, translation ideologies and their impact on the readability

Our empirical results from both regression analysis and Data Envelopment Analysis DEA indicated significant improvement in the firm’s productivity following the implementation of its

In the stem the teacher gives Chaity an idea about the practice of the method of practising Yogasana, what is the method.. Explain