290 likes | 558 Views
Agent Communication Michael Floyd SYSC 5103 – Software Agents November 13, 2008. Outline. Speech Acts Shared Ontology Agent Communication Language. Speech Acts. Speech act theory: communication is an action Action attempts to influence environment (other agents)
E N D
Agent CommunicationMichael FloydSYSC 5103 – Software AgentsNovember 13, 2008
mfloyd@sce.carleton.ca Outline • Speech Acts • Shared Ontology • Agent Communication Language
mfloyd@sce.carleton.ca Speech Acts • Speech act theory: communication is an action • Action attempts to influence environment (other agents) • No guarantee of success, just like any other action • Not the same master-slave relation as in programming -> a.method(message)
mfloyd@sce.carleton.ca Theory of Speech Acts • Speech changes the state of the world • “I now pronounce you man and wife” • “The meeting is at noon”
mfloyd@sce.carleton.ca Aspects of Speech Acts • Locutionary act – the act of uttering the words • “Please make me some tea.” • Illocutionary act – what is done in saying the words • A request for tea to be made • Perlocution act – what is done by saying the words • Someone made you tea
mfloyd@sce.carleton.ca Aspects of Speech Acts (2) • The hearer must: • Parse the message • Infer the same meaning as the sender • “Could you pass me the salt?” • Willfully want to perform the action • Is doing this in line with my goals or even possible?
mfloyd@sce.carleton.ca Classes of Speech Acts (Searle) • Representatives • try and get the hearer to believe something (claim, insist, etc.) • Directives • a command to attempt to get the hearer to do something (request, forbid, etc.) • Commissives • commit the speaker to a course of action (promise, vow, etc.) • Expressives • express a psychological state (thank, congratulate, etc.) • Declaratives • Declare a change in the world (wed, baptize, define, etc.)
mfloyd@sce.carleton.ca Speech Acts in a Plan Request(Speaker, Hearer, act) Preconditions: • Speaker believes Hearer can perform act or Speaker believes Hearer believes it can perform act • Speaker believes it wants act to be performed • Speaker believes Hearer wants act to be performed Effect: • Speaker believes Hearer wants to perform act
mfloyd@sce.carleton.ca Shared Ontology • The communicating agent should agree to a terminology • Allows the agents to communicate in a consistent manner • For example, is a bat a baseball bat or an animal bat?
mfloyd@sce.carleton.ca Agent Communication Languages • Standardized and structured languages for agents to communicate with each other • Examples: • KQML • FIPA • COOL • Boissier/Demazeau's Interaction Language • CMIP
mfloyd@sce.carleton.ca Knowledge Sharing Effort (KSE) • Two main deliverables from this project • Knowledge Interchange Format (KIF) • content of the message • Knowledge Query and Manipulation Language (KQML) • the illocutionary act of the message • with the content in KIF
mfloyd@sce.carleton.ca KIF • Uses logic to define: • Properties of things • Tom is a vegetarian • Relationships between things • Tom and Janine are married • Properties of the domains • Everyone has a mother
mfloyd@sce.carleton.ca KIF Examples (= (temperature m1) (scalar 83 Celsius)) The temperature, m1, is a scalar equal to 83 Celsius.
mfloyd@sce.carleton.ca KIF Examples (2) (defrelation bachelor (?x) := (and (man ?x) (not (married ?x)))) ?x is a variable and if ?x is a man and not married, then ?x is a bachelor
mfloyd@sce.carleton.ca KIF Example (3) (defrelation person (?x) :=> (mammal ?x)) If ?x is a person it is also a mammal.
mfloyd@sce.carleton.ca KQML • A message between agents • Each message has a performative and a number of parameters • Used as an “envelop” around content (like KIF)
From: A Proposal for a new KQML Specification By: Yannis Labrou and Tim Finin.
mfloyd@sce.carleton.ca KQML Parameters :sender sender of the message :receiver intended recipient :content content of the message :language the language of the content :ontology the terminology of the message :reply-with identifier for the reply (if one is needed) :in-reply-to reference to the reply-with
mfloyd@sce.carleton.ca Example #1 – Initial Message (ask-one :sender trader-agent :receiver stock-server :language LPROLOG :ontology NYSE-TICKS :reply-with q1 :content (PRICE IBM ?price) )
mfloyd@sce.carleton.ca Example #1 - Response (tell :sender stock-server :receiver trader-agent :language LPROLOG :ontology NYSE-TICKS :in-reply-to q1 :content (PRICE IBM 14) )
mfloyd@sce.carleton.ca Example #2 – Initial Message (stream-about :sender A :receiver B :language KIF :ontology motors :reply-with q2 :content m1 )
mfloyd@sce.carleton.ca Example #2 – Responses (1) (tell :sender B :receiver A :language KIF :ontology motors :in-reply-to q2 :content (= (torque m1) (scalar 12 kgf)) )
mfloyd@sce.carleton.ca Example #2 – Responses (2) (tell :sender B :receiver A :language KIF :ontology motors :in-reply-to q2 :content (= (status m1) normal) )
mfloyd@sce.carleton.ca Example #2 – Responses (3) (eos :sender B :receiver A :in-reply-to q2 ) Tells agent A that the stream of responses is done.
mfloyd@sce.carleton.ca Criticism of KQML • No guarantee different implementations would interoperate • Performatives had meanings defined using english, so open to interpretation • No commissive performatives • The performatives set was overly large
mfloyd@sce.carleton.ca Foundation for Intelligent Physical Agents • FIPA ACL was a an attempt to address shortcomings of KQML • FIPA ACL messages are very similar to KQML messages (inform :sender agen1 :receiver agent2 :content (price good2 150) :language s1 :ontology hpl-auction )
mfloyd@sce.carleton.ca FIPA • Aims for more formal message semantics • Semantics provided in a formal language : SL • SL allows the representation of beliefs, desires and uncertain beliefs
mfloyd@sce.carleton.ca FIPA (2) <i, inform(j, φ)> feasibility precondition: Biφ ۸ ¬Bi(Bifjφ ٧ Uifjφ ) rational effect: Bjφ Pre: Agent i believe φ and does not believe that j has a firm belief about φ or is uncertain about φ Post: Agent j should believe φ (hopefully)
mfloyd@sce.carleton.ca References • Chapter 8 of “An Introduction to Multiagent Systems”, Michael Wooldridge