Presentation is loading. Please wait.

Presentation is loading. Please wait.

Peer-to-peer and agent-based computing Agent communication (Contd)

Similar presentations

Presentation on theme: "Peer-to-peer and agent-based computing Agent communication (Contd)"— Presentation transcript:

1 peer-to-peer and agent-based computing Agent communication (Contd)

2 peer-to-peer and agent-based computing 2 Constructing Conversations Conversations are patterns of message exchange: –Order of messages and their inter-relationships –E.g., you can only say yes/no if you are asked! An engineer could give agents –Information on the semantics of messages in an ACL, and –The planning capability to ensure that effective interaction protocols arise spontaneously, but this is hard (impossible?) to do… Do the things we say always mean the same?

3 peer-to-peer and agent-based computing 3 Contextual Meaning John: Where will you put the garbage for me to take out tomorrow morning? Mary: Behind the back door as usual. John: Where did you put the garbage? Mary: Behind the back door as usual. Are Marys commitments the same?

4 peer-to-peer and agent-based computing 4 Protocol Specification Conversation protocols: –Avoid computational overhead of agents building conversations on-the-fly –Provide contextual meaning of utterances How do we specify conversations? –Generic/expressive (i.e., capture large classes of conversations) –Robust (i.e., allow for exceptions without breaking) Lets look at some proposals: –Finite automata –Agent UML –Dooley graphs –Electronic institutions

5 Sample conversation 1: 1.Receive a number of offers 2.Choose one of them and accept it 3.Reject the others Sample conversation 2: 1.There is an auctioneer w/ something to sell 2.There is at least one buyer 3.The auctioneer broadcasts a price to all buyers 4.A buyer may accept the current price –In this case, the conversation is over! 5.If no-one accepts the current price, then the auctioneer decreases it by 10% –In this case, the conversation carries on from step 3 peer-to-peer and agent-based computing 5 Protocol Specification (Contd)

6 peer-to-peer and agent-based computing 6 Finite Automata A finite automaton (FA) is defined as: –a finite set of input symbols I –a finite set of states, S (a subset of which are final states), –An initial state q 0 S –a next state function next : S × I S FAs specify communication protocols –A state in S denotes the state of the protocol, and –The symbols in I are messages.

7 peer-to-peer and agent-based computing 7 Finite Automata: Example 1 I = {A:ask_if (q),B :tell (q),B :tell ( q)}, –A and B are agent identifications –q is some proposition, that is, a fact about the world (e.g., the fish is fresh). S = {1,2,3,4}, where 3 and 4 are terminal states, q 0 =1 next(1,A:ask_if (q)) = 2 next(2,B :tell (q)) = 3 next(2,B :tell ( q)) = 4 Graphically: 1 2 A:ask_if (q) B :tell (q) 3 4

8 peer-to-peer and agent-based computing 8 Finite Automata: Example 2 12 B:counter(_) B:accept(_) A:propose(_) A:counter(_) B:reject(_) A:accept(_) A:reject(_)

9 peer-to-peer and agent-based computing 9 Finite Automata: Strengths Simple, natural representation of relationships between utterances Input symbols map naturally to speech acts. Easy to detect (non-)conformance –A conversation conforms to the protocol if, and only if, it represents a path through the graph from the initial state to a final state States through which dialogue progresses are clearly identified –Including initial and final states

10 peer-to-peer and agent-based computing 10 Finite Automata: Limitations Structure on input symbols to indicate who is speaking –E.g., B :tell ( q) Difficult to model conversations involving arbitrary numbers of agents –E.g., there should be 3-5 participants. No representation of evolution of conversation Only captures legal messages –No exception handling! Scalability: Realistic conversations can be complex – Spaghetti diagrams

11 peer-to-peer and agent-based computing 11 Agent UML (various contributors) AUML Protocol Diagrams (PDs) –Extension of UML sequence diagrams. –Specify partial order of messages of participants Participants may be –A role (all agents taking on that role) or –A specific individual PDs may represent multiple threads of interaction for each participant

12 peer-to-peer and agent-based computing 12 Threads of Interaction A participant may have various choices in the messages it sends. The behaviour of the recipient depends on the incoming message(s). PDs represent this different behaviour through multiple threads (AND, OR or XOR). query proxy inform

13 peer-to-peer and agent-based computing 13 Agent UML: Example cfp deadline reject-proposal accept-proposal refuse not-understood propose failure inform-done inform-ref Manager Contractor

14 peer-to-peer and agent-based computing 14 Agent UML: Strengths Familiar representation Availability of UML design tools Transitions map cleanly to speech acts Easy to detect (non-)conformance Participants involved clearly identified Captures the inherently multi-threaded nature of agent communication Communication with all agents taking on some role may be represented

15 peer-to-peer and agent-based computing 15 Agent UML: Limitations No existential quantification over agent groups –At least one agent must reply to this message No representation of evolution of conversation Only captures legal messages –No exception handling! Scalability: Realistic conversations can be complex – Spaghetti diagrams Maintenance difficulties

16 peer-to-peer and agent-based computing 16 Dooley Graphs Proposed by R.A. Dooley (1976) H.V.D. Parunak used for agent protocols (1996) A Dooley Graph is: –A set of indexes E denoting acts (speech & non-speech acts), –A set of participants P (the nodes) –A set of triples A (the arcs) connecting the sender (participant p i sending utterance k) and the recipient (participant p j receiving k): A = { p i, p j, k : p i, k S and k, p j R} –A relation M from S R to S R defining the vertices of the graph. These represent the links between arcs (acts)

