1 / 70

Agent Technology

Agent Technology. Communication in multi-agent system. Communication. Message Types Communication Levels Speech Acts Knowledge Query and Manipulation Language Knowledge Interchange Format Ontology ACL Summary. Introduction. Motivation for Agent Communication

hoang
Download Presentation

Agent Technology

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. Agent Technology Communication in multi-agent system

  2. Communication • Message Types • Communication Levels • Speech Acts • Knowledge Query and Manipulation Language • Knowledge Interchange Format • Ontology • ACL • Summary ©Gao Yang, Ai Lab NJU

  3. Introduction • Motivation for Agent Communication • Communication is required for cooperation between agents. • Societies can perform tasks no individual agent can. • Autonomy encourages disregard for other agents’ internal structure. • Communication agents need only know a “common knowledge”. • Supports heterogeneous agents. ©Gao Yang, Ai Lab NJU

  4. Introduction • Characterization • Interactions occur when agents exist and act in close proximity • shared environment • shared resources • Communication occurs when agents send messages to one another with a view to influencing beliefs and intentions. • Implementation details are irrelevant • via communication links • through shared memory • because of shared conventions • signalling vs “talking” • “body language” ©Gao Yang, Ai Lab NJU

  5. Introduction • Communication • The primary reason for communication among agents is to coordinate activities • Agents may coordinate without communication, provided they have models of others’ behaviour • Communication involves the dimensions of • who • what • when • how (resources and protocol) • why • To facilitate cooperation, agents often need to communicate their intentions, goals, results, and state ©Gao Yang, Ai Lab NJU

  6. Introduction • Coordination and cooperation • Coordination is a property of interaction among agents performing some activity in a shared state. The degree of coordination is the extent to which they • avoid extraneous activity • reduce resource contention • avoid livelock • avoid deadlock • maintain safety conditions • Cooperation is coordination among non-antagonistic agents • Typically, agents must • maintain models of other agents • develop model of future interactions ©Gao Yang, Ai Lab NJU

  7. Introduction • Communication versus computation • Communication is generally more expensive and less reliable • recomputing is often faster than requesting information over a communication channel • communication can lead to prolonged negotiation • chains of belief and goal updates caused by communication may not terminate • Communication is qualitatively superior • information cannot always be reconstructed locally • communication can be avoided only when the agents are set up to share all necessary knowledge. This is a very limiting assumption which cannot be practically achieved in most interesting cases ©Gao Yang, Ai Lab NJU

  8. Introduction • MAS communication protocols • A MAS protocol is specified by the following fields: • sender • recipient(s) • language in the protocol • actions to be taken by the participants at various stages • A MAS protocol is defined above the ISO/OSI transport layer • not about bit patterns • not about retransmissions or routing • A MAS protocol is defined at the knowledge level • involves high-level concepts, such as • commitments, beliefs, intentions • permissions, responsibilities, requests ©Gao Yang, Ai Lab NJU

  9. Message Types • Two basic message types • Assertions • In the simplest form, the information is communicated to the agent from an external source by means of an assertion. • Query • In order to assume a passive role in a dialog, an agent must additionally be able to answer questions, i.e., it must be able to • 1) accept a query from an external source and 2) send a reply to the source by making an assertion. ©Gao Yang, Ai Lab NJU

  10. Message Types • Two basic message types • Query • In order to assume an active role in a dialog, an agent must be able to issue queries and make assertions. ©Gao Yang, Ai Lab NJU

  11. Message Types • Interagent message types ©Gao Yang, Ai Lab NJU

  12. Communication Levels • Communication protocols’ levels • The lowest level of the protocol specifies the method of interaction; • The middle level specifies the format, or syntax, of the information being transferred; • The top level specifies the meaning, or semantics, of the information. • Binary and N-ary communication protocols • Sender and Receiver(s) • Language in the protocol • Encoding and decoding functions • Actions to be taken by the receiver(s) ©Gao Yang, Ai Lab NJU

  13. Communication Levels • Levels of agent communication Agent Communication Language FIPA-ACL, KQML, ... Content language XML, KIF, WML, HTML, ... Agent middleware Encoding schema Java serialized object, String, Bytecode Physical protocols HTTP, IIOP, TCP/IP, SMTP, Fax, Phone, WAP, ... ©Gao Yang, Ai Lab NJU

  14. Communication Levels • Classification of message classifications • Syntactic • distinguish messages based on grammatical forms in natural language • Semantic • distinguish messages based on a notion of intrinsic meaning • e.g., prohibitive is different from directive, despite their syntactic similarity • Use-based • distinguish messages based on their roles in specific classes of protocols • e.g., assertion is different from acknowledgment ©Gao Yang, Ai Lab NJU

  15. Communication Levels • How can an agent tell another agent something? • Send the information in a message (message passing) • Write the information in a location where the other agent is likely to look (shared memory, blackboard) • Show or demonstrate to the other agent (teaching) • Insert or program the information directly into the other agent (master-slave, controller-controller) ©Gao Yang, Ai Lab NJU

  16. Communication Levels • How can one agent obtain information or request a service from another agent? • Ask the other agent (message passing) • Read a location where the other agent is likely to write something (shared memory or blackborad) • Observe the other agent (learning) • Access the information directly from the other agent (“brain surgery”) ©Gao Yang, Ai Lab NJU

  17. Speech Acts • The model for communication among computational agents • Spoken human communication, speech act theory. • Speech act theory views human natural language as actions, such as requests, suggestions, commitments, and replies. • For example: • When a jury declares a defendant guilty, there is an action taken: the defendant’s social status is changed. ©Gao Yang, Ai Lab NJU

  18. Speech Acts • A speech act has three aspects: • Locution, the physical utterance by the speaker. • Illocution, the intended meaning of the utterance by the speaker. • Perlocution, the action that results from the locution. • For example: John say to Mary, “Pls close the window.” • This act consists of the physical sounds generated by John. • John’s intent for the message as a request or a command. • If all goes well, the window being shut. ©Gao Yang, Ai Lab NJU

  19. Speech Acts • But, the intent of the message is not always easily identified. • For example: “I’m cold” • Can be viewed as an assertion, a request for a sweater, or a demand for an increase in room temperature. • For communication among agents, we want to insure that there is no doubt about the type of message. ©Gao Yang, Ai Lab NJU

  20. Speech Acts • Performative • Speech act theory uses the term performative to identify the illocutionary force of this special class of utterance. • Example performative verbs include • Promise, report, convince, insist, tell, request, and demand etc. • The special of performative verbs • “Saying it makes it so”. • Not all verbs are performative, “I solve this problem”. ©Gao Yang, Ai Lab NJU

  21. Speech Acts • Performative • Example performative verbs can be broadly classified as • Assertives (statements of fact). • Directives (commands in a master-slave structure) • Commissives (commitments) • Declaratives (statements of fact) • Expressive (expressions of emotion) ©Gao Yang, Ai Lab NJU

  22. Speech Acts ©Gao Yang, Ai Lab NJU

  23. Speech Acts • In summary • Speech act theory helps define the type of message by using the concept of the illocutionary force, which constrains the semantics of the communication act itself. • But, the message contained within the protocol may be ambiguous • may have no simple response; • Or may require decomposition and the assistance of other agents. ©Gao Yang, Ai Lab NJU

  24. KQML • A foundamental decision for the interaction of agents • Separate the semantics of the communication protocol (which must be domain independent) from the semantics of the enclosed message (which may depend on the domain) • Protocol should be concise and have only a limited of primitive communication acts. ©Gao Yang, Ai Lab NJU

  25. KQML • KQML • Developed under a DARPA funded project, started around 1990 • Is a protocol for exchange information and knowledge. • Two specifications: • DARPA Knowledge Sharing Initiative 1993 • Yannis Labrou and Tim Finin 1997 ©Gao Yang, Ai Lab NJU

  26. KQML • KQML • The elegance of KQML • Is that all information for understanding the content of the message is include in the communication itself. • Each message represents a speech act, associated semantics, protocol and a list of attributes • The basic protocol is defined by the following structure. (KQML-performative :sender <word> :receiver <word> :language <word> :ontology <word> :content <expression> ……) ©Gao Yang, Ai Lab NJU

  27. KQML • KQML • The syntax is Lisp-like, the arguments-identified by keywords preceded by a colon-may be given in any order. • KQML performatives • Describes the type of the message. • About 25 reserved performatives names. • Additional performatives can be added. • Special administrative and networking message type. ©Gao Yang, Ai Lab NJU

  28. KQML • The KQML-performatives are modeled on speech act performatives. • Thus, the semantics of KQML performatives is domain independent. • :content the message itself. • :language the language in which the message is expressed. • :ontology the vocabulary of the “words” in the message. ©Gao Yang, Ai Lab NJU

  29. KQML • KQML • The terms :content, :language, and :ontology delineate the semantics of the language. • Other arguments, including :sender, :receiver, :reply-with, and :in-reply-to, are parameters of the message passing. • KQML can be used in asynchronous communications. • Enough? • KIF: a formal syntax for representing knowledge. • Ontology: define the common concepts, attributes, and relationships for different subsets of world knowledge. ©Gao Yang, Ai Lab NJU

  30. KQML • Blocks-World example • In a Blocks-World ontology, the fact that block A is on top of block B could be communicated as follows: (tell :sender Agent1 :receiver Agent2 :language KIF :ontology Blocks-World :content (And (Block A) (Block B) (On A B)) ) ©Gao Yang, Ai Lab NJU

  31. KQML • For an asynchronous communication, if Agent1 cannot communicate directly with Agent2(but can communicate with Agent3), Agent1 might ask Agent3 to forward a message to Agent2: (forward :from Agent1 :to Agent2 :sender Agent1 :receiver Agent3 :language KQML :ontology kqml-ontology :content (tell :sender Agent1 :receiver Agent2 :language KIF :ontology Blocks-World :content (And (Block A) (Block B) (On A B)))) ©Gao Yang, Ai Lab NJU

  32. KQML • The KQML performatives may be organized into seven basic categories: • Basic query performatives (evaluate, ask-one, ask-all, …) • Multiresponse query performatives (stream-in, stream-all, …) • Response performatives (reply, sorry, …) • Generic information performatives (tell, achieve, cancel, untell, unachieve,…) • Generator performatives (standby, ready, rest, …) • Capability-definition performatives (advertise, subscribe, monitor, …) • Networking performatives (register, unregister, forward, broadcast, …) ©Gao Yang, Ai Lab NJU

  33. KQML (advertise :sender Agent2 :receiver Agent1 :language KQML :ontology kqml-ontology :content (ask-all :sender Agent1 :receiver Agent2 :in-reply-to id1 :language Prolog :ontology Blocks-World :content “on(X,Y)”)) ©Gao Yang, Ai Lab NJU

  34. KQML (ask-all :sender Agent1 :receiver Agent2 :in-reply-to id1 :language Prolog :ontology Blocks-World :content “on(X,Y)”)) (tell :sender Agent2 :receiver Agent1 :in-reply-to id2 :language Prolog :ontology Blocks-World :content “[on(a,b), on(c,d)]”) ©Gao Yang, Ai Lab NJU

  35. KQML • The communication infrastructure • Is not part of the KQML specification • Implemented system use custom-made utility programs called routers or facilators to perform this function. ©Gao Yang, Ai Lab NJU

  36. KQML • KQML agent naming • System for mapping agents into names is important in most ACLs • KQML assumes that names are local • A can register with B under the name Alice • A can register with C under the name Albert • Doesn’t preclude the use of a central Agent Name Server, an architecture used by most systems • What gets registered under a name? Contact information like: name(amundbot, tcpip, [cavenan.idi.ntnu.no,80]). name(amundbot,smtp,[amundbot@jfipa.org) name(amundbot,http,[www.jfipa.org:80/]) ©Gao Yang, Ai Lab NJU

  37. KQML • Facilitators – 1 • Maintain registry of service names • Forward messages to named services • Route messages based on content • Provide ”matchmaking” • Provide mediation and translation services ©Gao Yang, Ai Lab NJU

  38. KQML • Facilitators – I (F is not involved) ©Gao Yang, Ai Lab NJU

  39. tell(X) ask(X) F tell(X) A B KQML • F just forwards ©Gao Yang, Ai Lab NJU

  40. KQML • F is the middle-man ©Gao Yang, Ai Lab NJU

  41. KQML • F sets up connection ©Gao Yang, Ai Lab NJU

  42. KQML • Service discovery ©Gao Yang, Ai Lab NJU

  43. KQML • Routers • Content-independent message routers • Each KQML-agent is associated with its own separate router process • Router handles all outgoing/incoming ACL messages • Outgoing messages can specify a particular agent address (to agent or router) • Message can specify a description of context • Delivery of messages is not guaranteed ©Gao Yang, Ai Lab NJU

  44. Communication:Mechanics of communication Message:Logic of communication Content of communication KQML • Summary • KQML aims to add value at the semantic level of communication • KQML is based on speech act theory (performatives) • KQML provides a meta language describing an envelope, and allowing arbitrary content languages • KQML is meant to be used for: • Agent-to-application communication • Agent-to-agent communication • KQML is layered: ©Gao Yang, Ai Lab NJU

  45. KQML • KQML communication assumptions • Agents are connected by unidirectional links carrying discrete messages • Links have nonzero transport delay • Agent knows link of received message • Agent controls link for sending • Messages to a single destination arrive in the order they were sent • Message delivery is reliable, i.e., no messages are lost ©Gao Yang, Ai Lab NJU

  46. KQML • KQML semantics • Each agent manages a virtual knowledge base (VKB) • Statements in a VKB can be classified into • beliefs • goals • Beliefs encode information an agent has about itself and its environment • Goals encode states of an agent’s environment that it will act to achieve • Agents use KQML to communicate about the contents of their own and others’ VKB ©Gao Yang, Ai Lab NJU

  47. KQML • Critique of KQML • Notion of semantics: NOT semantics of the language, but an operational semantics of the agents in applying the pragmatics of the language • So far, KQML work has been merely driven by academia • No industry standard implementation • No consideration of industry standards (e.g., CORBA, XML) • Messaging paradigm behind KQML leads to high learning curve for developers • KQML has concentrated too much on syntax so far, where the contribution could have been in enhancing semantics • So far, KQML has had only little impact on and virtually no use in industrial software engineering and system development ©Gao Yang, Ai Lab NJU

  48. Knowledge Interchange Format • Motivation for KIF • Creating language for development of intelligent applications • Creating language for common interchange format • Note: • KIF is not intended for interaction with humans • KIF is not intended to be internal representation for knowledge within computer programs • KIF is specifically designed to serve as an ”interlingua”, or mediator in the translation of other language. ©Gao Yang, Ai Lab NJU

  49. Knowledge Interchange Format • KIF features • Prefix version of 1st order predicate calculus (logic) • Declarative semantics • Logically comprehensive • Provides representation of knowledge about representation of knowledge • Additional features: • Translatability • Readability • Usability ©Gao Yang, Ai Lab NJU

  50. Knowledge Interchange Format • KIF general overview Variables: • ?singlevar, @sequence Operators: Term Operators: listof, if, .. Sentence Operators: not, and, /=, ... Rule Operators: =>>, .. Definition Operators: defobject, deffunction Constants: object, function, relational, logical Expressions: Word or a finite sequence of words (i.e. Sentences) ©Gao Yang, Ai Lab NJU

More Related