850 likes | 1.6k Views
LECTURE 7: Agent Communication. Based on An Introduction to MultiAgent Systems http://www.csc.liv.ac.uk/~mjw/pubs/imas Presentation by Nyik San Ting, spring 2003. Agent Communication.
E N D
LECTURE 7: Agent Communication Based on An Introduction to MultiAgent Systemshttp://www.csc.liv.ac.uk/~mjw/pubs/imas Presentation by Nyik San Ting, spring 2003.
Agent Communication • In this lecture and the next, we cover macro-aspectsof intelligent agent technology: those issues relating to the agent society, rather than the individual: • communication;speech acts; KQML & KIF; FIPA ACL • cooperation:what is cooperation; prisoner’s dilemma; cooperative versus non-cooperative encounters; the contract net
Tuesday (12 Oct 2004) Speech Acts KQML, KIF FIPA ACL Ontology Thursday (14 Oct 2004) Ontology development KIF XML & RDF DAML Contents
Speech Acts • Most treatments of communication in (multi-) agent systems borrow their inspiration from speech act theory • Speech act theories are pragmatictheories of language, i.e., theories of language use: they attempt to account for how language is used by people every day to achieve their goals and intentions • The origin of speech act theories are usually traced to Austin’s 1962 book, How to Do Things with Words
Speech Acts - Austin • Communication = action • Doesn’t mean: • Motion of moving mouth • Changing the pressure of the air by talking. • Causing the avalanche by shouting. • The semantic meaning (effect) of the utterance • “Let’s send a bomb to Iraq.“
Speech Acts • Austin noticed that some utterances are rather like ‘physical actions’ that appear to change the state of the world • Paradigm examples would be: • declaring war • christening • ‘I now pronounce you man and wife’ :-) • But more generally, everythingwe utter is uttered with the intention of satisfying some goal or intention • A theory of how utterances are used to achieve intentions is a speech act theory
Speech Acts - Austin • Communication = action • Doesn’t mean: • Motion of moving mouth • Changing the pressure of the air by talking. • Causing the avalanche by shouting. • The semantic meaning (effect) of the utterance • “Let’s send a bomb to Iraq.“
Come and have a free Pizza ! Utterance Speaker Hearer(s) Elements
Speech Acts - Austin 3 aspects of Speech Acts: • Locutionary act • Illocutionary act • Perlocution
Different Aspects of Speech Acts • From “A Dictionary of Philosophical Terms and Names”: • “Locutionary act: the simple speech act of generating sounds that are linked together by grammatical conventions so as to say something meaningful. Among speakers of English, for example, ‘It is raining’ performs the locutionary act of saying that it is raining, as ‘Grablistrod zetagflx dapu’ would not.” • Saying something that make sense using a language • Saying “Please make some tea” • Saying “Tuition fee will increase by 50% next year”
Different Aspects of Speech Acts • “Illocutionary act: the speech act of doing something else – offering advice or taking a vow, for example – in the process of uttering meaningful language. Thus, for example, in saying ‘I will repay you this money next week,’ one typically performs the illocutionary act of making a promise.” • Action intended by the speaker • “He requested me to make some tea” • “The Dean of the University announced that the tuition fee will increase by 50% next year”
Different Aspects of Speech Acts • “Perlocutionary act: the speech act of having an effect on those who hear a meaningful utterance. By telling a ghost story late at night, for example, one may accomplish the cruel perlocutionary act of frightening a child.” • Effect of the action • “He got me to make tea” • “Everyone is informed and understand that the tuition fee will increase by 50% next year”
“Shoot her!” • Locutionary act of saying “Shoot her!” • Illocutionary force of ordering, urging, or advising the hearer to shoot her • Perlocutionary force of persuading, forcing,frightening the hearer to shoot her Example obtained from [2]
Performative Utterance • “ I warn you that they raise the gas price dramatically” • First verb in the sentence • “They raise the gas price dramatically” • Felicitous performative • Performative utterance that works successfully
Felicity conditions • An accepted conventional procedure for the performative; the circumstances and persons must be as specified. • Procedure must be executed correctly and completely • Act must be sincere; uptake required must be completed as much as possible.
Speech Acts • John Searle extended the work of John Austin in 1969 • Identified properties that must hold for a speech act performed between hearer and the speaker to succeed. • Systematic classification of the possible types of speech acts
Speech Acts – Conditions for a speech act to succeed • Normal I/O conditions • HEARER can hear the utterance • Preparatory conditions • What must be true of the world in order that SPEAKER correctly choose the speech act • Sincerity conditions • Distinguish the sincerity of the performance of the speech act
Speech Acts • Searle (1969) identified various different types of speech act: • representatives : Commits the speaker to the truth of an expressed proposition, such as informing, e.g., ‘It is raining’ • directives: Attempts on the part of the speaker to get the hearer to do somethinge.g., ‘please make the tea’ • commisives: Commit the speaker to doing something, e.g., ‘I promise to… ’ • expressives: Speaker expresses a mental state, e.g., ‘thank you!’ • declarations: Effect some changes in an institutional state of affairs, such as declaring war or christening
Speech Acts • There is some debate about whether this (or any!) typology of speech acts is appropriate • In general, a speech act can be seen to have two components: • a performative verb:(e.g., request, inform, promise, … ) • propositional content:(e.g., “the door is closed”)
Speech Acts • Consider: • performative = requestcontent = “the door is closed”speech act = “please close the door” • performative = informcontent = “the door is closed”speech act = “the door is closed!” • performative = inquirecontent = “the door is closed”speech act = “is the door closed?”
Plan Based Semantics • How does one define the semantics of speech acts? When can one say someone has uttered, e.g., a request or an inform? • Cohen & Perrault (1979) defined semantics of speech acts using the STRIPS formalism for planning: precondition-delete-add list • The world is a multimodal logic representation for the Beliefs, Abilities, Wants of the participants in the speech act • Note that a speaker cannot (generally) forcea hearer to accept some desired mental state • In other words, there is a separation between the illocutionary act and the perlocutionary act
Plan-Based Semantics • Here is their semantics for request:request(s, h, f) pre: • s believe h can do f(you don’t ask someone to do something unless you think they can do it) • s believe h believe h can do f(you don’t ask someone unless they believe they can do it) • s believes want f(you don’t ask someone unless you want it!) post: • h believe s believe s want f(the effect is to make them aware of your desire) Note that request ensures only that h is aware of s’ desire – locution only!!
Mediating act In order to ensure that there is perlocutionary force – need a mediating act: CauseToWant(A1, A2, ) • Preconditions Cando.pr (A1BELIEVE (A2BELIEVE (A2WANT))) Want.pr X • Effect (A1BELIEVE (A1WANT)) By this definition, the agent will come to believe that it wants something, if it believesthat another agent believes it wants to do it. This definition can be extended to contain more conditions related to social relationships, role etc.
KQML and KIF • We now consider agent communication languages (ACLs) — standard formats for the exchange of messages • The best known ACL is KQML, developed by the ARPA knowledge sharing initiativeKQML is comprised of two parts: • the knowledge query and manipulation language (KQML) • the knowledge interchange format (KIF)
KQML and KIF • KQML is an ‘outer’ language, that defines an ‘envelope’ format for messages to explicitly state the intended illocutionary force • KQML defines various acceptable ‘communicative verbs’, or performativesExamples: • ask-if (‘is it true that. . . ’) • perform (‘please perform the following action. . . ’) • tell (‘it is true that. . . ’) • reply (‘the answer is . . . ’) • KIF is a language for expressing message content (ONTOLOGIES– later)
Example (tell :content (= (temperatute m1) (scalar 83 Celsius)) :sender termometer-server :receiver heater :language KIF :ontology ONTOLOGY_NAME ) Inform another agent about some fact. Formal definition: S claims to R that C is in S’s VKB.
Another example There are variants: ask-if, ask-all, ask-about (ask-one :content (PRICE ISM ?price) :receiver stock-server :language LPROLOG :ontology NYSE-TICKS ) Ask another agent a question where exactly one answer is required. Formal: S wants one of R’s answers to question C
FIPA • More recently, the Foundation for Intelligent Physical Agents (FIPA) started work on a program of agent standards — the centerpiece is an ACL • Basic structure is quite similar to KQML: • performative20 performatives in FIPA • housekeepinge.g., sender, etc. • contentthe actual content of the message
FIPA • Example:(inform :sender agent1 :receiver agent5 :content (price good200 150) :language sl :ontology hpl-auction)
FIPA ACL Semantics • Semantics of ACL preformatives are given with respect to a formal SL (Semantic Language) • Represent beliefs, desires, uncertain beliefs of agents and actions that agents perform • Well defined, in contrast to KQML • Each FIPA ACL message can be mapped to a formula of SL • Defines a constraint that the sender must satisfy (Feasibility conditions) • Defines the rational effect of the action - the “purpose” of a message (cannot be guaranteed)
“Inform” and “Request” • “Inform” and “Request” are the two basic performatives in FIPA. All others are macrodefinitions, defined in terms of these. • The meaning of inform and request is defined in two parts: • pre-conditionwhat must be true in order for the speech act to succeed • “rational effect”what the sender of the message hopes to bring about
“Inform” and “Request” • For the “inform” performative…The content is a statement.Pre-condition is that sender: • holds that the content is true • intends that the recipient believe the content • does not already believe that the recipient is aware of whether content is true or not
“Inform” and “Request” • For the “request” performative…The content is an action.Pre-condition is that sender: • intends action content to be performed • believes recipient is capable of performing this action • does not believe that receiver already intends to perform action
Semantic Conformance Testing • Woolridge • ACL semantics are generally developed in such a way as to express constraint on the sender of the message • Specification • Problem: • Need to know the mental state of agents (what they believed, intended and so on)
References on Agent Communication Languages • “Austin’s Speech Act Theory” by Saeed http://www.ohiou.edu/dlcds/saaustin.htm • Speech Acts http://www.ccl.umist.ac.uk/teaching/material/5005/node24.html • “Cohen and Levesque - intention” http://www.csc.liv.ac.uk/~mjw/pubs/ker95/subsubsectionstar3_2_6_2.html 4 . “FIPA ACL Message Structure Specification” by FIPA http://www.fipa.org/specs/fipa00061/SC00061G.html 5. “FIPA Communicative Act Library Specification" by FIPA http://www.fipa.org/specs/fipa00037/SC00037J.html
A “Football game on 11/02/03” B C “Soccer game on 11 Feb 2003” “Rugby game on Nov 02, 2003” Ontologies • Different understanding of the terminology
Knowledge Sharing among Agents:KQML and KIF • In order to be able to communicate, agents must have agreed on a common set of terms • A formal specification of a set of terms is known as an ontology • The knowledge sharing effort has associated with it a large effort at defining common ontologies — software tools like Ontolingua for this purpose • Example KQML/KIF dialogue…A to B: (ask-if(> (size chip1) (size chip2)))B to A: (reply true)B to A: (inform(= (size chip1) 20))B to A: (inform(= (size chip2) 18))
Why we need ontology? • To share common understanding of the structure of information among people or software agents • To enable reuse of domain knowledge • To make domain assumptions explicit • To separate domain knowledge from the operational knowledge • To analyze domain knowledge
Ontology • ‘A systematic account of Existence’ in Philosophy • Explicit formal definition of the terminologies describing the concepts or objects (and their attributes) of a domain and the relations among them. • A specification of vocabulary/definition (human readable & machine interpretable) and their relations that model the real world
KIF – Knowledge Interchange Format Based-on first order logic recast in a LISP (LISt Processing)-like notation. Used to state: • Properties of things in a domain (e.g., “Noam is chairman”) • Relationships between things in a domain (e.g., “Amnon is Yael’s boss”) • General properties of a domain (e.g., “All students are registered for at least one course”, “Everybody has a mother”)
KIF (2) • “The temperature of m1 is 83 Celsius”:(= (temperature m1) (scalar 83 Celsius)) • “An object is a bachelor if the object is a man and is not married”:(defrelation bachelor (?x) := (and (man ?x) (not (married ?x)))) • “Any individual with the property of being a person also has the property of being a mammal”:(defrelation person (?x) :=> (mammal ?x))
KIF (3) • Usual connectives • and, or, not, • Universal and existential quantifiers • forall, exist • Set Relation • Subset, /=, =, Member, Disjoint • Object type • Numbers (1,2,3 …) characters, strings • Object relation • Cos, Max, Log, <, *
KIF (4) Define new class • “New class of ‘primary-color’ which take value of red, green, or blue” (define-class primary-color (?color) (member ?color (set red green blue)))
KIF (5) Define new concept • “New concept of bachelor which is a man and this man is not married” (defrelation bachelor (?x) := (and (man ?x) (not (married ?x))))
KIF (6) Define new relationships • “Any individual with the property of being a person also has the property of being a mammal” (defrelation person (?x) :=> (mammal ?x)) • Note: A mammal might not be a person!
Extensible Markup Language -XML XML is • a method for embedding structure and meaning in data files. • a new technology for managing data, particularly suitable for web applications. • is text (humans and machines readable)
Example Dr. John Cooke 57 Campus Drive, Saskatoon, SK S7N5A9
Representation in HTML <P><B>Dr. Julita Vassileva</B> <BR>110 Science Place, <BR>Saskatoon, SK S7N 5C9</P> HTML tags describe how something should render. They don't contain any information about what the data is, they only describe how it should look. The set of HTML tags is fixed – as defined by the DTD (Document Type Definition).