17 peer-to-peer and agent-based computing 17 Relations Between Acts M captures various forms of relation between acts. –A question is intended to solicit a certain kind of response from the recipient. –An appropriate inform may resolve this question as well as being an appropriate reply Similarly, a commit or a refuse utterance may resolve and reply to a request The performance of the act to which an agent has committed completes that commitment

18 peer-to-peer and agent-based computing 18 Dooley Graphs: Example IActRTREC 1Request: send 10 widgets by Friday 2Commit: price is Refuse11 4Ship12 5Pay44 A B C RT: Replies to RE: Resolves C: Completes I: Index Participants = {A, B, C}

19 peer-to-peer and agent-based computing 19 Dooley Graphs: Strengths Extends advantages of FAs: –Participants involved & states of conversation clearly identified –Captures multiple threads of interaction –Relations between utterances not limited to precedence E.g. an utterance can resolve a commitment made by another –Potential for exception handling

20 peer-to-peer and agent-based computing 20 Dooley Graphs: Limitations No representation of agent groups –No quantification over groups of agents –Specific utterances may be sent to multiple recipients, though Scalability: Realistic conversations can be complex – Spaghetti diagrams Maintenance difficulties

21 peer-to-peer and agent-based computing 21 Electronic Institutions Formalism to specify global protocols –At the lowest level, it uses FAs –Sophisticated protocols are broken down into simpler ones with some coherence –Simplest protocols are called scenes

22 peer-to-peer and agent-based computing 22 Electronic Institutions (Contd) Formalism for specifying MASs (and agents) –Non-deterministic finite-state machine –Labels are illocutions sisi sjsj inform(buyer,seller,ok) inform(buyer,seller,not_ok) inform(buyer,seller,offer(10))

23 peer-to-peer and agent-based computing 23 Electronic Institutions (Contd) Components: – Scenes – where interactions take place – Transitions – connections among scenes – Roles (of a scene) – generic label for agents Sample scene (graphic format): agora room w0w0 w1w1 w2w2 Entry pointExit point Initial state Final state

24 peer-to-peer and agent-based computing 24 Electronic Institutions (Contd) Sample EI (graphic format): t2t2 Agora Room Settlement t3t3 Admission t4t4 t1t1 Departure Root Scene Output Scene Transitions

25 peer-to-peer and agent-based computing 25 Electronic Institutions (Contd) EIs – rich, expressive formalism: –Scenes provide self-contained modules –Transitions prescribe conditions for agents to move among scenes –Roles are generic identifiers for agents

26 peer-to-peer and agent-based computing 26 Electronic Institutions (Contd) A distributed implementation: Tuple Space Information Models Electronic Institution Rules of Behaviour External agent External agent External agent … Institution Manager Governor Scene Manager Transition Manager Governor … Scene Manager Scene Manager … … Transition Manager Transition Manager

27 peer-to-peer and agent-based computing 27 Electronic Institutions (Contd) Demo:

28 peer-to-peer and agent-based computing 28 Resolved Limitations Scalability –Number of participants –Number of possible states Maintenance –Extending and combining existing conversation protocols Flexibility –Movement between conversations

29 peer-to-peer and agent-based computing 29 FIPA Protocols FIPA protocol specifications: –Request Interaction –Query Interaction –Request When Interaction –Contract Net Interaction –Iterated Contract Net Interaction –English Auction Interaction –Dutch Auction Interaction –Brokering Interaction –Recruiting Interaction –Subscribe Interaction –Propose Interaction Available at

30 peer-to-peer and agent-based computing 30 FIPA Protocols (Contd) Request Interaction Protocol (IP) –Two agents: Initiator Participant –Initiator agent requests a Participant agent to perform some action –Participant agent processes request Decides to agree or refuse request If decision is refuse, then refused becomes true & Participant sends refuse Otherwise, agreed becomes true and Participant sends agree

31 peer-to-peer and agent-based computing 31 FIPA Protocols (Contd) The Contract Net (CNET) protocol: –High-level protocol for cooperation through task sharing –Inspired by the way companies put out contracts: 1.Agent starts up the protocol when it recognises it cannot carry out some task. 2.Agent communicates with other agents and advertises a task announcement, then acts as a manager of that task –Broadcast, a limited broadcast or point-to-point messaging 3.Agents listen to the task announcements and evaluate them with respect to their capabilities and resources –When they find a task suited to them, they place a bid –A bid indicates what the agent can do and the associated costs 4.The manager receives all the bids and selects the one(s) it prefers or needs and tells the agents of its decision.

32 peer-to-peer and agent-based computing 32 The Contract Net (CNET) protocol: Communication protocols (Contd) I have a problem… (a) Recognising the problem(b) Task announcement (c) Bidding(d) Awarding the contract

33 peer-to-peer and agent-based computing 33 FIPA Protocols (Contd) Contract Net Interaction Protocol: –Standardised by FIPA –One-to-many protocol –Extended UML

34 peer-to-peer and agent-based computing 34 Suggested Reading Agent Communication Languages: The Current Landscape. Y. Labrou, T. Finin, & Y. Peng. IEEE Intell. Systems, March/April Agent Communication Languages: Rethinking the Principles. M. P. Singh. IEEE Computer. Dec Agent Communication Languages. T. Finin & Y. Labrou. Tutorial ASA/MA

Download ppt "Peer-to-peer and agent-based computing Agent communication (Contd)"

Similar presentations

Ads by Google