Multiagent Systems
Service-Oriented Computing: Semantics, Processes, Agents– Munindar P. Singh and Michael N. Huhns, Wiley, 2005
Chapter 16 2Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Highlights of this Section
Applicability in Service-Based Systems
Multiagent Architecture Agent Types Lifecycle Management Consistency Maintenance Modeling Other Agents Cognitive Concepts
Chapter 16 3Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Attributes of Multiagent Systems
Decentralization: agents are autonomous
Complex constituents (business partners modeled as agents), often best described at the knowledge level
Adaptive behavior Complex interactions Coordination Emergent, aggregate behaviors
Chapter 16 4Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Dimensions of MAS: AgentAdaptivity (the ability of an agent to learn):
Autonomy:
Interactions:
Sociability (awareness):
Fixed Teachable Autodidactic
Controlled Independent
Simple Complex
Interdependent
Autistic CollaborativeCommitting
Chapter 16 5Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Dimensions of MAS: System
Scale (the number of agents):
Interactions:
Coordination (self interest):
Agent Heterogeneity:
Communication Paradigm:
Individual Committee Society
Reactive Planned
Antagonistic AltruisticCollaborative
Competitive Cooperative Benevolent
Identical Unique
Point-to-Point Multi-by-name/role Broadcast
Chapter 16 6Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Basic Problems of MAS
Distribution of control among agents Description, decomposition, and
distribution of tasks among agents Interaction and communication
among agents Representation of goals, problem-
solving states, and other agents Rationality, consistency
maintenance, and reconciliation of conflicts among agents
Chapter 16 7Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Principles of Multiagent Systems System architecture Low-level interoperation Information systems
Description: ontologies Engagement: transactions
Protocols and compliance Frameworks that support the
necessary abstractions
Chapter 16 8Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
(de facto) Standard Agent Types
User AgentsApplication Programs
Directory and BrokerAgents
Execution or DataManager Agents
Ontology Agents
Database ResourceAgents
Internet Data Agents
Structured DataUnstructured Data
Chapter 16 9Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Name Service
A multiagent architecture requires scalable, symbolic name resolution
Alternative naming approaches FIPA LDAP Jini CORBA Naming Service JNDI
Chapter 16 10Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Directory Service Simple yellow-page service Registered agents advertise their services by
providing their name, address, and service description
Agents request recommendations for available services (provided by other registered agents or services)
A simple database-like mechanism that allows agents to
Insert descriptions of the services they offer Query for services offered by other agents.
1..n Directory Service Agents on a LAN Brokerage, recruitment and mediation services
are not provided by Directory Service
Chapter 16 11Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Agent Framework Services (CoABS)
Agent Ausing KQML
or ICL
Agent Busing FIPA
ACL
Agent Cusing KQML
or ICL
GridAdapter Library
Translation
MessageHandling
GridProxy
Translation
MessageHandling
InterprocessCommunication
InterprocessCommunication
InterprocessCommunication
InterprocessCommunication
FIPA Agent Managementand ACL Specifications
Other CoABS ComponentsRETSINA
MatchMaker
Naming Directory Logging
Translating Brokering Visualizing
Chapter 16 12Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Brokerage Service Beyond UDDI
Cooperates with a Directory Service An agent requests the Brokerage Service to
recruit one or more agents who can provide a service
Brokerage Service uses knowledge about the requirements and capabilities of registered agents to
Determine the appropriate agents to which to forward a request for a service
Negotiates with the agents to determine a suitable set of service providers
Potentially learn about the properties of the responses
example: Brokerage agent determines that advertised results from agent X are incomplete and seeks a substitute for X
Chapter 16 13Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
FIPA Agent Management System
Software
AgentAgent
ManagementSystem
DirectoryFacilitator
Message Transport System
Message Transport System
Agent Platform
Agent Platform
Platform Services
Chapter 16 14Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Chapter 16 15Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Agent Management System: 2
Handles the creation, registration, location, communication, migration and retirement of agents. Provides the following services:
White pages, such as agent location, naming and control access services, which are provided by the Agent Management System (AMS). Agent names are represented by a flexible and extensible structure called an agent identifier, which can support social names, transport addresses, name resolution services, amongst other things
Yellow pages, such as service location and registration services, which are provided by the Directory Facilitator (DF)
Agent message transport services
Standard Components of the FIPA Communication Model
Chapter 16 16Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Chapter 16 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Java Agent Development Framework
JADE, the most popular, FIPA-compliant agent framework for multiagent systems: http://jade.tilab.com/ The most established of the publicly
available agent frameworks FIPA-OS and Zeus having died
Chapter 16 18Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Consistency Maintenance across Services
A truth maintenance system (TMS) supports maintaining consistency
performs a form of propositional deduction maintains justifications and explains the
results of its deductions updates beliefs incrementally when data are
added or removed uses its justifications to perform dependency-
directed backtrackingTMSs are important because they deal with atomicity deal with the frame problem lead to efficient search
Chapter 16 19Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Architecture of TMS-Based Agent
The problem solver represents domain knowledge in the form of rules, procedures, etc. and chooses what to focus on next
The TMS keeps track of the current state of the search for a solution. It uses constraint satisfaction to maintain consistency in the inferences made by the problem solver
ProblemSolver
TMS
justifications
beliefs
Chapter 16 20Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Knowledge Base Integrity
Stability: believe everything justified validly; disbelieve everything justified invalidly
Well-Foundedness: beliefs are not circular
Logical consistency: logical contradictions do not exist
Completeness: a system will find a consistent state if it exists, or report failure
Problems arise when knowledge is distributed
Chapter 16 21Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Degrees of Logical Consistency Inconsistency: an agent is individually
inconsistent Local Consistency: all agents are
individually consistent Local-and-Shared Consistency: agents
are locally consistent and agree about any data they might share
Global Consistency: agents are globally consistent (union of KBs is consistent)
The DTMS maintains local-and-shared consistency and well foundedness
Chapter 16 22Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Distributed TMS Each agent has a justification-based TMS Each datum can have status OUT, IN (valid
local justification), or EXTERNAL. A shared datum must be IN to one of the agents that shares it
When a problem solver adds or removes a justification, the DTMS
Unlabels data based on the changed justification
Labels all unlabeled shared data Chooses labels for remaining unlabeled data; if
this fails, it backtracks by unlabeling additional data and iterating
Chapter 16 23Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Cooperative Service: 1
Clientf3: afford(xcorp) INr3: buy(X) :- query(Broker recommend(X)),
afford(X) IN
Brokerf1: afford(xcorp) OUTf2: cash-rich(xcorp) INr2: recommend(X) :- takeover-bid(X) INr1: takeover-bid(X) :- cash-rich(X) IN
? recommend(?X)
Chapter 16 24Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Cooperative Service: 2
Clientf3: afford(xcorp) INr3: buy(X) :- query(Broker recommend(X)),
afford(X) IN
Brokerf1: afford(xcorp) OUTf2: cash-rich(xcorp) INr1: recommend(X) :- takeover-bid(X) INr2: takeover-bid(X) :- cash-rich(X) INf3: recommend(xcorp) IN
Shared with: Client; Justification: (f2 r1 r2)
recommend(XCorp)
Chapter 16 25Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Cooperative Service: 3
Clientf3: afford(xcorp) INr3: buy(X) :- query(Broker recommend(X)),
afford(X) INf4: recommend(xcorp) EXTERNAL
Shared with: Broker; Justification: ( )f5: buy(xcorp) IN
Justification: (f3 f4 r3)
Brokerf1: afford(xcorp) OUTf2: cash-rich(xcorp) INr1: recommend(X) :- takeover-bid(X) INr2: takeover-bid(X) :- cash-rich(X) INf3: recommend(xcorp) IN
Shared with: Client; Justification: (f2 r1 r2)
Chapter 16 26Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Cooperative Service: 4
Clientf3: afford(xcorp) INr3: buy(X) :- query(Broker recommend(X)),
afford(X) INf4: recommend(xcorp) EXTERNAL
Shared with: Broker; Justification: ( )f5: buy(xcorp) IN
Justification: (f3 f4 r3)
Brokerf1: afford(xcorp) OUTf2: cash-rich(xcorp) IN --> OUTr1: recommend(X) :- takeover-bid(X) INr2: takeover-bid(X) :- cash-rich(X) INf3: recommend(xcorp) IN --> OUT
Shared with: Client; Justification: (f2 r1 r2)
relabel recommend(XCorp)
Chapter 16 27Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Cooperative Service: 5
Clientf3: afford(xcorp) INr3: buy(X) :- query(Broker recommend(X)),
afford(X) INf4: recommend(xcorp) OUT
Shared with: Broker; Justification: ( )f5: buy(xcorp) OUT
Justification: (f3 f4 r3)
Brokerf1: afford(xcorp) OUTf2: cash-rich(xcorp) OUTr1: recommend(X) :- takeover-bid(X) INr2: takeover-bid(X) :- cash-rich(X) INf3: recommend(xcorp) OUT
Shared with: Client; Justification: (f2 r1 r2)
Chapter 16 28Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Cognitive Economy Prefer the simpler (more economical) explanation ("but
not too simple" - Einstein)
Essential because agents have limited reasoning capacities
Agents must finitely represent their environment themselves and others themselves and others representing them and others, ad
infinitum Zero-order model: others are similar to oneself
Chapter 16 29Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
“Practical” Economy
In simple terms, cognitive economy has two consequences on how agents act Agents should act predictably Agents should act the way they want
others to act These are examples of
universalizable principles as advocated by Kant, and provide a rational basis for ethical and social behavior
Chapter 16 30Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Challenges
Doing the "right" thing Autonomy Conventions: emergence and
maintenance Coordination Collaboration Communication: semantics and
pragmatics Interaction-oriented programming
Chapter 16 31Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Section Summary
Study multiagent systems because interactions among agents make them interesting
Communication among agents is key, although markets (later chapter) only support implicit communication through prices
Programming environments support agent interactions
Consistency maintenance is a major challenge
Agents must model agents; simple techniques are often adequate; more subtle techniques can require extensive reasoning power
Organizations
Service-Oriented Computing: Semantics, Processes, Agents– Munindar P. Singh and Michael N. Huhns, Wiley, 2005
33Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Highlights of this Section
Contracts Spheres of Commitment Achieving Collaboration via
Conventions Policies Negotiation
34Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Why Organizations?
Serious applications of services require interactions structured in subtle ways
Organizations consist of agents (business partners) providing or using services
Organizations Relate well to human organizations Promote coherence in service interactions Offer a conceptually natural, high-level
basis for understanding and designing service interactions
35Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Organizations
Organizations are naturally nested (not necessarily as trees) All organizations are
agents Some agents are
organizations Organizations help
overcome the limitations of individuals in Reasoning Capabilities Perception Lifetime and persistence
36Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Three Kinds of Organizations
Concrete: organizations consist of agents playing roles Configured, run-time concept
Abstract (templates): organizations consist of roles and relationships among roles Design-time concept
Institutions: part abstract and part concrete Run-time concept, but the membership can
change Example: eBay, where buyers and sellers can
change but eBay itself is a fixed participant
37Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Legal Abstractions
Contracts Directed obligations Hohfeldian concepts Compliance
38Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Contracts
Much of the law is about the creation and manipulation of contracts among legal entities People Corporations Governmental agencies
Key questions: how to create, modify, perform, or monitor contracts
39Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Motivation for Contracts
Provide a basis for service agreements
Crucial in open environments Constrain behavior: limit autonomy to
some extent Emphasize behavior: observable by
others Mostly disregard internal
implementations, thus facilitating heterogeneity
40Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Legal Concepts
Rich in multiagent concepts Inherently about interactions
among autonomous parties Directed obligations
One party being obliged to another party
Multiagent flavor Contrast with traditional deontic
logic Zero-agent: it is obliged that … One-agent: you are obliged to do …
41Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Rights
The rights or claims a party has on another party Not the right (ethical) thing to do
The claims of one party are the duties of another: claim is a correlate of duty
42Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Hohfeldian Concepts: 1
The term “right” is used ambiguously
Sixteen concepts distinguish the main situations: Four main concepts Their correlates Their negations Their negations’ correlates
43Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Hohfeldian Concepts: 2
Claim-duty: as above Privilege-exposure: freedom from
the claims of another agent Power-liability: when an agent can
change the claim-duty relationship of another agent
Immunity-disability: freedom from the power of another agent
44Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Commitments
Commitments are a three-party concept An agent’s commitment to another agent
occurs within a context (usually organizational) Is unidirectional Arises within a well-defined scope or context May be manipulated Enables coordination through the ordering
and occurrence of actions by the agents Commitments are public (unlike beliefs) Commitments provide a basis for
compliance
45Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Manipulating Commitments
Operations on commitments: Create Discharge (satisfy) Cancel Release (eliminate) Delegate (change debtor) Assign (change creditor)
Metacommitments constrain the manipulation of commitments
46Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Commitments for Contracts
A contract is a set of related commitments Provides context to the commitments Applies between specified parties, in a
context (e.g., UCC, real-estate, Internet commerce)
In contrast to commitments, other approaches: Single-agent focused, e.g., deontic logic Don’t handle organizational aspects of
contracts Don’t accommodate manipulation of
contracts
47Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
SoCom: Sphere of Commitment
A computational abstraction based on organizations
An organization that provides the context or scope of commitments Involves roles (abstract) or agents
(concrete) Serves as a witness for the commitment,
i.e., knows that the commitment exists Serves as a place to test for compliance Serves as a locus for policies on
enforcement and compensation
- Munindar Singh and Michael Huhns
SoComs and Structure
SoCom inherit policies from surrounding (contextual) SoCom UCC applies to commercial
interactions Inherited policies can conflict because
of Nonunique nesting When agents play multiple roles
49Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Virtual Enterprises (VE)
A VE offers additional commitments beyond what its members individually offer
Sellers come together with a new proxy agent called VE
Example of VE agent commitments: Notify on change Update orders Guarantee the price Guarantee delivery
date
50Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
A Selling VE (Composition Example)Customer Virtual Enterprise Hose Seller Valve Seller
I would like to buy a valve with inputdia of 43, two matching hoses, andof price up to $50.00
Order placed; 1 valve idia = 43Odia = 43. 2 hoses dia = 43Charge = $14.83 Sell two 43 dia hoses
Order is ready
Order revised; 1 valve idia = 43odia = 21, hose dia = 43, andhose dia = 21. Charge = $14.83
Order processed
valve input dia = 43, output dia 43 discontinuedvalve input dia = 43, output dia 21 recommended
Cancel previous order
Sell one valve with input dia 43, output dia 21
Order is ready
Yes
Two 43 dia hoses in stock?
One valve with input dia 43, output dia 43 in stock?
Yes
One 43 dia & one 21dia hose in stock?
Yes
Sell one 43 dia & one 21dia hose
Order is ready
51Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Teams
Tightly knit organizations Shared goals, i.e., goals that all
team members have Commitments to help team-
members Commitments to adopt additional
roles and offer capabilities on behalf of a disabled member
52Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Teamwork
When a team carries out some complex activity Negotiating what to do Monitoring actions jointly Supporting each other Repairing plans
53Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Negotiation
Negotiation is central to adaptive, cooperative behavior
Negotiation involves a small set of agents
Actions are propose, counterpropose, support, accept, reject, dismiss, retract
Negotiation requires a common language and common framework (an abstraction of the problem and its solution)
54Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Negotiation Mechanism Attributes
Efficiency Stability Simplicity Distribution SymmetryE.g., sharing book purchases, with
cost decided by coin flip
55Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Negotiation among Utility-Based Agents
Problem: How to design the rules of an environment so that agents interact productively and fairly, e.g.,
Vickrey’s Mechanism: lowest bidder wins, but gets paid second lowest bid (this motivates telling the truth?? and is best for the consumer??)
56Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Negotiation
A deal is a joint plan between two agents that would satisfy their goals
The utility of a deal for an agent is the amount he is willing to pay minus the cost to him of the deal
The negotiation set is the set of all deals that have a positive utility for every agent. The possible situations for interaction are
Conflict: the negotiation set is empty Compromise: agents prefer to be alone, but will
agree to a negotiated deal Cooperative: all deals in the negotiation set are
preferred by both agents over achieving their goals alone
57Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Negotiation Mechanism
The agents follow a Unified Negotiation Protocol, which applies to any situation. In this protocol,
The agents negotiate on mixed-joint plans, i.e., plans that bring the world to a new state that is better for both agents
If there is a conflict, they “flip a coin” to decide which agent gets to satisfy his goal
58Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Problem Domain Hierarchy
Worth-Oriented Domains
State-Oriented Domains
Task-Oriented Domains
59Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Task-Oriented Domains: 1
A TOD is a tuple <T, A, c>, where T is the set of tasks, A is the set of agents, and c(X) is a monotonic function for the cost of executing the set of tasks X
Examples Deliveries: c(X) = length of minimal path that
visits X
Postmen: c(X) = length of minimal path plus return
Databases: c(X) = minimal number of needed DB ops
60Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Task-Oriented Domains: 2
A deal is a redistribution of tasks Utility of deal d for agent k is
Uk (d) = c(Tk) - c(dk) The conflict deal, D, is no deal A deal d is individual rational if d>D Deal d dominates d’ if d is better for at least
one agent and not worse for the rest Deal d is Pareto optimal if there is no d’>d The set of all deals that are individual rational
and Pareto optimal is the negotiation set, NS
61Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Monotonic Concession Protocol Each agent proposes a deal If one agent matches or exceeds what
the other demands, the negotiation ends
Else, the agents propose the same or more (concede)
If no agent concedes, the negotiation ends with the conflict dealThis protocol is simple, symmetric, distributed, and guaranteed to end in a finite number of steps in any TOD. What strategy should an agent adopt?
62Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Zeuthen Strategy
Offer deal that is best among all deals in NS Calculate risks of self and opponent
R1=(utility A1 loses by accepting A2’s offer) (utility A1 loses by causing a conflict)
If risk is smaller than opponent, offer minimal sufficient concession (a sufficient concession makes opponent’s risk less than yours); else offer original deal
If both use this strategy, they will agree on deal that maximizes the product of their utilities (Pareto optimal)
The strategy is not stable (when both should concede on last step, but it’s sufficient for only one to concede, then one can benefit by dropping strategy)
63Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Deception-Free Protocols
Zeuthen strategy requires full knowledge of
Tasks Protocol Strategies Commitments
Hidden tasks Phantom tasks Decoy tasks
P.O. A1 (hidden)
A1 A2
64Chapter 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Section Summary
Organizations are a natural metaphor for understanding and designing systems of services
Organizations provide a basis for Legal and contractual concepts such
as commitments Teamwork Understanding and formalizing
negotiation
Communication
Service-Oriented Computing: Semantics, Processes, Agents– Munindar P. Singh and Michael N. Huhns, Wiley, 2005
Chapter 18 66Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Highlights of this Section
Agent Communication Languages Speech Act Theory Semantics Interaction Patterns
Combining ACLs with Web Services Contract Net Protocol Business Protocols
Chapter 18 67Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Interaction and Communication
Interactions occur whenever agents share an environment
Resource contention, e.g., bumping into each other Communications are interactions understood
so as to preserve autonomy of all participants A way to achieve loose coupling: essential for
services Meaning captured through shared conventions
Communications are realized through physical actions that may not preserve autonomy
Through shared memory or messaging middleware, but we use the term message for a unit of communication
Chapter 18 68Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Syntax, Semantics, Pragmatics
Syntax: a common language to represent information and queries, or languages that are intertranslatable
Semantics: meaning based solely on the terms used
Requires a structured vocabulary and a shared framework of knowledge, e.g., an ontology
Pragmatics: meaning based on the context (“here”)
Knowing whom to communicate with and how to find them
Knowing how to initiate and maintain an exchange Knowing the effect of the communication on the
recipient
Chapter 18 69Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
A Classification of Message Classifications
Structure-based (syntactic) Distinguish messages based on grammatical forms in
natural language Meaning-based (semantic)
Distinguish messages based on a notion of intrinsic meaning
E.g., prohibitive is different from directive, despite syntactic similarity
Use-based (pragmatic) Distinguish messages based on their functions in
specific classes of protocols E.g., assertion is different from acknowledgment
Chapter 18 70Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Speech Act TheoryCommunicative act theory (not specific to
speech) Developed for human language
Views communication as action Contrasts with traditional logic, which is about true
or false assertions Considers three aspects of a message:
Locution, or how it is phrased, e.g., "It is hot here" or "Turn on the air conditioner”: strings or XML documents
Illocution, or how it is meant by the sender or understood by the receiver, e.g., a request to turn on the air conditioner or an assertion about the temperature: message type plus proposition
Perlocution, or how it influences the recipient, e.g., turns on the air conditioner, opens the window, ignores the speaker
Illocution is the core aspect
Chapter 18 71Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Speech Act Theory Applied
Classifications of illocutions motivate message types, but are typically designed for natural language
Rely on NL syntax, e.g., conflate directives and prohibitives
In natural language understanding: determining the how locutions map to illocutions (inferring agents’ beliefs and intentions)
For services and agents, determining the Message type is trivial, because it is explicitly
encoded Agents’ beliefs and intentions is impossible, because
the internal details of the agents are not known
Chapter 18 72Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
ACL Semantics
What is the semantics of queries, requests, promises?
Mentalist: meaning based on participants’ knowledge bases
An agent promises something if it intended to make that promise
Usually accompanied by assumption of sincerity Public: semantics depends on laws, protocols,
and observable behavior An agent promises something if it says so in the
appropriate circumstances
Evaluation: For open systems, public semantics is more appropriate, because being able to determine compliance is essential
Chapter 18 73Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
FIPA
FIPA is the Foundation for Intelligent Physical Agents, with website at www.fipa.org
Moved into IEEE Specifies standards for heterogeneous,
interoperating agent-based systems Concerned with agency as it relates to
Autonomous behavior Communication with other agents
Chapter 18 74Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
FIPA Standards
Ways of interpreting communications between agents in a way that respects their intended meanings
Communicative acts Public ontologies Transport and infrastructure
Superseded by Web services and messaging standards
Programming model and container Compatible with containers in application servers
Compared to existing approaches XML Schema standardizes grammar, not
meaning OWL standardizes ontology description, not
communication
Chapter 18 75Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Low-Level Patterns
Requester
Requester
Requester
Provider
Provider
Provider
Synchronous: a blocking query waits for an expected reply
Provider maintains state; replies sent individually when requested
Asynchronous: a nonblocking subscribe; replies sent as available
Query
Reply
Next
Handle
Query
Reply
Next
Reply
Subscribe
Reply
Reply
Reply
Chapter 18 76Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Combining Agents with Traditional Web Services
WebService Agent
Gateway
Web ServiceClient
SOAPRequest
SOAPResponse
Agent
ACLRequest
ACLInform
ACL is the FIPA ACL standard
Chapter 18 77Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Contract Net Protocol: 1
An important generic protocol
Manager announces tasks via a (possibly selective) multicast
Agents evaluate the announcement; some submit bids
Manager awards a contract to the most appropriate bidder
Manager and contractor communicate privately as necessary
Chapter 18 78Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Contract Net: 2
The Contract Net Applies best when problem has a
well-defined hierarchy of tasks With coarse-grained decomposition No interference among each other
Lacks support for specifying service agreements and contracts
Yields robustness: failure can be treated as autonomy
Chapter 18 79Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
RFQ: Task Announcement
Eligibility specification: criteria that an agent must meet to be eligible to submit a bid
Task abstraction: a brief description of the task to be executed
Bid specification: a description of the expected format of the bid
Expiration time: a statement of the time interval during which the task announcement is valid
Chapter 18 80Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Bid and Award Messages
A bid specified the provider’s capabilities
An award consists of a task specification A complete specification of the task
Chapter 18 81Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Commitment Protocols
Protocols enable open systems to be constructed
Interaction protocols expressed in terms of Participants’ commitments Actions for performing operations on
commitments (to create and manipulate them)
Constraints on the above, e.g., captured in temporal logic
Examples: escrow, payment, RosettaNet (107 mostly request-response Partner Interface Processes or PIPs)
Chapter 18 82Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
NetBill Payment Protocol Checking compliance is
easy but the representation is rigid
Some obvious variations are not allowed by the FSM:
The merchant may start the protocol by sending a quote
The customer may send an accept prior to offer
The merchant may send the goods prior to accept
FSM Representation
C: rfq
M: offer
C: accept
C: pay
M: receipt
M: goods
Chapter 18 83Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
NetBill Enhanced by CMs
Meanings:
1. true
2. request
3. offer
4. Cmgoods accept promiseReceipt
5. goods Ccpay promiseReceipt
6. goods pay Cmreceipt
7. goods pay receipt
8. goods promiseReceipt
9. accept
Final state: No open commitments remain
C: rfq
M: offer
C: accept
C: pay
M: receipt
M: goods
M: offer
M: goods
C: pay
C: accept
M: g
oods
Chapter 18 84Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Message Patterns for Commitment Operations
Ensure that information about commitment operations flows to the right parties, to enable local decisions
x y z
create(x,c)
delegate(x,z,c)
delegate(x,z,c)
discharge(x,c)
x y z
create(x,c)
assign(x,y,z)
discharge(x,c)
assign(x,y,z)
Chapter 18 85Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Complying with Commitment Protocols
Compliance means commitments are taken care of (discharged directly or indirectly)
How can an application check if the agents comply with specified protocols?
Commitment protocols are specified in terms of
Main roles and sphere of commitment Roles essential for coordination Domain-specific propositions and
actions
Chapter 18 86Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Verifying Compliance
Specification Models based on potential causality Commitments based on branching-
time TL Run-time Verification
Respects design autonomy Uses TL model-checking Local verification based on observed
messages: each party checks if the others are behaving appropriately
Chapter 18 87Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Run-Time Compliance Checking
An agent can keep track of Its pending commitments Commitments made by others that are not
satisfied It uses this local model to see if a
commitment has been violated All commitments must eventually be
discharged or replaced by commitments that are …
An agent who benefits from a commitment can always determine if it was violated
Chapter 18 88Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Fish-Market Sample Execution
Auctioneer A Bidder B1
m1 “50”: [1,0,0]
m3 “No”: [1,2,0]
m5 “40”: [5,2,2]
m8 “No”: [6,2,4]
Bidder B2
m2 “50”: [2,0,0]
[0,0,0] [0,0,0] [0,0,0]
[2,0,1]
[4,2,2]
[3,2,0]
[5,3,2]
m6 “40”: [6,2,2] [6,2,3]
m7 “Yes”: [5,4,2][7,4,2]
fishmoney
[1,1,0]
[8,4,4]
m4 “No”: [2,0,2]
Based on a vector clock
Chapter 18 89Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Fish-Market Local Observations
Auctioneer A
[1,0,0]
[2,0,0]
[3,2,0]
[4,2,2]
start
s(m1)
s(m2)
s(m4)
r(m3)
r(m4)
[2,0,2]
[5,2,2]
[6,2,2]
[7,4,2]
end
s(m5)
s(m6)
r(m7)
Bidder B1
start
s(m1)
[1,0,0]
r(m1)
s(m3)
r(m5)
s(m7)
end
[1,1,0]
[1,2,0]
[5,2,2]
[5,3,2]
[5,4,2]
s(m5)
The discharge of a commitment mustbe reachable from its create
Chapter 18 90Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Fish-Market Compliance
Auctioneer can verify if the bidders comply
An individual bidder cannot verify if the auctioneer complies
If bidders pool their observations, then they can verify if the auctioneer complies
Asymmetry indicates need for third party
Chapter 18 91Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Section Summary Communication is a key form of
interaction Communications are actions – thus
outside the purview of traditional logic Protocols capture important patterns of
communications Business protocols can be understood
using commitments Modeling captures their meaningful content,
not just message tokens Commitments provide a basis for checking
compliance
Top Related