260 likes | 474 Views
peer-to-peer and agent-based computing. Agent communication. Plan for next two lectures. Communication Agent Communication Languages Communication Protocols. Agent Communication. For agents to communicate they must agree on: The syntax of individual messages (i.e., the language )
E N D
peer-to-peer and agent-based computing Agent communication
Plan for next two lectures • Communication • Agent Communication Languages • Communication Protocols peer-to-peer and agent-based computing
Agent Communication • For agents to communicate they must agree on: • The syntax of individual messages (i.e., the language) • The sequence of messages (i.e., the protocol) • N.B.1: Languages are distinct from protocols! • N.B.2: We need both! • We shall look at proposals for • Agent communication languages (ACLs) • Description of protocols peer-to-peer and agent-based computing
Agent Communication (Cont’d) • Agents are different from distributed processes, as far as their message exchanges: • Individual messages may contain sophisticated information or knowledge • E.g., a message with an explanation of a diagnosis • Protocols are more complex • E.g., a many-party argumentation over fishing rights peer-to-peer and agent-based computing
How to do Things With Words • J.L. Austin • How To Do Things with Words (1962) http://en.wikipedia.org/wiki/J._L._Austin • Speech acts can change the state of the world • E.g., “I pronounce you man and wife” • Locutionary act • Act of making an utterance • E.g., “Shut the door!”. • Illocutionary act • Action performed in saying something • E.g., “He told me to shut the door”. • Perlocution • The effect of the act • E.g., “He caused me to shut the door”. peer-to-peer and agent-based computing
Background: Speech Acts • John Searle (1969), Speech Acts • Home page: http://socrates.berkeley.edu/~jsearle/ • Extended Austin’s theory: • Properties required for a speech act to succeed • Wikipedia’s entry: http://en.wikipedia.org/wiki/Speech_Act • For an imperative: • Normal I/O conditions state that the hearer is able to hear the request, the act was performed in normal circumstances. • Preparatory conditions state what must be true for this speech act to be effective, e.g., the hearer must be capable of the action requested, and the speaker must believe the hearer can do it. • Sincerity conditions state, for example, that the speaker really does want the action performed. peer-to-peer and agent-based computing
Searle: Types of Speech Acts • Representatives: • Commits speaker to the truth of an expressed proposition • Directives: • Attempt to get the hearer to do something (an imperative) • Commissives: • Commits the speaker to some course of action • Expressive: • Express some psychological state • Declaratives: • Causes a change in an institutional state of affairs peer-to-peer and agent-based computing
Agent Communication Languages • Agents exchange messages expressed in an Agent Communication Language (ACL) • Parties must agree (or be aware) of the syntax of individual messages • Most ACLs identify distinct kinds of messages • They represent the intention of the speaker • Examples: • Indicatives (representatives) – “The cat is on the mat.” • Imperatives (directives) – “Put the cat on the mat!” • Interrogatives – “Where is the cat?” peer-to-peer and agent-based computing
Message Structure Message expressed in some Agent Communication Language Sender: Agent-name Receiver: Agent-name Message content expressed in a content language, refers to an ontology • Based on communicative acts (CAs), i.e., the performatives: • Illocutionary verbs, i.e., they describe the speaker’s intention • ACL = CA + MSG • ACLs provide a representation for context: • sender, receiver, ontology, protocol, etc. peer-to-peer and agent-based computing
KQML • Knowledge Query Manipulation Language • Wikipedia’s entry: http://en.wikipedia.org/wiki/Knowledge_Query_and_Manipulation_Language • Developed in the early 1990s • Originally conceived as an interface to KBSs • “Repurposed” as an ACL… • Web site: http://www.cs.umbc.edu/kqml/ peer-to-peer and agent-based computing
KQML ACL • KQML messages are of the form • For example: (performative :sender S :receiver R :language L :ontology O :in-reply-to I1 :reply-with I2 :content K ) (ask-one :sender shopper :receiver amazon-agent :language prolog :ontology book-ontology :in-reply-to advert1234 :reply-with q321 :content book(‘How to do things with words’,‘Austin’,Price) ) peer-to-peer and agent-based computing
KQML (Informal) Semantics • In 1997 KQML had 35 “performatives”, including: peer-to-peer and agent-based computing
KQML Facilitation • KQML performatives divided into groups: • Discourse: ask-one/all, ask-if, tell, insert,… • Facilitation: advertise, broker-one/all, recommend-one/all • Mechanics: low-level stuff like IP address registration • Facilitator agent to handle facilitation performatives. • Usually involving nested KQML messages: (advertise :sender amazon-agent :receiver facilitator42 :language KQML :ontology KQML-ontology :content ) (advertise :sender amazon-agent :receiver facilitator42 :language KQML :ontology KQML-ontology :content (ask-one :sender amazon-agent :receiver facilitator42 :language prolog :ontology book-ontology :reply-with advert1234 :content book(Title,Author,Price) ) ) peer-to-peer and agent-based computing
Recommend-Style Facilitation 4. ask Q O A 5. tell I 3. advertise K 1. advertise K 2. recommend K? B • Conversation for recommend-style facilitation: 1. Agent A advertises to broker B that it can supply K 2. Originator O requests recommendation from B for a supplier of K 3. B sends O advertisement that A can supply K 4. O asks A a query Q concerning K. 5. A tells O some information I in response to Q. Advantage: O can cache advert message for later reuse peer-to-peer and agent-based computing
Broker-Style Facilitation O A 1. advertise K 2. broker Q 3. ask Q 5. tell I 4. tell I B • Alternative style of brokerage: “middleperson” 1. A advertises to B that it can supply K, as before. 2. O requests B to act as broker for a query Q. 3. B determines that Q concerns K, so asks Q to A. 4. A tells B a response I to Q. 5. B tells I to O. Advantage: agent O only needs to know the broker peer-to-peer and agent-based computing
FIPA ACL • The Foundation for Intelligent Physical Agents • Standards organisation promoting agent-based technology • Goal: interoperability of standards with other technologies • Web site: http://www.fipa.org • The FIPA ACL • Open standard described at http://www.fipa.org/specs/fipa00061/SC00061G.pdf • Based on ARCOL (Sadek) & KQML • Content • content languages FIPA SL, constraint language, KIF, RDF. • FIPA interaction protocols • Conversations to achieve some interaction or effect; e.g. auction, contract net, negotiation. peer-to-peer and agent-based computing
FIPA: Message Structure FIPA-ACL messages consist of the following parameters: peer-to-peer and agent-based computing
FIPA: Message Structure (Cont’d) peer-to-peer and agent-based computing
Message Structure (Cont’d) • Only mandatory element is performative • However, most messages will also have at least the sender, receiver and content • If an agent is unable to process one or more element of a message, it must respond with not-understood • An agent that complies with FIPA ACL must at least support not-understood peer-to-peer and agent-based computing
Sample Message (request :sender (:name dominicagent@whitestein.com:8080) :receiver (:name rexhotel@tcp://hotelrex.com:6600) :ontology personaltravelassistant :language FIPA-SL :protocol fipa-request :content (action movenpickhotel@tcp://movenpick.com:6600 (bookhotel (:arrival 25/11/2000) (:departure 05/12/2000) ...)) ) • A request for a hotel booking: peer-to-peer and agent-based computing
Another example: Inform • Summary: • Sender informs receiver that something is true • Message Content: a fact • Description – the sending agent: • Believes that some fact is true, • Intends that the receiving agent also comes to believe that the fact is true, and, • Does not already believe that receiver has any knowledge of the truth of the fact. peer-to-peer and agent-based computing
Another example: Inform (Cont’d) • Sending agent is sincere • Has (somehow) generated the intention that the receiver should know the fact. • Last property concerns semantic soundness of the act: • If an agent knows already that some state of the world holds (that the receiver knows fact p), THEN • It cannot rationally adopt an intention to bring about that state of the world • A rational agent X should never adopt an intention to tell Y something that X knows that Y already knows… peer-to-peer and agent-based computing
Another example: Inform (Cont’d) • From the receiver's viewpoint, receiving an inform message entitles it to believe that: • The sender believes the fact contained in the message, and, • The sender wishes the receiver to believe that fact also • Whether or not receiver adopts the belief in the fact will be determined by the receiver’s trust in the sincerity and reliability of the sender peer-to-peer and agent-based computing
Other Performatives • FIPA Communicative Act Library Specification • Includes: • request an agent to perform some action • query (ask a question) • propose a deal during negotiation • accept-proposal to commit to an agreement • reject-proposal to terminate negotiation without agreement • etc. peer-to-peer and agent-based computing
FIPA ACL and JADE • JADE: FIPA-compliant platform • Incorporates FIPA ACL • Functionalities to assemble and parse messages in FIPA-ACL • Pushing a standard onto industry peer-to-peer and agent-based computing