Title: Spring Term 200203 ismailtk'unilinz'ac'at
1Spezielle Kapitel aus TelekooperationIntelligent
Agents
- Ismail Khalil Ibrahim
- Summer Semester 2003
2Course Unit 5
- Intelligent Agents Communication and
Communication Languages ...
3Interaction Communication
- Interactions occur because agents exist and act
in close proximity - shared environment
- shared resources
- Communication occurs when agents send messages to
one another with a view to influence beliefs and
intentions. - Implementation details are irrelevant
- via communication links
- through shared memory
- because of shared conventions
- signalling vs talking
- body language
4Communication
- 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
5Coordination 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
6Communication vs. computation
- Communication is generally more expensive and
less reliable - re-computing 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
7MAS 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
8Levels 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, ...
9Classification of messages
- 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
10Exchanging information
- 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-controll
ee)
11Requesting information or services
- 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)
12Methods of agent communication
- Blackboard
- information available for all
- no direct communication
- simple architecture
- Message
- Direct exchange
- Common language
- Conversation
- Sequence of messages
Agent
Agent
Blackboard
Agent A (Sender)
Agent B (Receiver)
Message
Agent
Agent
Agent
Agent
13Speech act theory Austin (1962), How to Do
Things with Words
- Speech act theory, initially meant for natural
language, views communications as actions. - Considers three aspects of a message
- Locutionary act
- uttering a syntactically acceptable sentence
- how is the message phrased?
- e.g., it is hot here, or turn on the AC
- Illocutionary act
- communicating of the speaker intentions to the
hearer - how is the message meant by the sender or
understood by the receiver - e.g., a request to turn on the AC, or an
assertion about the temperature - Perlocutionary act
- Bringing about of the effect on the hearer of the
utterance - how does the message influence the receivers
behaviour - e.g., turn on the AC, opens the window, nods her
head, ignores the speaker
14Speech act classification Searle (1969),
Speech Acts, Cambridge University Press
- Representative
- Represent some state of affairs
- Asserting, claiming, describing, informing, etc.,
- Commissive
- Commit the speaker to some future course of
action - Promising, agreeing, threading, inviting,
offering, swearing, volunteering, etc., - Directive
- Intention to get the hearer to carry out some
action - Commanding, requesting, daring, asking, begging,
forbidding, advising, etc., - Declaration
- Bring about a state of affair
- Arresting, marrying, naming, etc.,
- Expressive
- Indicate the speakers psychological state of
mental attitude - Greeting, congratulating, thanking, apologizing,
etc.,
15Speech act components
- In general a speech act can be seen to have two
components - a performative verb
- e.g. inquire, inform,
- the propositional content
- e.g. shut the door.
16 examples
- Informing that the door is shut
- performativeinform
- contentShut the door
- speech act The door is shut!
- Inquiring if the door is shut
- performativeinquire
- contentShut the door
- speech act Is the door shut?
17Agent Communication
- Speech acts form messages in an Agent
Communication Language (ACL) - An ACL is a high-level language whose primitives
and structures are expressively tailored to
support the exchange of messages amongst multiple
agents - An ACL exists in a logical layer on top of
existing infrastructures such as TCP/IP, HTTP, or
IIOP. - The two prevalent ACLs
- KQML (Knowledge Query and Manipulation Language)
- FIPA ACL (Foundation of Intelligent Physical
Agents).
18KQML
- Developed by the DARPA knowledge sharing
initiative - based on the idea that communication requires a
common language - requires that common language is divided into
syntax, semantics and pragmatics, using - KIF - syntax of content
- Ontolingua - semantics of content
- speech acts - pragmatics of communication
19KQML Syntax
- KIF (Knowledge Interchange Format)
- is based on first-order logic set theory
- encodes declarative knowledge
- Lisp like syntax, e.g.
- see http//logic.stanford.edu/kif/dpans.html for
more details.
20KQML Semantics
- Ontology a common vocabulary and agreed upon
meanings to describe a subject domain. - Ontolingua is a language for building,
publishing, and sharing ontologies - ontologies can be automatically translated into
other content languages, including KIF, Prolog,
etc. - the main language included primitives for
combining ontologies. - see www.ksl.stanford.edu/software/ontolingua/ for
more details.
21Ontologies
- The philosophical study of the
- nature of being
- Specification of ontological commitments
- Description of concepts
- and relationships used
- to interact
22Ontologies
- Ontologies define classes, functions, object
constants, and axioms to constrain meaning - Allows unambiguous interpretation of logical
sentences
23Example Ontology 1
Vessel
Ship
Boat
Sail boat
Motor boat
Hull
Engine
24Example Ontology 2
25Translation
How do we map objects from one ontology to
another?
26KQML Pragmatics
- The pragmatics define the performative verbs, for
example - ask-if (is it true that)
- perform (please perform the following action)
- tell (it is true that )
- reply (the answer is )
27Performatives
- Basic query evaluate, ask-if, ask-about,
ask-one, ask-all - Multi-response query stream-about, stream-all,
- Response reply, sorry
- Informational tell, achieve, cancel, untell,
unachieve - Generator standby, ready, next, rest, discard,
generator - Capability definition advertise, subscribe,
- monitor, import, export
- Networking register, unregister,
- forward, broadcast
28A KQML Message
- Msg above represents a single KQML speech act
described by a list of attribute/value pairs e.g.
content, language, from, in-reply-to.
29A KQML Dialogue
- Consider agents A and B talking about the
prices of books bk1 and bk2 - A to B (ask-if (gt (price bk1) (price bk2)))
- B to A (reply true)
- B to A (inform ( (price bk1) 25.50))
- B to A (inform ( (price bk2) 19.99))
- For convenience msg format above is simplified
and attribute/value pairs for ontology etc. are
omitted.
30FIPA - ACL
- FIPA (Foundations of Intelligent Physical Agents)
- its purpose is to promote the success of emerging
agent-based applications, services and devices. - its goal is pursued by making available in a
timely manner, internationally agreed
specifications for interoperable agent-based
applications, services and devices. - see http//www.fipa.org/ for more details.
31Agent Management in FIPA
- FIPA provides a reference
- model for agent
- creation
- registration
- location
- communication
- migration and
- retirement.
32FIPA ACL
- Like KQML, FIPA ACL is based on the idea of
Speech Acts - agree
- cancel
- cfp
- confirm
- disconfirm
- failure
- inform
- inform-if
- inform-ref
- not-understood
- propose
- query-if
- query-ref
- refuse
- reject-proposal
- request
- request-when
- request-whenever
- subscribe
33Ontologies in FIPA
Ontology Agents provide ontology services, such
as translation, to FIPA agents
Ontology servers provide shared ontologies to
agents and other systems
34FIPA ACL Example
ACL message
inform
(
Note FIPA uses a different content language
from KQML called SL which is based on modal
logic.
sender
agent1
receiver
hpl-auction-server
content
(price (bid good02) 150)
in-reply-to
round-4
reply-with
bid04
language
sl
ontology
hpl-auction
)
35Example Query-Protocol
- The protocol states that
- IF an agent asks another agent if a proposition
holds or not - THEN the participant must reply with answer
informing the initiator, or may refuse to answer,
or fail to answer, or failing to understand the
question.
36FIPA Interaction Protocols
- Ongoing conversation between agents often fall in
typical patterns - typical patterns of message exchange are called
interaction protocols - FIPA pre-specifies a number of protocols.
- Advantage ease of implementation (an agent can
engage in meaningful interactions simply by
following an interaction protocol).
37Facilitator broker
ask(x)
Agent 1
Agent 2
tell(x)
Agent 2
Agent 1
1. advertise(ask(x))
5. tell(x)
3. ask(x)
2. broker(ask(x))
Facilitator
4. tell(x)
38Facilitator matchmaker
4. ask(x)
Agent 2
Agent 1
5. tell(x)
1. advertise(ask(x))
3. reply(x)
Facilitator
2. recommend(ask(x))
39Facilitator feeder
Agent 2
Agent 1
2. tell(x)
3. tell(x)
Facilitator
1. subscribe(ask(x))
40KQML examples
- (ask-one
- content (PRICE IBM ?price)
- receiver stock-server
- language standard_prolog
- ontology NYSE-TICKS
- )
41KQML examples
- (subscribe
- content (stream-all
- content (PRICE IBM ?price))
- receiver stock-server
- language standard_prolog
- ontology NYSE-TICKS
- )
42KQML Examples
- (monitor
- content (PRICE IBM ?price)
- receiver stock-server
- language standard_prolog
- ontology NYSE-TICKS
- )
43Discussion questions
- What architectures do the different languages
support? - What kinds of communication do you have in your
project? - What language to use for your project (if any)?
- What standards do you think are necessary when
talking about agent communication languages in
the future?
44Corporate Agent System
- Employees have a personal agents which gather
requested files before morning. - Agents aim is to minimise the cost for the user.
- User agents make the decision on how to achieve
goal - Independent. vs Collaborate work.
- Employer wishes to minimise costs
- Users normally request the same files.
- Provides a management agent which negotiates more
efficient solutions.
45Employee Agent System
- Agents are given a list of files to download
before the morning. - The agent first calculates cost of working
individually.
Get these documents for me
User A
46Agents calculate individual costs.
5
4
4
Location and Cost of each file Doc 1
http//www.cs.tcd.ie/ - cost 1 unit. Doc 2
http//www.ianbrown.co.uk/billiejean.wav - cost 1
unit. Doc 3 http//www.deankane.usa/ - cost 2
units. Doc 4 ftp//www.nokia.se/. - cost 2
units.
47Agents subscribe to Manager
- Message passes the files that this agent needs.
- (subscribe
- sender A
- receiver manager
- content need file 1,2,4
- ontology doc-search
- )
- B need file 2,3,4 C need file 3,4
48Subscribe Stage
need file 1,2,4
need file 3,4
Management Agent
need file 2,3,4
49Management Agent System
- Maintains a central black board system.
- Agents submit the files that they need.
- Manager splits work so that no two agents
retrieve the same file. - Costs of this service is 1 unit for the user
agents. - Manager suggests work to each agent.
- The file that the agent is expected to fetch.
- Negotiates a solution with agents.
- They Accept or Reject solution.
50Central Black Board System
If an agent fetches a file and places it in the
central store, he can then access all the other
files for free.
51Unfair manager proposes solution
- Agent A does all the work.
- ( propose
- sender manager
- receiver A
- content get 1,2,3,4 cost 9
- in-reply-to unfair_prop
- )
- B get null, cost 1. C get null, cost 1.
52Unfair Propose Stage
get 1,2,3,4 cost 9
get null, cost 1
Propose
Management Agent
get null, cost 1
53User Agents Utility calculation
- Agents calculate the utility of proposed deal.
- Utility local individual cost - management
agent cost. - Agents try to maximise their utility.
- Agent A case
- Utility 4 9 -5
- REJECT.
get 1,2,3,4 cost 9
54Agents accept / reject proposal
- Agent A not happy
- ( reject-proposal
- sender A
- receiver manager
- content no chance
- in-reply-to unfair_prop
- ontology doc-search
- )
55Unfair Accept / Reject Stage
Utility -5
Reject
Utility 3
Accept
Accept
Management Agent
Utility 4
56Manager proposes new solution
- Manager propose fair allocation to agents
- ( propose
- sender manager
- receiver A
- content get 1,2 cost 3
- in-reply-to fair_prop
- )
- B get 3, cost 3. C get 4, cost 3.
57Fair Propose Stage
get 4, cost 3
get 1,2, cost 3
Propose
Management Agent
get 3, cost 3
58Fair Accept / Reject Stage
Utility 1
Accept
Utility 1
Accept
Accept
Management Agent
Utility 2
59(No Transcript)