request - Rob Kremer - University of Calgary

Multi-Agent System
Communication Paradigms
Abstract: Multi-Agent Systems seem like a good idea -- solve problems by
using several different specialized agents who cooperate to reach a
solution. Aside from obvious problems (such as disagreements,
inconsistencies, and composition), communication is a significant
impediment. Agents may be written by different people in different styles,
with different objectives. Simple communication protocols tend to be
brittle and fail because not all agents my behave identically, and my
respond in unanticipated ways. Attempts to formalize and standardize
communication, such as the one the Foundation for Intelligent Physical
Agents (FIPA) developed using BDI (Belief, Desire, Intension) semantics,
encountered difficulties that made implementation and conformance
difficult. Some of these problems stem from the FIPA standard's
requirement that all agents model the beliefs, desires, and intentions of all
other agents, which makes for a rather unnaturally omniscient society of
agents. One way to address this issue is to neglect the modeling of the
"minds" of other agents, and model only the social commitments agents
undertake (or fulfill) in the course of their conversations. To achieve this,
conversations are modeled as sequences of speech acts, where rules or
policies (which may be considered social norms) translate from the
speech acts to the instantiation or deletion of social commitments among
the participant agents.
2005/07/27
Commitment-based
Conversations
Rob Kremer
University of Calgary
Department of Computer Science
Calgary, CANADA
[email protected]
1
Simple Conversation: naive
What
time is it?
2017-07-31
CPSC 609.68/599.68: Agent
Communications
It’s 2:00
2
Simple Conversation: more complex
What
time is it?
<nod>
Just a sec,
I’ll check
<nod>
It’s 2:00
<nod>
Thanks
<nod>
2017-07-31
CPSC 609.68/599.68: Agent
Communications
3
Simple Conversation: failure
What
time is it?
I don’t know,
my watch
stopped
Go ask
someone
else.
<ignore>
(didn’t
hear)
2017-07-31
CPSC 609.68/599.68: Agent
Communications
4
State Machine Eg: “call for proposals”
A MIP-net (Multi-agent
Interaction Protocol net) –
combining two A-nets
(Agent nets) and one IPnet (Interaction Protocol
net).
Reference:
Sea Ling & Seng Wai Loke. A
Formal Compositional Model of
Multiagent Interaction. AAMAS’03
– International Conference on
Autonomous Agents and MultiAgent System, July 14-18, 2003,
Melbourne, Australia. ACM, 2003.
Also available:
http://delivery.acm.org/10.1145/870
000/860791/p1052ling.pdf?key1=860791&key2=2595
358611&coll=&dl=ACM&CFID=151
51515&CFTOKEN=6184618
Ling & Loke 2003, p.1053
2017-07-31
CPSC 609.68/599.68: Agent
Communications
5
BDI
• Belief
– Environment
• Desire
– Goals
• Intention
– The current desire(s) chosen by the selection function
with the beliefs and desires as input
2017-07-31
CPSC 609.68/599.68: Agent
Communications
6
Motivation
• Agents aren’t objects – therefore they must
communicate in order to influence other agents
(as opposed to invoking methods on other agents)
• We treat such communications just like other
actions, and call it “speech act theory”1,2
1John
Austin. How to Do Things With Words. Oxford University Press:
Oxford, England, 1962
2John Searle, Speech acts: An Essay in the Philosophy of Language.
Cambridge University Press: Cambridge, England, 1969.
2017-07-31
CPSC 609.68/599.68: Agent
Communications
7
Speech Acts
• Performative verbs
– Eg: request, inform, promise
• Aspects:
– Locutionary act: making an utterance
– Illocutionary act: action performed in saying something
– Perlocution: the effect of the act
• Felicit conditions:
– There exist an accepted procedure, and circumstances and
persons must be specified
– Must be executed correctly and completely
– Must be sincere, and must have uptake
2017-07-31
CPSC 609.68/599.68: Agent
Communications
9
Example
Request
• Normal I/O conditions:
– Hearer not deaf
– Not uttered in a play or film
• Preparatory conditions:
–
–
–
–
Speaker must correctly choose the act
Hearer must be able
Speaker must believe the hearer is able
Hearer wouldn’t have done the act anyway
• Sincerity conditions:
– Not sarcasm, etc.
2017-07-31
CPSC 609.68/599.68: Agent
Communications
10
Types of Speech Acts
• Representatives: commits the speaker to the truth of a
proposition
– Eg: Informing
• Directives: attempt to get the hearer to do something
– Eg: Requesting
• Commissives: commit to a course of action
– Eg: Promising
• Expressives: express some psychological state
– Eg: Thanking
• Declarations: effects some change in an institutional
state of affairs
– Eg: Declaring war
2017-07-31
CPSC 609.68/599.68: Agent
Communications
11
Rational Action
• Speech act theory can be considered as a specialization of
a more general theory of rational action1
• Eg: “A request is an attempt on the part of spkr, by doing ,
to bring about a state where, ideally, (i) addr intends 
(relative to the spkr still having that goal, and addr still
being helpfully inclined to spkr), and (ii) addr actually
eventually does , or at least brings about a state where
addr believes it is mutually believed that it wants the ideal
situation” 1,p.241
1P.
R. Cohen and H. J. Levesque. Rational interaction as the basis for communication.
In P. R. Cohen, J. Morgan, and M. E. Polleck (eds), Intentions in Communications, pp 221-56.
The MIT Press: Cambridge, MA, 1990.
2017-07-31
CPSC 609.68/599.68: Agent
Communications
12
FIPA Messages
performative
the type of the communicative act of the message
sender
the sender of the message
receiver
the intended recipients of the message
reply-to
subsequent messages in this conversation thread are to be directed to the agent named
content
the content of the message; equivalently denotes the object of the action
language
the language in which the content parameter is expressed
encoding
the specific encoding of the content field
ontology
the ontology(s) used to give a meaning to the symbols in the content expression
protocol
the interaction protocol that the sending agent is employing with this ACL message
conversation-id
an expression used to identify the sequence of communicative acts that form a
conversation
reply-with
an expression that will be used by the responding agent to identify this message
in-reply-to
an expression that references an earlier action to which this message is a reply
reply-by
a time and/or date expression indicating the latest time the sending agent wants a reply
2017-07-31
CPSC 609.68/599.68: Agent
Communications
See FIPA standard SC00061G
13
FIPA Performatives (informally)
accept-proposal
agree
cancel
call-for-proposal
confirm
disconfirm
failure
Inform
inform-if
inform-ref
not-understood
propagate
propose
proxy
query-if
query-ref
refuse
reject-proposal
request
request-when
request-whenever
subscribe
2017-07-31
accepting a previous proposal
agreeing to perform some action
inform another agent that the agent no longer need perform some action
calling for proposals to perform an action
informs a given proposition is true
informs a given proposition is false
an action was attempted but failed
a given proposition is true
inform whether or not a proposition is true
inform the object which corresponds to a descriptor
did not understand what the receiver just did
pass a message on
submitting a proposal to perform an action
pass on an embedded message
asking whether or not a proposition is true
asking for the object referred to
refusing to perform an action
rejecting a proposal during negotiation
request to perform some action
request to perform some action when some proposition becomes true
request to perform some action each time the proposition becomes true
requesting to notify of the value of a reference whenever the object changes
CPSC 609.68/599.68: Agent
Communications
See FIPA standard SC00037J
14
FIPA Semantics
Semantic
content
Agent
Proposition
<i, inform (j, φ )>
FP: Biφ  ¬ Bi(Bifjφ  Uifjφ)
Feasibility
Precondition
RE: Bjφ
Rational
Effect
2017-07-31
“j believes φ”
Bjφ  Bj¬φ
CPSC 609.68/599.68: Agent
Communications
Ujφ  Uj ¬φ
(where Uj means “j is
uncertain about φ”)
15
FIPA inform semantics
• Formally:
<i, inform (j, φ )>
FP: Biφ  ¬ Bi(Bifjφ  Uifjφ)
RE: Bjφ
• Example:
(inform
:sender (agent-identifier :name i)
:receiver (set (agent-identifier :name j))
:content "weather (today, raining)“
:language Prolog)
2017-07-31
CPSC 609.68/599.68: Agent
Communications
16
FIPA request semantics
• Formally:
<i, request (j, a )>
FP: FP(a) [i\j]  Bi Agent (j, a)  ¬Bi Ij Done (a)
RE: Done (a)
FP(a) [i\j] denotes the part of the FPs of a which are mental attitudes of i.
• Example:
(request
:sender (agent-identifier :name i)
:receiver (set (agent-identifier :name j))
:content "open \"db.txt\" for input“
:language vb)
2017-07-31
CPSC 609.68/599.68: Agent
Communications
17
Plan
Plan
Preconditions: P Predicate
Postconditions: P Predicate
Actions: Seq Action
hd:
tail:
Plan
Plan
2017-07-31
 Action // returns head(Plan.Action)
 Plan // returns {Pre,Post,tail(Actions)}
