Title: LECTURE 7: Agent Communication
1LECTURE 7 Agent Communication
- Based on
- An Introduction to MultiAgent Systemshttp//www.c
sc.liv.ac.uk/mjw/pubs/imas - Presentation by Nyik San Ting, spring 2003.
2Agent Communication
- In this lecture and the next, we cover
macro-aspects of intelligent agent technology
those issues relating to the agent society,
rather than the individual - communicationspeech acts KQML KIF FIPA ACL
- cooperationwhat is cooperation prisoners
dilemma cooperative versus non-cooperative
encounters the contract net
3Contents
- Tuesday (12 Oct 2004)
- Speech Acts
- KQML, KIF
- FIPA ACL
- Ontology
- Thursday (14 Oct 2004)
- Ontology development
- KIF
- XML RDF
- DAML
4Speech Acts
- Most treatments of communication in (multi-)
agent systems borrow their inspiration from
speech act theory - Speech act theories are pragmatic theories 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 Austins 1962 book, How to Do Things
with Words
5Speech Acts - Austin
- Communication action
- Doesnt 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
- Lets send a bomb to Iraq.
6Speech 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, everything we 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
7Speech Acts - Austin
- Communication action
- Doesnt 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
- Lets send a bomb to Iraq.
8Elements
9Speech Acts - Austin
- 3 aspects of Speech Acts
- Locutionary act
- Illocutionary act
- Perlocution
10Different 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
11Different 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
12Different 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
13Shoot 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
14Performative 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
15Felicity 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.
16Speech 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
17Speech 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
18Speech 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 something e.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
19Speech 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)
20Speech Acts
- Consider
- performative requestcontent the door is
closedspeech act please close the door - performative informcontent the door is
closedspeech act the door is closed! - performative inquirecontent the door is
closedspeech act is the door closed?
21Plan 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) force a
hearer to accept some desired mental state - In other words, there is a separation between the
illocutionary act and the perlocutionary act
22Plan-Based Semantics
- Here is their semantics for requestrequest(s,
h, f) - pre
- s believe h can do f(you dont ask someone to do
something unless you think they can do it) - s believe h believe h can do f(you dont ask
someone unless they believe they can do it) - s believe s want f(you dont 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!!
23Mediating act
In order to ensure that there is perlocutionary
force need a mediating act
- CauseToWant(A1, A2, ?)
- Preconditions
- Cando.pr
- (A1 BELIEVE (A2 BELIEVE (A2 WANT ?)))
- Want.pr
- X
- Effect
- (A1 BELIEVE (A1 WANT ?))
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.
24KQML 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)
25KQML 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)
26Example
- (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 Ss VKB.
27Another 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 Rs
answers to question C
28FIPA
- 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
29FIPA
- Example(inform sender agent1 receiver agent
5 content (price good200 150) language sl on
tology hpl-auction)
30FIPA
31FIPA 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)
32Inform and Request
- Inform and Request are the two basic
performatives in FIPA. All others are macro
definitions, 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 effectwhat the sender of the message
hopes to bring about
33Inform and Request
- For the inform performativeThe 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
34Inform and Request
- For the request performativeThe 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
35Semantic 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)
36Figure obtained from 5
37References on Agent Communication Languages
- Austins 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/subsubsec
tionstar3_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
38Ontologies
- Different understanding of the terminology
39Knowledge Sharing among AgentsKQML 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 dialogueA to B (ask-if (gt
(size chip1) (size chip2)))B to A (reply
true)B to A (inform ( (size chip1) 20))B to
A (inform ( (size chip2) 18))
40Why 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
41Ontology
- 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
42KIF 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 Yaels boss) - General properties of a domain (e.g., All
students are registered for at least one course,
Everybody has a mother)
43KIF (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) gt (mammal ?x))
44KIF (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, lt,
45KIF (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)))
46KIF (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))))
47KIF (6)
- Define new relationships
- Any individual with the property of being a
person also has the property of being a mammal - (defrelation person (?x) gt (mammal ?x))
- Note A mammal might not be a person!
48Extensible 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)
49Example
- Dr. John Cooke
- 57 Campus Drive,
- Saskatoon, SK S7N5A9
50Representation in HTML
- ltPgtltBgtDr. Julita Vassilevalt/Bgt
- ltBRgt110 Science Place,
- ltBRgtSaskatoon, SK S7N 5C9lt/Pgt
- 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).
51Representation in XML
- ltaddressgt
- ltnamegt
- lttitlegtDr. lt/titlegt
- ltfirst_namegtJulitalt/first_namegt
- ltlast_namegtVassilevalt/last_namegt
- lt/namegt
- ltstreetgt110 Science Placelt/streetgt
- ltcitygtSaskatoonlt/citygt
- ltprovincegtSKlt/provincegt
- ltpcodegtS7N 5C9lt/pcodegt
- lt/addressgt
Note semantic tags! Using XML it is possible to
define new tags by writing an XML DTD.
52Resource Description Framework
- RDF is
- is a model for describing resources, mainly
internet resources - A way for publishing human readable and machine
processable vocabularies
53Example
Figures obtained from 10
54Example (2)
lt?xmlnamespace ns "http//www.w3.org/RDF/RDF/"
prefix "RDF" ?gt lt?xmlnamespace ns
"http//purl.oclc.org/DC/" prefix "DC" ?gt
ltRDFRDFgt ltRDFDescription RDFHREF
"http//uri-of-Document-1"gt ltDCCreatorgtJohn
Smithlt/DCCreatorgt lt/RDFDescriptiongt
lt/RDFRDFgt
55DAML
- DARPA Agent Markup Language
- Based on XML, integration with Ontologies ? The
Semantic Web - DAML 0.5, August 2000
- DAML-ONT, October 2000
- DAMLOIL (Ontology Interface Layer), December
2000
56DAMLOIL
- A semantic markup language for Web resources
- Uses XML and RDF
- Provides a higher level of information than XML
57Define Class
- ltdamlClass rdfID"Animal"gt
- ltrdfslabelgtAnimallt/rdfslabelgt
- ltrdfscommentgt
- This class of animals is illustrative of a
number of ontological idioms. - lt/rdfscommentgt
- lt/damlClassgt
58Define Subclass
- ltdamlClass rdfID"Male"gt
- ltrdfssubClassOf rdfresource"Animal"/gt
- lt/damlClassgt
- ltdamlClass rdfID"Female"gt
- ltrdfssubClassOf rdfresource"Animal"/gt
- ltdamldisjointWith rdfresource"Male"/gt
- lt/damlClassgt
59Defining Property Restriction
- ltdamlClass rdfabout"Animal"gt
- ltrdfscommentgt
- Animals have exactly two parents, ie
- If x is an animal, then it has exactly 2
parents - (but it is NOT the case that anything that
has 2 parents is an animal). - lt/rdfscommentgt
- ltrdfssubClassOfgt
- ltdamlRestriction damlcardinality"2"gt
- ltdamlonProperty rdfresource"hasParent"/gt
- lt/damlRestrictiongt
- lt/rdfssubClassOfgt
- lt/damlClassgt
60Define Properties
- ltdamlObjectProperty rdfID"hasParent"gt
- ltrdfsdomain rdfresource"Animal"/gt
- ltrdfsrange rdfresource"Animal"/gt
- lt/damlObjectPropertygt
- ltdamlObjectProperty rdfID"hasFather"gt
- ltrdfssubPropertyOf rdfresource"hasParent"/gt
- ltrdfsrange rdfresource"Male"/gt
- lt/damlObjectPropertygt
61Ontology of Ontology
- Classes or Concepts
- description of concepts in the domain of
discourse - Subclasses
- Represent concepts that are more specific
- Slots / Role / Properties
- Properties of concept (various features and
attributes) - Facets or role restrictions
- Restriction on slots (value type, allowed value,
cardinality )
Ontology Instances of Classes Knowledge Base
62Ontology Examples
People
Position
Age
Sex
63Ontology Examples (2)
from Noy McGuinness, black for classes, red for
instances, direct links represent slots and
internal links such as instance-of and
subclass-of.
64Fundamental Rules in Ontology Design
- No correct way to model a domain
- There are viable alternatives
- Best solution depends on application and
extensions - Iterative process
- Concepts should be close to (physical or logical)
objects and relationships in the domain of
interest. - Nouns (objects) or verbs (relationships)
65Ontology Development Steps
- Determine the domain and scope of the ontology
- Consider reusing existing ontologies
- Enumerate important terms in the ontology
- Define the classes and the class hierarchy
- Top-down
- Bottom-up
- Combination
66Ontology Development Steps (2)
- 5. Define the properties of classes - slots
- Define the facets of the slots
- Slot cardinality
- Slot-value type (String, Number, Boolean,
Enumerated, Instance-type) - Domain and range of a slot
67Ontology Development Steps (3)
from Noy McGuinness, the definition of a slot
Produces that describes the wines produced by
Winery.
68Ontology Development Steps (4)
Figure from Noy McGuinness - the definition of
an instance of the Beaujolais class
69Things to lookout
- A subclass of a class represents a concept that
is a kind-of the concept that the superclass
represents - Classes represent concepts in the domain and NOT
the words that denote these concepts (prawn
shrimp) - Avoid class cycles
- How many is too many and how few are too few?
70Things to lookout (2)
- When to introduce a new class (or not)?
- Usually it should
- Have additional properties (new slots)
- Have different restrictions (different facets)
- Participate in different relationships than the
super-classes (new slot value defined) - Can just be a hierarchy of terms
71Things to lookout (3)
- A new class or a property value?
- If the concepts with different slot values become
restrictions for different slots in other classes
-gt create new class - An instance or a class?
- Natural hierarchy?
- Most specific concepts?
- Limiting the scope
- Naming convention and consistency
72Languages for Ontologies
- First order logic-based
- KIF-based Ontololingua,
- Loom,
- Frame-Logic
- XML based
- SHOE,
- Ontology Exchange Language (XOL),
- Ontology Markup Language (OML and CKML),
- RDF based
- Resource Description Framework Schema Language
(RDFS) - OIL (Ontology Interchange Language)
- DAMLOIL
- OWL
73OWL Web Ontology Language for the Semantic Web
(W3C)
- XML provides a surface syntax for structured
documents, but imposes no semantic constraints on
the meaning of these documents. - XML Schema is a language for restricting the
structure of XML documents and also extends XML
with datatypes. - RDF is a datamodel for objects ("resources") and
relations between them, provides a simple
semantics for this datamodel, and these
datamodels can be represented in an XML syntax. - RDF Schema is a vocabulary for describing
properties and classes of RDF resources, with a
semantics for generalization-hierarchies of such
properties and classes. - OWL adds more vocabulary for describing
properties and classes among others, relations
between classes (e.g. disjointness), cardinality
(e.g. "exactly one"), equality, richer typing of
properties, characteristics of properties (e.g.
symmetry), and enumerated classes.
74XML DTD XML Schema RDF(S) DAMLOIL RDF(S) 2002 OWL
bounded lists X X X
cardinality constraints X X X X
class expressions X X
data types X X ? X
defined classes X X
enumerations X X X X
equivalence X X
extensibility X X X X
formal semantics X X X
inheritance X X X X
inference X X
local restrictions X X
qualified constraints X
reification X X X X
From http//www.daml.org/language/features.html
Discussion
75Tools for ontology development
- Protégé-2000
- http//protege.stanford.edu/
- Ontolingua
- http//www.ksl.stanford.edu/software/ontolingua/
- DAG-Edit
- http//www.godatabase.org/dev/editor.html
- OilEd
- http//oiled.man.ac.uk/
- Reggie Metadata Editor
- http//metadata.net/dstc/
76Summary on Ontology development
- No one correct way for developing ontologies
- No one correct ontology for any domain
- Issues
- Rapid domain evolution
- Variety of ontologies in a domain
- Ontology representation
- Efforts for ontology interoperability (ontology
mapping) - Stanford Scalable Knowledge Composition (SKC)
project and the Bremer Semantic Translation
project
77References on Ontologies
- Descriptive and Formal Ontology by Raul
Corazzon. http//www.formalontology.it/ - What is an Ontology? by Tom Gruber
- http//www-ksl.stanford.edu/kst/what-is-an-ontolo
gy.html - Ontology Development 101A Guide to Creating
Your First Ontology by Natalya F. Noy and
Deboral L. McGuinness - http//protege.stanford.edu/publications/ontology_
development/ontology101-noy-mcguinness.html
78References (2)
- 4. Knowledge Interchange Format (KIF)
- http//www-ksl.stanford.edu/knowledge-sharing/kif
- 5. Knowledge Interchange Format Specification
- http//logic.stanford.edu/kif/specification.html
- 6. DAML homepage.
- http//www.daml.org/
- 7. An Introduction to the Resource Description
Framework - http//www.dlib.org/dlib/may98/miller/05miller.htm
l