250 likes | 382 Views
Agent Communications. CPSC 601.68/CPSC 599.68 Rob Kremer Department of Computer Science University of Calgary. What is an Agent?. Autonomous Knowledge-based Reflective or Reactive Social. What is an Agent?. An agent Ag is a tuple Ag = (Sit,Act,Dat,f Ag ) where
E N D
Agent Communications CPSC 601.68/CPSC 599.68 Rob Kremer Department of Computer Science University of Calgary
What is an Agent? • Autonomous • Knowledge-based • Reflective or Reactive • Social CPSC 609.68/599.68: Agent Communications
What is an Agent? An agent Ag is a tuple Ag = (Sit,Act,Dat,fAg) where • Sit is a set of situations Ag can be in • Act is a set of actions Ag can perform • Dat, Ag’s internal data, is the set of possible values Ag’s internal data areas can have • fAg: Sit Dat Act is the agents decision function From outside, Ag seems to be a “function” gAg:SitAct There are lots of other models of agency; this one is usefully general CPSC 609.68/599.68: Agent Communications
Agents = Object? • Both have internal data and receive messages • But the object has no “choice” but to execute the method; the agent can decide if and what method to execute. I might execute method B, or I might do nothing, or I might execute method C or …. object message B agent sensor method A message B method B method A method C method B method C CPSC 609.68/599.68: Agent Communications
Communicating Agents • Traditional (low level) “Protocols” (eg: TCP/IP) are a bit simple… • They mostly deal with “here’s a message” • Agents need a richer conversation space • Request/Reply, Offer/Reply, Subscribe/Inform • Agents need to handle exceptional cases, complex interactions, and novel new interactions CPSC 609.68/599.68: Agent Communications
Simple Conversation: naive What time is it? It’s 2:00 CPSC 609.68/599.68: Agent Communications
<nod> <nod> <nod> <nod> Simple Conversation: more complex What time is it? Just a sec, I’ll check It’s 2:00 Thanks CPSC 609.68/599.68: Agent Communications
Go ask someone else. <ignore>(didn’t hear) Simple Conversation: failure What time is it? I don’t know, my watch stopped CPSC 609.68/599.68: Agent Communications
What do we need? • Message format (syntax) • Message semantics • Interpretation of sequences of messages (conversations) • Message sequencing and turn-taking • Conversation semantics CPSC 609.68/599.68: Agent Communications
Message Syntax Envelope/content • Envelope can be read by all agents in the society • Content is usually understood only by specialized agents CPSC 609.68/599.68: Agent Communications
Message Syntax CPSC 609.68/599.68: Agent Communications
Message Syntax: KQML-style ( request :act inviteToJoinCD :to casa://123.181.6.101/Bob :from casa://123.181.6.101/Alice :reply-withcasa://123.181.6.101/Alice$$1453 :language casa.URL :language-version 1.0 :content casa://123.181.6.101/CDagent2 ) CPSC 609.68/599.68: Agent Communications
Message Syntax: xml-style <?xml version=\"1.0\"?> <!DOCTYPE message SYSTEM \"xmlmessage.dtd\"> <CASAmessage> <performative> request </performative> <act> inviteToJoinCD </act> <to> casa://123.181.6.101/Bob </to> <from> casa://123.181.6.101/Alice </from> <reply-with> casa://123.181.6.101/Alice$$1453 </reply-with> <language> casa.URL </language> <language-version> 1.0 </language-version> <content> casa://123.181.6.101/CDagent2 </content> </CASAmessage> </xml> CPSC 609.68/599.68: Agent Communications
Message Semantics • Typically based on speech-act theory • Performative is the main speech act • FIPA implementation uses the performative and a BDI semantics CPSC 609.68/599.68: Agent Communications
Message Semantics: FIPA Performatives CPSC 609.68/599.68: Agent Communications
Message Semantics: FIPA request <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. CPSC 609.68/599.68: Agent Communications
Message Semantics: Social Commitments/CASA CPSC 609.68/599.68: Agent Communications
Conversation Paradigms • Ad-hoc protocols • BDI (Belief, Desire, Intentions) • Social Commitments CPSC 609.68/599.68: Agent Communications
Ad-hoc Protocols “Scripts” that the agent follows Issues: • Rigid and Brittle. • Hard to account for all eventualities CPSC 609.68/599.68: Agent Communications
Ad-hoc Protocols: Petri Nets CPSC 609.68/599.68: Agent Communications
BDI • Belief • Environment • Desire • Goals • Intention • The current desire(s) chosen by the selection function with the beliefs and desires as input CPSC 609.68/599.68: Agent Communications
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 CPSC 609.68/599.68: Agent Communications
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 CPSC 609.68/599.68: Agent Communications
inform ack(Bob,Alice,x) request reply(Bob,Alice,x) ack inform ack ack(Alice,Bob,x) reply agree act(Bob,Alice,x) ack ack(Alice,Bob,x) inform ack reply reply-propose-discharge(Alice,Bob,x) propose-discharge propose-discharge(Bob,Alice,x) done ack ack(Bob,Alice,x) ack inform reply reply-propose-discharge confirm ack Social Commitments Bob Alice CPSC 609.68/599.68: Agent Communications
Social Commitments Issues • Deals with complexity • Agents make decisions based only on observable conversational moves (and the Environment and their internal state) • Turn taking follows naturally CPSC 609.68/599.68: Agent Communications