ebook img

Enabling Agents to Dynamically Select Protocols for Interactions PDF

0.13 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Enabling Agents to Dynamically Select Protocols for Interactions

Enabling Agents to Dynamically Select Protocols for Interactions Jose´ GhislainQuenum,SamirAknine Laboratoired’InformatiquedeParis6 75015Paris,France {jose.quenum, samir.aknine}@lip6.fr 5 0 0 2 Abstract task.Moreover,thesetofprotocolsusedinmulti-agentin- n teractions is increasingly enlarging, and a static proto- a The work achieved in multi-agent interactions design col selection will only consider the protocolsthe designer J mostly relates to protocols definition, specification, etc. In knows even if these agents have the capacity of inter- 5 2 thispaperwetackleanewproblem,thedynamicselection preting and executing other protocols unknown at de- of interaction protocols. Generally the protocols and the sign time. To overcome this limitation, we should enable ] rolesagentsplayinprotocolbasedinteractionsareimposed agents to dynamically select protocols in order to inter- A uponthesystematdesigntime.Thisselectionmodeseverely act. M limitsthesystem’sopenness,thedynamicbehavioursagents As yet, there have been some efforts [1, 4] to enable . canexhibit,theintegrationofnewprotocols,etc.Toaddress agentstodynamicallyselecttherolestheyplayduringinter- s c thisissue,we developedamethodwhichenablesagentsto actionsusingMarkovDecisionProcesses,planningoreven [ select protocols themselves at runtime when they need to probabilisticapproaches.However,theydon’tsuitprotocol interact with one another. Regardingthe conditionswhich based coordination mechanisms. Indeed, as protocols are 2 v holdintheMASagentscaneitherjointlyperformtheselec- partially sorted sequences of pre-formatted messages ex- 6 tionorindividually.Wedefinetheconceptsandalgorithms change,selectingthemtoexecutea taskrequiresthattheir 3 whichenableagentstoperformthisdynamicselection.We descriptionsmatchthatofthecollaborativetask.Thesolu- 0 alsodescribethemechanismswhichhelpagentsanticipate tions proposed so far do not explicitly focus on protocols 1 interactioninconsistencies. and do not check such compliance either. To address this 0 void, we developeda method which enables agents to dy- 5 0 namicallyselectprotocolsandrolesinordertointeract.Our / methodputstheusualassumptionsaboutmulti-agentinter- s c actionsastepfurther.First,weconsiderthatsomeinterac- 1 Introduction v: tion protocols can be known only at runtime. Thus, start- i ingfroma minimalversion,agentsinteractionmodelscan X Generally, the interaction protocols which support agents grow up by integrating these protocols from safe and au- r collaborative tasks’ execution are imposed upon multi- thenticated libraries of interaction protocols when needed. a agentsystems (MAS) at design time. This static protocols Second,weconsiderthatagentsmayhavedifferentdesign- selection severely limits the system’s openness, the dy- ers,thereforetheymayencompassdifferentprotocolsspec- namic behaviours agents can exhibit, the integration of ification formalisms. Furthermore, an interaction protocol new protocols, etc. For example, consider a collabora- isatriple{R,M,Ω}whereRisasetofinteractingroles tive task which can be executedfollowing varied methods whichcanbeoftwotypes:initiatorandparticipant.Anini- either by means of a Request protocol [5] (an identi- tiatorroleistheuniqueroleinchargeofstartingtheproto- fied agent exhibiting specific skills is requested to per- colwhereasaparticipantroleisanyroletakingpartinthe form the task) or a Contract Net protocol (CNP) [6] (a protocol.Consequently,aninitiatoragentwillbeanyagent competition holds between some identified agents in or- playing the initiator role in an interaction while a partici- der to find out the best one to perform the task). Since pantagentwillbeanyagenttakingupaparticipantrole.In the MAS is open and CNP looks for the best contrac- addition,protocolsusedinMAScanbeclassified1 inthree tor, it will undoubtedly be preferred to Request for such categories:(1) 1-1 protocols, which are protocolsmade of a task in absence of constraints such as execution de- lay.Thus,selectingRequestatdesign-timepreventstheini- tiator agent from benefiting a better processing of this 1 Acomplexprotocolcanbeacombinationofthesebasiccategories. 2 Problem Description two roles (initiator and participant) both of them having only one instance (ex Request); (2) 1-1N protocols, again protocols made of two roles with several instances of the Our purpose in this research, is to ease protocols defini- participant(exCNP);(3)1-Nprotocols,whichareprotocols tion,implementationanduse.Thus,weclaimtofreeagents with several distinct participantroles each of them having programmersfromhardcodingtheprotocolsandtheexact only one instance (ex an auction protocol with one buyer, roles to use every time their agents have to execute a col- one seller and one manager). Subsequently, we define the laborativetask.Rather,theyshouldonlymentionintheini- dynamicprotocolsselectionprocessforeachofthesecate- tiator agent’ssource codethe descriptionof the collabora- gories. tivetasktoexecute.Then,onceanagentcomesacrosssuch Rather than explicitly indicating the protocols and the a description, it will launch the dynamic selection process roles to use for all the agents which will execute the de- implicating potential participant agents. Concretely, given siredinteraction,wesuggestthatagentsprogrammerssim- a collaborative task tj which is to be executed by a set ply mention the collaborativetask’s description in the ini- A = {a1,a2,...ak} of agents, the selection problem is tiatoragent’ssourcecode.Assoonasanagentlocatessuch statedas howanagentcanselectaprotocolandarolein- adescription,itidentifiessomepotentialparticipantagents sidethisprotocoltoexecutetj? Itconsistsinfindingouta andthereafterfiresthe dynamicprotocolselection process protocolpandtherolesr1,r2,...rp eachai shouldbeen- takinguptheinitiatorrole.WeassumethattheMASispro- acting in this protocol in order to get tj executed. We as- videdwithpotentialparticipantagentsidentificationproce- sumethateachagentisprovidedwithaninteractionmodel dures.Agentscandynamicallyselectprotocolsintwopos- I = {r1,r2,...rn} containingsomeconfiguredprotocols sible ways. First, the initiator agent and all the potential (p1...pm)someofwhichcanbeintroducedatruntimeand participantagentscollectivelyselectaprotocolandassign foreachprotocolpi asetofroles{r1,r2,...rk}thisagent rolestoeachagentinsidethisprotocol.Thisisthejointpro- canplayduringinteractionsbasedonpi. tocolselectionmethodwhichassumesthatagentstrustone Inthefollowingtwosections,weelaborateonoursolu- another and that they don’t dread publishing their knowl- tiontotheselectionproblem. edgeandpreferences.Ontheotherhand,agentscanindivid- uallyselectprotocolsandrolesandstartthedesiredinterac- 3 Joint Protocol Selection tion.Thisistheindividualprotocolselectionmethodwhich assumesthatagentsdonottrustoneanotherand/orthesys- Onceanagentlocatesthedescriptionofacollaborativetask, tem is heterogeneous (several sub systems with different it finds out a set of protocols needed to execute this task protocolformalismsarepluggedtogether).Inthismethod, which it refines to a sub set of protocols whose initiator as the selected roles may mismatch, agents should antici- roles are configured inside its interaction model. Moving pate errors in order to guarantee consistent messages ex- from collaborative tasks models to protocols’ requires the change.Wefocusonwrongmessagestructureerrorwhich agentstoanalysebothmodelsanddetecttheiradequacy.In indicatesthatsomethingiswrongin themessagestructure thispaperweassumethatagentsareabletoexaminetasks (performative,content,language,ontology,etc.)andwrong and protocols models and relate the first ones to the sec- message content error which indicates that the message’s ond ones. After moving from task to protocols the initia- contentdoesn’tmatchtheexpectedcontentpattern.Wear- toragentshouldidentifyallthepotentialparticipantagents guethatourmethodintroducesmoreflexibilityinprotocols forthedeterminedprotocols.Bothstepsprovidetheinitia- execution,fosters agents autonomy,favours their dynamic toragentwithasparsematrix:potentialparticipantslinked behavioursandsuitsMAS’ openness.Inthispaperwe de- toprotocols.Thesepotentialparticipantagentsarethuscon- scribe both methods and detail their principles, concepts tacted whether at the same time or one after the other and and algorithms. We exemplify them towards a web docu- arerequiredtovalidateaprotocol.Tocontrastthemessages ments filtering MAS composed of (1) query agents repre- exchanged during the joint selection and those exchanged senting the queries users formulate, (2) document agents during normal interactions, we proposed some performa- representingthedocumentsretrievedfromtheweb,(3)and tiveswhichweinformallydescribeherebellow: ruleagentscorrespondingto anylinguisticruleinvokedto compute documents attributes (author(s), content, call-for-collaboration thesenderofthisperfor- language,etc.). mativeinvitesthereceivertotakepartinaprotocolde- Thepaperisorganisedasfollows.Section2formallyde- scribedinthecontentfield. finestheprotocolsselectionproblem.Sections3and4de- unable-to-select thesenderofthisperformativein- tailourmethods.Section5discussessomerelatedworkand forms the receiver that it cannot play a participant section6drawssomeconclusions. role in the related protocol.The in-reply-to and reply-withfieldshelprelatethismessagetoaprior call-for-collaboration.Thereasonswhyan wherea isoneofthepotentialparticipantagentsformerly i agentmayreplythisperformative,thoughidentifiedas identifiedandp oneofthe1-1protocolsdeterminedforthe j a potential participantfor the protocol,are (1) its au- currenttask. In the midstof the solution search is the ma- tonomysinceitmaynotwanttoexecutethisprotocol trix’s exploration. Hence, it behoves the initiator agent to atthismomentand(2)someerrorsinsomefields. explorethematrixtraversingprotocolsorpotentialpartici- pantagents.Intheprotocol-orientedexploration,theinitia- stop-selection the sender of this performative asks torselectsa protocolanditeratesthroughthesetofagents thereceivertostoptheselectionprocessthismessage whichitidentifiedforthisprotocolandretainsonethatfits islinkedto. the protocol. As soon as an agent is determinedthe selec- ready-to-select the sender of this performativeno- tion process successfully completes. Otherwise, the itera- tifiesthereceiveroftheparticipantrolesitcanbeen- tionproceedsuntilthereisnomoreprotocoltoselect.Anal- acting regarding the protocol description it received. ogously, in the agent-oriented exploration the initiator se- All the participant roles in any protocol compatible lectsanagentanddelvesintoitsprotocols’setlookingfor with the current one can be listed. This grouping not onetheycanexecutetogether.Whateverexplorationtheini- onlyrevealsbyorderofpreferencetherolesthesender tiatoradopts,itshouldovercomethematrixsparsitybyse- commits in playing but it also avoid going back and lectingasnextelement(protocoloragent)theoneholding forth about protocols sharing the same background. theleastsparsevector. Roles of protocols are compatible when they can ex- Consider, by way of illustration, a query agent q1 ecutesafeinteractionsalbeitthedifferenceintheirre- which is requested to execute a task t1: “find out a doc- spectivespecifications.Asanexampletheinitiatorrole ument exhibiting the following characteristics: (lan- ofCNPcaninteractwitheithertheparticipantroleof guage=’English’,content=’plain/text’)”.Protocolsandpo- CNP or that of Iterated CNP (ICNP [5]). While the tential participant agents identifications for t1 lead to the initiatorofICNPcan’tinteractwiththeparticipantof matrix given in table 1 where a cross in a cell [l,c] in- CNPbecauseoftheprobableiterations. dicates that the agent at column c can play a partici- notify-assignment the sender of this performative pant role in the protocol at line l. This matrix reveals informsthereceiverabouttherolethelatter hasbeen that q1 has identified IPS (an Incremental Problem Solv- assigned to in the jointly selected protocol. The as- ing protocol where a problem submitter -initiator- and signed role is one among those the receiver priorly its solver -the participant- progressively find out a so- committedinplaying. lution to a given problem) and Request. A diagram- matic representation of IPS is given in figure 1. In addi- Whatever protocol category the selection is concerned tion, q1 identified seven potential participant document with,wecandescribethejointselectionmessagesexchange agents d1 ... d7. q1 adopts a protocol-oriented explo- sequenceasfollows: 1. theinitiatoragentsendsacall-for-collaboration d1 d2 d3 d4 d5 d6 d7 encapsulatingaprotocol’sdescription. IPS x x x x x 2. Each participant agent can reply with an Request x x x x unable-to-select driving the initiator agent to stop the selection process between both agents by Table1.matrixfortaskt1 sendingastop-selection. 3. Each participant agent can also reply with a ready-to-select. In this case, the initia- ration and selects IPS (the least sparse vector). There- toragentparsestheparticipant’sproposalsandadopts fore, it will try to validate IPS with d1, d2, d4, d5 oneofthemsendinganotify-assignmentorre- or d7. If q1 receives a ready-to-select in re- jectalltheproposalssendingastop-selection. ply to a priorcall-for-collaboration,it explores thelistofpreferredrolesandassoonasitfindsthepartici- Intheremainderofthissectionwedetailthejointselec- pantroleofIPSorRequestitnotifiesitsagreementwith a tionmethodforeachclassofprotocol. notify-assignment.If q1 identified more than these protocolsandaroleofanyofthemispointedoutinthepar- 3.1 InsidetheJoint ProtocolSelection ticipant’s ready-to-select, this protocol will be adopted. In the case it didn’t find out any role it ex- 3.1.1 1-1Protocols pects or it received an unable-to-select, q1 replies In the dynamic1-1 protocols selection, the aim of the ini- withastop-selectionandaslongastherearestillun- tiatoragentistoearlyfindoutasolution,acouple(ai,pj) explored potential participantagents for IPS, q1 will con- adopts its correspondinge as the participantagents’ Problem Problem p Submitter Solver set. The solution is then e and the relevant protocol p declare problem r belongsto. p refuse to solve 2. Otherwise: accept to solve (a) For each e , we compute the difference ı with the union of all the sets except e : ı ask about processing difı =(eı−[{e},j 6=ı). Then, we se- respond  lectthelargestdif . ı stop processing (b) If nodecisioncouldbemade,we saveallthe e ı (only for the highest index) and proceed on our add information iteration. Afterasolutionhasbeenfoundforanindexk,wecheck Figure1.IncrementalProblemSolvingProto- whethersomesets havenotbeensavedfora higherindex. col If no sets were foundthe final solution is the one at hand. Otherwise,weselectfromthelattersthesetwhoseintersec- tionwiththecurrentlyselectedsetisthelargest.Ifnosolu- tinuecontactingthem.Inabsenceofsolutionwhenthepo- tionhasbeenfoundweiteratethroughtheselectionprocess tentialparticipants’sethasbeenthoroughlyexploredfora changingprotocols. protocol,thesameprocessistakenagainuponanotherpro- tocolifthereisany.Incasenosolutionhasbeenfoundand 3.1.3 1-NProtocols no more protocoland participantcan be explored, the dy- A solution to the dynamic 1-N Protocols selection prob- namic protocol selection fails and the subsequent task lem is a triple (A,p ,m) where A is the set of par- remainsnotexecuted. j ticipant agents, p the protocol to use and m an as- j sociative array mapping each agent to the role(s) it 3.1.2 1-1N Protocols will play in the protocol. Here again, the matrix is ex- A solution to the dynamic 1-1N Protocols selection prob- plored only in a protocol-oriented way. The initiator agent a waits for all the participants’ replies and gath- lem is a couple (A,p ) where A is the set of participant ı j erstheready-to-selectmessages.Therolesareclus- agentsandp theprotocoltouse.Forthiscategoryofpro- j tered following the protocols they belong to and the tocols the matrix is explored only in a protocol-oriented protocols which have not been identified by the initia- way since all the identified agents for a protocol are con- tor agent are eliminated. For each protocol p, a maps tactedatthesametime.Onceallthecontactedagentshave ı each role r to a set of agents which candidated for it: replied,theinitiatoragentshouldselectacommonprotocol  for the agents (generallyfor a partof them) which replied candidates(r)=[{ak}. If candidates(r)=∅, the a ready-to-select. We devised several strategies to k protocolr belongstoisnomoreconsideredintheselection perform this selection but here we only describe one, the  process. Moreover,as there exists several participantroles largestset’sstrategy,whichlooksfortherole mostagents in1-Nprotocols,someofthemmayreceivetheirfirstmes- selected.Ifthereexistsaroler thatallthe agentspointed i sagefromotherparticipantroles.Thus,weintroduceanew out,thenthisoneisselectedforalltheagentswhichreplied aready-to-select.Otherwise,welookforarolethat relation,father:giventworolesr1andr2ofa1-Nprotocol, will involve the largest set of agents. Therefore, we con- r1 =father(r2)|=r1isthesenderof ther2′sfirstmessage. For each protocol retained after the candidates sets con- structan array where each indexı containsa collectionof struction, the initiator agent constructs a tree t wherein all the roles which exactly ı agents candidated for. As we nodes are the roles of the protocol. A node r is child didn’tsucceedinfindingoutaroleforallthenagentswhich m of another node r if r = father(r ). t is traversed in a sentaready-to-select,thehighestindexinthisarray n n m breadth-firstwayandforeachnoder oftanagenta isas- pointstoacollectionofrolesthatexactlyn−1agentscan-   signed to r from candidates(r ). Assigning a role to an didated for. We traverse the array from the highest index   agent can be performedby any well known resource allo- downtothelowest.Whileexploringindexk,ifthecollec- cationalgorithm(exelection).Thisassignmentisachieved tionofrolesisnotempty,werepresentforeachroler the ı forallthetreesandtheinitiatoragentusesastrategytose- sete ofagentswhichcandidatedforit. ı lectoneofthetotallyassignedtrees.Animprovementdur- 1. Ifallthee areequal,thenwerandomlyselectar and ing the roles assignment is to avoid situations where the i p same agent plays several roles in a protocol. Thus, when each participant agent a constructs the collection of can-  candidates is a singleton, its only one agent is re- didate roles r which we refer to in the remainder of this  moved from all other candidates sets it appears in section as collection(a ,t ). The roles are then selected  k when these are not singletons. As well, while explor- from collection(a ,t ) and instantiated so that the inter-  k ingt,oncearolehasbeenassignedtoanagentwe should actioncantakeplace.Theindividualprotocolselection,al- remove this agent from all the candidates sets it ap- thoughmoresophisticatedandpowerful,can leadtointer- pears in provided these are not singletons. The singleton actioninconsistencies.Indeed,asindividuallyselectedroles criterionmayguideatreeselectionstrategy. may mismatch, the exchangedmessages’ contentor struc- ture(performative,ontology,language,etc.)maybewrong. Thus,weprovideagentswithtechniquestoanticipatesuch 3.2 Beyondthe jointprotocol selection errors by checking incoming messages over structure and contentcompliance.Whencollection(a ,t )isasingleton, Thejointprotocolselectionmechanismdoesnotapplytoall  k the only onerole is instantiated in orderto interact. If any interactioncontexts.One evidentissue is that genericpro- erroroccursduringtheinteractionnorecoverywouldhave tocols are thought to be invariably specified in the MAS. beenpossible.Dynamicallyselectingprotocolsismoreap- However, the only one aspect that remains invariable in pealingwhenthe collection(a ,t ) containsseveralroles. generic protocols’ specification is the description of ex-  k In this case we explore collection(a ,t ) either sequen- changed messages which is imposed by communication  k tiallyorinparallel.Inthispaper,weonlydescribeindivid- languages(KQML,FIPAACL)andembeddedintheproto- ual1-1protocolsselectionsincetheselectionmechanismis cols’specification.Hence,thereisnoguaranteeforgeneric quite similar for the other two typesof protocolsand only protocolstobespecifiedinauniqueformalismandagents some extensions are required to fit the specificity of these mightfailtointerpretsomeoftheformalismsusedtospec- protocols. ifygenericprotocolsintheMAS.Particularly,plugginghet- erogeneous sub-systems together in a MAS increases the riskformultiplegenericprotocolsspecificationformalisms. 4.1 Sequential Roles Instantiation ThejointprotocolselectionthenfallsshortinaMASwhere Inthepurposeofstartinganinteractionorreplacingafail- generic protocols are specified in several formalisms and ingroleduringaninteraction,aparticipantagentrandomly agents are unable to interpret all those formalisms. In ad- (or using another strategy we’ll define later) selects roles dition,therearealsosituationswhereagentsdonotalways fromthecollectiononeaftertheotheruntilthereisnoavail- trustoneanother.Then,basingprotocolsselectiononspec- able roleto select orthe interactioneventuallysafelyends ificationsexchangebecomesunsafe. up. Once selected, roles are removed from the collection Toaddressthesedrawbacks,wedevelopedanindividual in order to avoid selecting them anew during the same in- protocolselectionmethod. teraction. When a message is wrong the participant agent must recover from this error by replacing the failing role. Therecoveryprocessliesontheinteraction’sjournalwhere 4 Individual Protocol Selection agentslogtheexecutedmethodsandtherelatedevents(in- put:eventswhichfiredthemethod,andoutput:eventsgen- This selection form is carried out concomitantly to the erated by the method’s execution). Each method and its targeted interaction. Likewise the joint protocol selection events form a record. The following four steps define the form, the initiator agent is in charge of starting the selec- errorrecoveryprocess: tion processwhen it locates a collaborativetask’s descrip- tions. It finds out some protocols which comply with the 1. Ifanagentdetectsanerror,itnotifiesitsinterlocutor; task’sdescriptionsandwhereinitcanplayaninitiatorrole. 2. a then purges collection(a ,t ) and selects another   k Theinitiatoragentmayadoptastaticbehaviourduringthis role; selection by choosing a protocolamong the candidates. in 3. a computes the point where the interaction should  thiscase,thestrategyitadoptsisrequiredtobefair.Itmay continueatin the newlyselected roleandnotifiesthe alsobegiventhepossibilitytoexhibitdynamicbehaviours initiator; bychangingprotocolsinordertoaddressoccurringincon- 4. Bothagentsupdatetheirjournalsbyerasingthewrong sistencies.Inthispaperweconsiderthefirstcase. recordsandtheinteractionproceeds. The initiator agent sends the initial message m0 of the selected protocol p to one or several potential partici- Theparticipantrolereplacementduringerrorrecoverycan ı pant agents. m0 actually denotes a need for a new in- requiretheinitiatoragenttorollsomeactionsbackinorder teraction and any agent which receives it selects a par- to synchronise with the newly instantiated role. To purge ticipant role r which starts with m0’s reception. Hence, collection(a,tk),a: 1. Removes from collection(a ,t ) all the roles whose ror occurred at. However, doing so can bring inconsisten-  k description,fromthebeginningoftheroletothepoint cies in the interaction execution because the roles, though theerroroccursat,doesnotmatchthejournal; enactedbythesameagent,donotnecessarilyusethesame methods.These inconsistenciescould be avoided by look- 2. If the message structure is wrong and the error has ingformethodsofthenewrolewhichfollowthesamese- been detected by the initiator agent, removes from quenceorderasinthejournalfromthestartingpoint.This collection(a ,t ) the roles that generated the wrong  k setofmethodswon’tbere-executed.Werepresentthemeth- message.If theerrorhasbeendetectedbya itself, it  odsofthenewroleasnodesofadirectedgraphwhereinan removesfromcollection(a ,t )therolesthatcan’tre-  k edgem m meansthatmethodm can be executedimme- ceivetheclaimederroneousmessage; i j j diately after m completes and the conditions for its exe- i 3. If the message content is wrong and if the er- cutionhold.Algorithm1achievesthiscomputationandre- ror was detected by the initiator agent, removes turnstherecoverypointsforboththe initiatorandthepar- from collection(a ,t ) the roles that cannot gener-  k ticipant.Inthisalgorithm,ıisthenumberofthelatestmes- ate the same message structure at the point the er- ror occurs at and removes from collection(a ,t )  k Algorithm1recoverypointscomputation the roles that use the same method as the one caus- Input:Journal≡theparticipant’sjournal ing the error. If the error was detected by the par- Input:Graph≡thenewrole’smethodsgraph ticipant agent, removes from collection(a ,t ) the Result:Initiatorandparticipantrecoverypoints  k stop←false; roles that do not receive the same message struc- ı←1; ture at the point the error occurred at and also re- ←1; mthjournal←readinit(journal); moves from collection(a,tk) the roles that do not mthgraph←getinitnode(graph); receive the same message content at the point the er- ifmthjournal6=mthgraphthen stop←true; roroccurredat endif whilestop=falsedo Sinceit’snousecheckingthecontentwhenthemessage mthjournal←Succ(mthjournal); ifmthjournal=nullthen structureiswrong,structurecomplianceischeckedpriorto stop←true; content’s. When a role does not comply with the current elseifmthjournal∈follow(mthgraph)then mthgraph←mthjournal; execution,itis removedfromcollection(a,tk). Rolesre- ←+1; movalactuallyconsistsinmarkingthemsothattheycanno ifInputisMessagethen ı←ı+1; morebe instantiated in the currentinteraction.Then,from endif theupdatedcollection(a ,t ),a selectsanewrolefollow- else  k  stop←true; ingthestrategydescribedhereby: endif endwhile 1. If the message content is wrong: (a) for each role of initiatorrecoverypoint:ı; participantrecoverypoint:; collection(a ,t ),constructthesetofmessages(gen-  k erated or received) at the point the error occurred at; (b)withdrawfromthese sets the messagethatcaused sagetheinitiatorshouldbeconsideringithassenttothepar- the error; (c) compare these sub sets and select the ticipantandthepointwheretheparticipantistostartexe- weakest one; Then the role the selected sub set orig- cutingitsnewrolefrom.Thethirdeventtypeconsideredin inatesfromisinstantiated.Theweakestmessagessub thejournal(datavaluechangeinadditiontomessageemis- set is the one containing the higher number of weak sion and reception) accounts for the difference between ı messages.Weakmessagesarethosewhichleadtoin- and.Oncetheinitiatorreceivesı,itlooksfortherecordin teraction termination; these messages are potentially itsjournalrepresentingtheıthmessageitsenttothepartic- weakerthanthosewhichcontinuetheinteraction.The ipant.Alltherecordsfollowingthisonewillbeerasedfrom reason why we prefer the weakest messages sub set thejournal.Theparticipantalsoupdatesitsjournalinquite is that we wish to avoid producing another message thesamewaybasingon. than the “structurally” correct one we generated pri- Suppose d1 wants to identify the language its docu- orly.Whenthereareseveralsubsetscandidateforse- mentiswrittenin;thistask(t2)requiresaninteractionwith lectionorwhentherearenone,aroleisrandomlyse- a rule agent. We assume d1 finds out a protocol which lected. startswith anask-oneemission andexpectsa tell. Con- siderd1contactedaruleagentc1whoseinteractionmodel 2. If the message structure is wrong: randomly select a is partially depicted in figure 2. In this figure, for exam- roleinthecollection(a ,t ).  k ple the given portion of r1 can be interpreted as: r1 re- Onceanewrolehasbeenselected,theparticipantagent ceivesanask-oneandcanreplyaninsertorasorry. mightexpecttocontinueitsexecutionfromthepointtheer- collection(c1,t2)={r1,r2,r3,r4}. 1. Alltheactivatedrolesarestopped; 2. Ifthemessagestructureiswrong:allthem aswellas k the messages having the same structure are removed from C and their roles are stopped. The participant z selectsanothermessagemk′ followingthesameprin- cipleasm ’sselection. Figure2.agentc’sinteractionmodel k 3. Ifthemessagecontentiswrong:allthem messages k as well as those having the same content pattern are • Whateverrolec1 selects,ifitrepliesasorrytheinter- removedfromC andtheirrolesarestopped.Thepar- z actionwillendup,maybeprematurely-thefirstmes- ticipantselectsanothermessagemk′ havingthesame sage has not been validated yet. To get sure it’s not structurebutadifferentcontentpattern. so d1 issues a warning: “May be premature interac- Whensomerolesstayedactivated,theyallgeneratetheir tion termination!”.c1 tries to select anotherrole and messages.Ifthemessageshavethesamestructureandcon- theinteractionproceedsordefinitelystops. tent, all these roles remain activated. Otherwise, only one • Ifc1selectedr4andsentatellwhosecontentiswrong message is selected and all the roles whose message have d1 notifies c1a wrong message contenterror. c1 then not been selected are deactivated. If all the previously ac- stopsr4,purgesitscollection(a,tk)byremovingr1 tivatedroleshavebeenstopped,theparticipantagentreac- (sinceitcannotgenerateatellattheerrorlocation), tivates the most recently deactivated role but cares about selectsr3becauseitcorrespondstotheweakestsubset earlyinteractiontermination.Whentherearemorethanone andcomputestherecoverypoints:ı =  = Rec♯1.c1 suchroles,theyallarereactivated.Theparticipantrolereac- updatesitsjournalandrepliesanewtotheask-one. tivation,mightrequiretheinitiatortorollsomeactionsback toarecoverypoint.Analgorithmsimilartoalgorithm1per- In order to avoid inconsistencies at the end of interac- formstherecoverypointscomputationforboththeinitiator tions,werequirebothagentstoexplicitlynotifyeachother andparticipant.Foreachrolethealgorithmisapplied,con- theprotocol’stermination.Insteadofselectingrolesonthe sideringtheroles’currentexecution,andthefinalrecovery basisofmessagestheycangenerate,itsoundstoselectthem pointistheearliest. onthebasisofmessagestheyreallygenerated.Thisispos- sibleonlyifallcandidatesrolesareinstantiatedatthesame time. This parallel roles instantiation is only known from 5 Related Work theparticipantagent;theinitiatoragentstillhasthepercep- tionofasequentialrolesinstantiation. Protocols selection in agents interactions design is some- thing generally done at design time. Indeed, most of 4.2 MixedRolesInstantiation the agent-oriented design methodologies (Gaia [7] and MaSE[3]toquoteafew)allmakedesignersdecidewhich Alltherolesa identifiedincollection(a ,t )areinstanti- role agents should play for each single interaction. How-   k atedatthesametime.Theyhandlethereceivedmessageand ever dynamic behaviours and openness in MAS demand generatetheirreplymessageswhicharestoredinacontrol greaterflexibility. zone(C );C alsocontainthemessageswhicharedestined To date, there have been some efforts to overcome this z z tocurrentlyactivatedroles.Therolesarethendeactivated. limitation. [4] introduces more flexibility in agents’ coor- Only onemessage m is selected from C and sent to the dinationbutitonlyappliesto planningmechanismsofthe k z initiator.Thisselectioncanbeperformedfollowingseveral individualagents. [2] also proposesa frameworkbasedon strategies.Forexample,theparticipantagentcanrandomly multi-agentMarkovdecisionprocesses.Ratherthanidenti- selectamessageamongthosewhichdon’tshortentheinter- fyinga coordinationmechanismwhichsuits best fora sit- action.Therefore,ifaninsert,asorry,anerrorand uation, this work deals with optimal reasoning within the a tell are generated in reply to an ask-one, insert contextofagivencoordinationmechanism.[1]proposeda andtellwillbepreferredtosorryanderror,andthe frameworkthatenablesautonomousagentstodynamically random selection will be performed between the first two select the mechanism they employ in order to coordinate messages. After a message m has been selected, all the their inter-related activities. Using this framework, agents k roleswhichgeneratedamessageofthesamestructureand select their coordination mechanisms reasoning about the content are activated. In this instantiation mode, when an rewardstheycanobtainfromcollaborativetasksexecution erroroccurs,theparticipantagentrecoversfromitbystop- aswellastheprobabilityforthesetaskstosucceed. pingthewrongrolesandbyreactivatingoneorseveralother Themainrequirementtheselectionprocessfacesinpro- roles.Thus,ifanerroroccursonm : tocol based coordination mechanisms is whether or not k thereexistsintheagent’sinteractionmodelrolescapableof gain,ouraimwastodescribethetheoreticalbasisofady- supportingthedesiredinteraction.Tofillthisvoid,wepro- namicprotocolsselectionmethod.Our methodintensively posedamethodtoenableagentstodynamicallyselectpro- benefitsfromtheagents’capacitytointerpret,relateandup- tocolsbasingontheirinteractioncapacities. datemodelsembeddedinsidethem. 6 Conclusion References Designing agents for open and dynamic environments is [1] R. Bourne, C. B. Excelente-Toledo, and N. R. Jen- still a challenging task, especially in regard to protocol nings. Run-timeselectionofcoordinationmechanisms based interactions. Two main concerns arise from interac- in multi-agent systems. In Proceedings of the 14th tionsmodellinganddesignin such systems. First, howin- European Conference on Artificial Intelligence, pages teractionswhicharebasedongenericprotocolsareconfig- 348–352,Berlin,Germany,August2000. uredso thatconsistentmessagesexchangecan takeplace? [2] C.Boutilier. Sequentialoptimalityandcoordinationin Second, does it sound that designers always decide which multiagentsystems. InProceedinsoftheSixteenthIn- protocolsandrolestouseeverytimeaninteractionisasked ternational Joint Conference on Artificial Intelligence for?Weaddressbothissuesbydevelopingseveralmethods. (IJCAI-99),pages478–485,1999. In this paper we focus on the second concern. We argued [3] S. DeloachandM. Wood. Anoverviewofthemultia- that due to openness and dynamic behaviours more flexi- gentsystemsengineeringmethodology. InP.Ciancar- bility is needed in protocolsselection. Furthermore,in the iniandM.Wooldridge,editors,Proceedingsofthe1st contextofcomplexapplicationsdemandingmulti-protocols InterationalWorkshoponAgentOrientedSoftwareEn- agents, moving from static to dynamic protocol selection gineering,volume1957.SpringerVerlag,June2000. greatlyincreasessuchsystems’efficiencyandproperlyhan- dles the situation tightly related to openness where all the [4] E. H. Durfee. Practically coordinating. AI Magazine, protocolsare notknown at design time. Thus, we enabled 20(1):99–116,1999. agentsto dynamicallyselect protocolsuponthe prevailing [5] FIPA. Fipa interaction protocol library specification. circumstances. Technical report, Foundation for Intelligent Physical One outcome of the dynamic protocol selection is that Agents,2001. the protocols to use are no more hard-coded in all agents [6] SmithR.G. Thecontractnetprotocol:High-levelcom- source code. Rather, programmers mention collaborative municationandcontrolinadistributedproblemsolver. tasksdescriptionsin the initiatoragent’ssourcecodeonly IEEETrans.OnComputers,29(12):1104–1113,1980. makingthelatterinchargeoffiringtheinteraction.Agents are given two ways to select protocols. First, the initiator [7] M. Wooldridge, N. Jennings, and D. Kinny. The gaia agent and all (or a part of them) the potential participant methodology for agent-oriented analysis and design. agentsitidentifiedcanjointogetherandshareinformation Autonomous Agents and Multi-Agent Systems, 3:285– andpreferencesabouttheprotocolsathandin ordertose- 312,2000. lect a protocol and assign a role to each agent. Second, agents are given the possibility to individually select their protocols and roles anticipating errors. We focus on two types of errors: wrong message structure and wrong mes- sagecontent.Asrolesreplacementareperformedassoonas ananomalyisdetected,weconstrainactionsexecuteddur- ing interactions to be reversible and not to render critical side effect. Furthermore, when there are several candidate protocolsintheindividualprotocolselection,wedeveloped twoexplorationmechanismsforthesecandidates:(1)ase- quentialexplorationand(2)amixedexplorationmodes. Bothmethodshavebeenproposedandtestedinthecon- textofa Europeanprojectdedicatedforinformationfilter- ing.Theyprovedtheirusefulnesstoefficientlymanagethe multipleinteractionsthattakeplacebetweenagents.Inthis paper, we don’t provide the results we obtained from the application of these methods since they need to be inter- preted and compared to static selection cases. In the bar-

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.