CPSC 609.68/599.68: Agent
Communications
18
BDI Agent
BDIagent
B: P Bel
D: P Des
I: P Int
getNextPercept: 
brf:
P Bel  Percept
options:
P Bel  P Int
filter:
P Bel  P Des  P Int
plan:
P Bel  P Int
execute:
Plan
2017-07-31
CPSC 609.68/599.68: Agent
Communications
 Percept
 P Bel
 P Des
 P Int
 Plan
19
Basics
• First order model logic with identity
• Three primitive attitudes:
Bip
Uip
Cip
i (implicityly) believes p
i is uncertain about p but thinks that p is
more likely than ¬p
(choice) i desires that p currently holds
• Other attitudes:
PGip
Iip
2017-07-31
i has p as a persistent goal (desire?)
i has the intention to bring about p
CPSC 609.68/599.68: Agent
Communications
20
Actions
a1 ; a2
a1 | a2
sequence in which a2 follows a1.
nondeterministic choice in which either a1
happens or a2 happens, but not both.
Feasible(a,p) a can take place and, if it does, p will be true
just after that. (Feasible(a)  Feasible(a,
True)
Possible(p)  a.Feasible(a,p).
Done(a,p)
a has just taken place and p was true just
before that. (Done(a)  Done(a,True)
Agent(i,a)
i is the only agent that ever performs (in the
past, present or future) the actions a.
Single(a)
a is not a sequence. ¬Single(a1;a2), but
Single(a1|a2) iff Single(a1)/\Single(a2)
2017-07-31
CPSC 609.68/599.68: Agent
Communications
21
Abbreviations
Bifip
 Bip \/ Bi¬p
Brefi lx(x)  y.Bi(lx(x) = y). Agent i believes
that it knows the (x which is) .
Uifip
 Uip \/ Ui¬p
Urefi lx(x)  y.Ui(lx(x) = y).
ABn,i,jp
2017-07-31
 BiBjBi …p. n is the number of B
operators alternating between i and j.
CPSC 609.68/599.68: Agent
Communications
22
Property: intending to achieve a RE
(x . Bi ak=x)
/\ RE(ak)=p
/\ ¬Ci¬Possible(Done(ak))
 (Iip  IiDone(a1| … |an)
// there exists an action
// who’s RE is p
// that i thinks should
be done
// then if i intends p, then
i intents one of the
act
that can achieve it
Where a1, ..., an are all the acts of type ak
“If I intent to break the vase, then I intent to either drop it,
or smash it with a hammer”
2017-07-31
CPSC 609.68/599.68: Agent
Communications
23
Property: satisfiability of intent
= IiDone(a)  BiFeasible(a) \/ IiBiFeasible(a)
If agent i intends a, then it needs to believe a is
feasible or at least have the intent to discover if
a is feasible
“If I intend to build a perpetual motion machine,
then I have to believe it’s possible or to at least
discover if it’s possible.”
2017-07-31
CPSC 609.68/599.68: Agent
Communications
24
Property: intent of act implies intent of RE
= IiDone(a)  IiRE(a)
If agent i intends a, then it also intents the RE of a
“If I intend to drop the vase, then I also intend to
break the vase”
2017-07-31
CPSC 609.68/599.68: Agent
Communications
25
Property: observing an act
= Bi(Done(a) /\ Agent(j,a)  IjRE(a))
If agent i observes j doing a, then i will come to
believe the j intends the RE of a.
“If I see Jane hammering the vase, then I believe
that Jane intends to break the vase”
2017-07-31
CPSC 609.68/599.68: Agent
Communications
26
BDI
Issues
• Sometimes end up with expressions like “I
believe that you believe that I believe that
you believe that…”
• Calls on agents to have a omniscient view of
all the other agents
• FIPA is based on BDI semantics
2017-07-31
CPSC 609.68/599.68: Agent
Communications
27
Social Commitments
Many utterances imply some sort of “conversational” social
commitment
• Eg: a request commits the receiver to reply
Other social commitments are negotiated
• Eg: “wash my car”
Basic Agent body:
• When an agent observes (or sends or receives) a
message, it uses policies (rules) as social norms that
generate (or delete) social commitments
• Agents spend their free time trying to fulfill the social
commitments for which it is a debtor
2017-07-31
CPSC 609.68/599.68: Agent
Communications
28
FIPA Performatives
inform
proxy propagate
request cancel
confirm disconfirm
inform-ref query-if request-when propose
query-ref call-for-participation request-whenever
subscribe
2005/07/27
agree
accept-proposal
failure not-understood reject-proposal refuse
Commitment-based Conversations
29
FIPA Performatives
performative
inform
Added catagories
proxy propagate ack
reply
request cancel
reply-propose-discharge affirmative-reply
confirm disconfirm
inform-ref query-if request-when propose
query-ref call-for-participation request-whenever
subscribe
2005/07/27
agree
accept-proposal negative-reply
failure not-understood reject-proposal refuse
Commitment-based Conversations
30
FIPA Performatives
performative
inform
Added catagories
Arranged in a lattice
proxy propagate ack
reply
request cancel
reply-propose-discharge affirmative-reply
confirm disconfirm
inform-ref query-if request-when propose
query-ref call-for-participation request-whenever
subscribe
2005/07/27
agree
accept-proposal negative-reply
failure not-understood reject-proposal refuse
Commitment-based Conversations
31
FIPA Performatives
performative
inform
proxy propagate ack
Added catagories
Arranged in a lattice
Extended
reply
request cancel
reply-propose-discharge affirmative-reply propose-discharge nack
confirm disconfirm
done
inform-ref query-if request-when propose
query-ref call-for-participation request-whenever
subscribe
2005/07/27
agree notify accept-proposal negative-reply
timeout failure not-understood reject-proposal refuse
Commitment-based Conversations
32
Policies
P-inform
commits the addressee to acknowledge
P-ack
releases informed agents of the commitment to
acknowledge
P-request
commits the proposed agents to reply
P-counteroffer
commits addressees to reply
P-reply
releases proposed agents of the commitment to
reply and releases counteroffered agents of the
commitment to reply
P-agree
an acceptance realizes the shared uptake of
proposed/counteroffered commitments
P-done
releases accepted agents of the commitment
earlier agreed to
2005/07/27
Commitment-based Conversations
33
Policies  Commitment Operators
Performatives
Policies
Performative
P-inform
P-ack
Inform
Ack
P-request
P-reply
Request
Reply
Agree
P-agree
Confirm
P-confirm
2005/07/27
Commitment Operators
Commitment-operator
Operator: add
Commitment: (receiver,sender,ack)
Commitment-operator
Operator: delete
Commitment: (sender,receiver,ack)
Social Commitments
action
communication-act
Commitment-operator
Operator: add
Commitment: (reciever,sender,reply)
ack
Commitment-operator
Operator: delete
Commitment: (receiver,sender,reply)
reply
Commitment-operator
Operator: add
Commitment: (receiver,sender,content)
Commitment-operator
Operator: delete
Commitment: (receiver,sender,content)
Commitment-based Conversations
Unspecified action
34
Example: Informally
Alice
Can you
attend this
meeting?
(nod)
Bob
(performative: request, content: attend(Bob,x))
Sure...
(performative: agree, content: request|attend(Bob,x))
(performative: ack, content: agree|request|attend(Bob,x))
I’m here
(nod)
(performative: propose, content: discharge|attend(Bob,x))
(performative: ack, content: discharge|attend(Bob,x))
Thanks for
coming.
(performative: accept-proposal, content: discharge|attend(Bob,x))
(nod)
(performative: ack, content: accept-proposal|discharge|attend(Bob,x))
2005/07/27
Commitment-based Conversations
35
Example: Perf. Lattice and Commitments
Bob
Alice
ack(Alice,Bob,x)
inform
ack(Bob,Alice,x)
request
ack
reply(Bob,Alice,x)
inform
ack
reply
agree
ack
ack(Alice,Bob,x)
act(Bob,Alice,x)
inform
ack
reply
reply-propose-discharge(Alice,Bob,x)
propose/discharge
propose-discharge(Bob,Alice,x)
ack
ack
inform
ack(Bob,Alice,x)
reply
agree
accept-proposal
ack
2005/07/27
Commitment-based Conversations
36
Example: Implementation Details
Bob
Alice
decide(Bob,Alice,x)`
ack(Bob,Alice,x)
inform
request/*
ack
consider(Alice,Bob,x)
inform
ack(Alice,Bob,x)
reply(Bob,Alice,x)
ack
reply
agree/request|*
ack
evaluate(Alice,Bob,x)
ack(Alice,Bob,x)
reply-propose-discharge(Alice,Bob,x)
inform
act(Bob,Alice,x)
ack
reply
propose/discharge|*
propose-discharge(Bob,Alice,x)
ack
ack
inform
reply
accept(Bob,Alice,x)
ack(Bob,Alice,x)
agree
accept-proposal/propose/discharge|*
ack
2005/07/27
Commitment-based Conversations
37
Conclusions
• Arranging performatives in a lattice simplifies
interpretation
• Messages (performatives) → policies →
commitment operators → shared social
commitments
• Easily observable by 3rd parties
• Agents do not have the be implemented in the
SC style (eg. could be BDI internally)
• Turn taking arrises naturally
2005/07/27
Commitment-based Conversations
38