1 / 38

CLAIM : A Computational Language for Autonomous, Intelligent and Mobile agents

CLAIM : A Computational Language for Autonomous, Intelligent and Mobile agents. Amal EL FALLAH-SEGHROUCHNI Alexandru SUNA. University of Paris 6. University of Paris 9. Motivations. Think and implement in the same paradigm: agent Meet the requirements of: distribution migration.

fergal
Télécharger la présentation

CLAIM : A Computational Language for Autonomous, Intelligent and Mobile agents

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CLAIM : A Computational Language for Autonomous, Intelligent and Mobile agents Amal EL FALLAH-SEGHROUCHNI Alexandru SUNA University of Paris 6 University of Paris 9

  2. Motivations • Think and implement in the same paradigm: agent • Meet the requirements of: • distribution • migration

  3. Talk Outline • Programming distributed MAS • Agent Oriented Languages • Ambient Calculus • CLAIM specifications • Agents • Agent’s Reasoning • Example • Implementation aspects • SyMPA • Mobility Protocol • Mobility Completeness • CLAIM Expressiveness • Conclusion and perspectives

  4. Agent Oriented Languages (1) 1993, Y.Shoham agent oriented programming languages : Agent-0, Agent-K, PLACA, AgentSpeak, VIVA, 3APL, dMars Agents’ characteristics: • mentalstate: • beliefs • goals (AgentSpeak, VIVA, 3APL, dMars) • obligations (Agent-0, Agent-K, PLACA) reasoning mechanisms capabilities/services Agent-0, Agent-K, PLACA, AgentSpeak

  5. planning: PLACA, AgentSpeak, 3APL, dMars concurrency: AgentSpeak, 3APL, dMars mobility: none Agent Oriented Languages (2) Agents’ characteristics: communication: • agent reasoning, without communication : • 3APL, dMars • message passing: • Agent-0, Agent-K, PLACA, AgentSpeak,VIVA

  6. Ambient : • a bounded place • a name, set of processes and sub-ambients Ambient Calculus [Cardelli and Gordon, 98] • Interest : improve the modeling of agents' mobility M ::= capabilities x variable n name in n enter into n out n exit out of n open n open n acid open from inside mv in n move in n mv out n move out of n P,Q ::= processes M[P] ambient (n)P restriction 0 inactivity P | Q composition !P replication M.P capability action (x).P input action M output action + Reduction rules

  7. Reduction rules: Ambient Calculus [Cardelli and Gordon, 98] enter action: n[in m.P | Q] | m[R] m[n[P | Q] | R ] exit action:m[n[out m.P | Q] | R] n[P | Q] | m[R] replication: !P !P | P open action: open n.P | n[Q]P | Q other rules: mv in n.P | n[Q] n[ P | Q ] n[mv out n.P | Q ]  P | n[Q] n[acid.P | Q ]  P | Q Communication: (x).P | MP { xM }

  8. Our CLAIM An agent oriented programming language that homogeneously combines: Intelligence, Autonomy and Mobility Cognition, Interaction and Concurrence Agent Languages Concurrent Languages • goals • knowledge • capabilities • reasoning • communication • primitives • mobility • primitives

  9. Agent Description defineAgent agentName { parent = null |agentName ; knowledge = null | { knowledge;*} ; goals = null | { goal ;* } ; messages = null | { message ;* } ; capabilities = null | { capability ;* } ; processes = null | { process| * } ; agents = null | { agentName ;* } ; } defineAgentClassclassName { ... } newAgent agentName( className)

  10. knowledge goals parent Agent’s Components hierarchical structure ; Ambient-Calculus like knowledge = agentName (capabilityS,message,effect ) | proposition goal = proposition

  11. Variables • agentName • capabilitySignature • message • goal • effect variable : ?x , where x could be: Examples: forAllKnowledge(?Ag(cap1,?mess,?effect)) { process(?Ag) } ?Ag - all the agents in the knowledge base that have the capacity cap1 forAllAgents(?Ag : className) { process(?Ag) } ?Ag - all the sub-agents of the current agent that belong to the class className

  12. receiver: message: Agents’ Communication send ( receiver, message [, c, [t] ] ) • agentName • ?Ag • all (broadcast ) • this • ?Ag:className (multicast) • proposition • messages concerning the knowledge • tell ( knowledge ) • askAllCapabilities ( agentName, agentName ) • askIfCapabiliy ( agentName,agentName,capabilityS ) • achieveCapability ( agentName,agentName,capabilityS ) • removeCapability (agentName, capabilityS ) • mobility messages

  13. Messages concerning knowledge A.send(B,tell(knowledge))  the knowledge is added in the knowledge base A.send(B,askAllCapabilities(A,B)) B.send(A,tell(B(capabilityS,message,effect ))) A.send(B,askIfCapabiliy(A,B,capabilityS)) B.send(A,tell(B(capabilityS,message,effect ))) A.send(B,achieveCapabiliy(A,B,capabilityS)) the capability is performed A.send(B,removeCapability(A,capabilityS)) the knowledge about this capability is removed

  14. Add permissions to ambient-calculus primitives Mobility messages • openBy(Ag) • - ask open permission • openOK(Ag) ; openNotOK(Ag) • - the agent Ag accepts / doesn’t accept to be open • wantOut(Ag) • - ask exit permission • outOK(Ag) ; outNotOK(Ag) • - the agent Ag gives / doesn’t give the permission • wantIn(Ag) • - ask enter permission • inOK(Ag) ; inNotOK(Ag) • - the agent Ag gives / doesn’t give the permission

  15. capabilities : Capabilities capability = capabilitySignature { message = null | message ; conditions = null | condition; do { process}; effects = null | { proposition;*} } condition = function(args*) | agentName.effect | ( condition ) | not condition | condition and condition | condition or condition

  16. processes : forAllKnowledge (knowledge){ P } forAllAgents (agentName){ P } Processes P ::= P.P proposition instruction functionName([arguments*]) newAgent agentName( agentClass ) in ( arg,agentName ) out ( arg,agentName ) moveTo( arg,agentName ) open ( agentName ) acid send ( receiver, message [,c [,t]] ) arg = this | clone | process

  17. Agent’s Reasoning Forward reasoning: • choose a messages from the queue of messages • find the capabilities that have this activation message • verify the conditions of the chosen capabilities • execute the corresponding processes Backward reasoning: • choose a goal form the goal list • find the capabilities that allow to achieve the goal • verify the conditions of the chosen capabilities •  update the goals, ask for capabilities • execute the corresponding processes

  18. Example e-commerce Company agent • knows the names of some Buyer agents • can create Seller agents Seller agent class • can migrate • can negotiate with Buyer agents Buyer agent class • can negotiate with Seller agents forward reasoning two solutions backward reasoning

  19. Agent definitions (forward - 1) • defineAgent Company { • parent=null ; • knowledge= { • B1(Buy,buy(),null); • B2(Buy,buy(),null); • } • goals=null; • messages=null ; • capabilities={ • sendSeller { • message=sendSeller() ; condition=null; • do { newAgent S1(Seller).forAllKnowledge(?Ag(Buy,?mess?eff)) { • send(S1,tell(?Ag(Buy,?mess,?eff))) }. send(S1,go()) } • effects=null; • } • useData { • message=arriveSeller(?Ag); condition=null; • do { computeData() } • effects=null; • } • } • processes= send(this,sendSeller()); • agents=null ; • }

  20. Agent definitions (forward - 2) • defineAgentClass Seller { • parent=null ; • knowledge= null; • goals=null; • messages=null ; • capabilities={ • goToBuyer { • message=go(); • condition=null; • do { forAllKnowledge(?B(Buy,mess,?eff)){ • moveTo(this,?B).negotiate(?B) • }.send(this,goToCompany()) } • effects=null; • } • goToCompany { • message = goToCompany() ; • condition=null; • do { moveTo(this,Company).send(Company,arriveSeller(this)) } • effects=null; • } • } • processes= null ; • agents=null ; • }

  21. find, verify, execute goToBuyer() find capabilities send(this,goToCompany()) sendSeller() find, verify, execute goToCompany verify conditions:OK execute capability send(Company,arriveSeller(S1)) send(S1,go()) Find, verify, execute useData() Run steps (forward) Company S1 : Seller send(this,sendSeller)

  22. Agent definitions (backward - 1) • defineAgent Company { • parent=null ; • knowledge= null; • goals=haveData(); • messages=null ; • capabilities={ • useData { • message=arriveSeller(?Ag); • condition= ?Ag:Seller.arriveToCompany(); • do { computeData(); } • effects=haveData(); • } • } • processes= null; • agents= { S1; } • }

  23. Agent definitions (backward - 2) • defineAgentClass Seller { • parent=Company ; • knowledge={ B1(Buy,buy(),null); B2(Buy,buy(),null); } • goals=null; • messages=null ; • capabilities={ • goToBuyer { • message=go(); • condition=null; • do { forAllKnowledge(?B(Buy,mess,?eff)){ • moveTo(this,?B).negotiate(?B) • }.send(this,goToCompany()) } • effects=endNegotiation(); • } • goToCompany { • message = goToCompany() ; • condition=this.endNegotiation(); • do { moveTo(this,Company).send(Company,arriveSeller(this)) } • effects=arriveToCompany(); • } • } • processes= null ; • agents=null ; • }

  24. goHome(), effect=arriveHome() find capabilities find capabilities find capabilities useData(), effect=haveData() verify conditions verify conditions this.endNegotiation() ?Ag:Seller.arriveToCompany() goToBuyer(), effect=endNegotiation() verify conditions:null execute capability Run steps (backward) S1 : Seller Company goal=haveData()

  25. SyMPA Architecture(MASIF compliant) Agent System Agent System Agent Agent Agent … Agent … I/O I/O I/O I/O I/O I/O I/O Central System

  26. Definitions Base MAS Structure Interface + Editor Interpret Create agents PAgent . . . PAgent Agent System Level PSystem

  27. PAgent verify goals Interface wait messages run processes visualise modify select capabilities select capabilities agent file name.agd update update Agent Level

  28. getAgentIP(B) IP,port(System(B)) wantToSend(B) IP,port(B) wantIn(this,A) Update SMA Save agent’s state Verify authority Update SMA Restore agent inOK(this,B) inAgent(A,B,agent) Mobility Protocol Central System PSystem A PSystem B Agent A Agent B in(this,B)

  29. Mobility Completeness • algorithm MobilityOperation • Input : agent, SMA • while (not SMA.structureCondition()) do wait(t1) • if (SMA.structureCondition()) then • agent.saveState() • agent.suspendAllProcesses() • agent.askPermission() • while (not agent.receivePermission() ) do wait(t2) • if (agent.receivePermission()) then • SMA.update() • while (not SMA.endUpdating()) do wait(t3) • agent.restoreState() • agent.resumeAllProcesses() • end if • else • agent.removeProcess(this) • agent.restoreState() • agent.resumeAllProcesses() • end else • end if

  30. Language Expressiveness FIPA Contract Net Protocol

  31. Agents Definitions (FIPA - 1) • defineAgent Initiator { • parent=null ; • knowledge= null; • goals=null; • messages=null ; • capabilities={ • calForProposals { • message=callForProposals(); • condition=null; • do { send(?Ag:Participant,cfp(this) ) } • effects=null; • } • rejectProposal { • message= propsose(?PAg); • condition= reject() ; • do { send(?PAg,rejectProposal(this)) } • effects=null; • }

  32. Agents Definitions (FIPA - 2) • acceptProposal { • message= propsose(?PAg) ; • condition= accept() ; • do { send(?PAg,acceptProposal(this)) } • effects=null; • } • } • processes= send(this,callForProposals()) ; • agents=null ; • }

  33. Agents Definitions (FIPA - 3) • defineAgentClass Participant { • parent=null ; • knowledge= null; • goals=null; • messages=null ; • capabilities={ • refuzeCFP { • message=cfp(?IAg) ; • condition=notAccept(); • do { send(?IAg,refuse(this) ) } • effects=null; • } • notUnderstood { • message= cfp(?IAg); • condition=notUnderstood() ; • do { send(?IAg,notUnderstood(this) )} • effects=null; • } • acceptCFP { • message=cfp(?IAg); • condition=accept(); • do { send(?IAg,propose(this) ) } • effects=null; • }

  34. Agents Definitions (FIPA - 4) • failure { • message = acceptProposal(?IAg) ; • condition=failure(); • do { send(?IAg,failure(this) ) } • effects=null; • } • done { • message = acceptProposal(?IAg) ; • condition=done(); • do { send(?IAg,informDone(this) ) } • effects=null; • } • ref { • message = acceptProposal(?IAg) ; • condition=ref(); • do { send(?IAg,informRef(this) ) } • effects=null; • } • } • processes= null ; • agents=null ; • }

  35. Conclusion: Main Contribution CLAIM language • Goals, Knowledge, capacities • Backward reasoning: reactive behavior • Forward reasoning : goal driven behavior • Communication primitives • Mobility primitives Expressiveness Completeness SyMPA system • Easy design of distributed MAS • editing agents, interpret, agent interface • Suitable platform for implementation • management, creation, execution, authentication, migration of agents • protocols for communication and mobility

  36. Perspectives • Define an operational semantics of CLAIM • Enrich the language • add security primitives and data types • Extend de language possibilities • develop libraries of agents • endow agents with learning capacities • Improve SYMPA • call functions/subroutines defined in other languages • offer several mechanisms for the management of agents and agent systems

  37. References • Luca Cardelli, "Abstractions for Mobile Computation", in Secure Internet Programming: Security Issues for Mobile and Distributed Objects. Lecture Notes in Computer Science, Vol. 1603, Springer, pp. 51-94, 1999. • Luca Cardelli, "Mobile Ambients Synchronisation", SRC Technical Note, 1997. • Luca Cardelli, A.D. Gordon, "Mobile Ambients", in Foundations of Software Science and Computational Structures, Maurice Nivat (Ed.), Lecture Notes in Computer Science, Vol. 1378, Springer, pp. 140-155, 1998 • Winton H E Davies, Peter Edwards, "Agent-K: An Integration of AOP and KQLM", 1994. • K.V.Hindriks, F.S.deBoer, W.van der Hoek, J.J.Ch.Meyer, "Agent Programming in 3APL", 1999 • M. d'Inverno, D. Kinny, M. Luck, M. Wooldridge, "A Formal Specification of dMARS", 1998.

  38. References • D. Milojicic, M. Breugst, I. Busse, J. Campbell, S. Covaci, B. Friedman, K. Kosaka, D. Lange, K. Ono, M. Oshima, C. Tham, S. Virdhagriswaran, J. White, "MASIF, The OMG Mobile Agent System Interoperability Facility", 1998. • David Parks, "Agent-Oriented Programming: A Practical Evaluation", 1997. • Yoav Shoham, "Agent Oriented Programming", Artificial Intelligence (60), pp.51-92, 1993. • Christian F. Tschudin, "Mobile Agent Security", in Intelligent Information Agents - Agent based information discovery and management on the Internet, Springer, pp. 431-445, 1999. • Gerd Wagner, "VIVA Knowledge-Based Agent Programming", 1996. • D.Weerasooriya, Anand S. Rao, K. Ramamohanarao, "Design of a Concurrent Agent-Oriented Language", 1994.

More Related