Post on 20-Dec-2015
Agent Technology for e-Commerce
Chapter 3: Multi-agent Systems
Maria Fasli
http://cswww.essex.ac.uk/staff/mfasli/ATe-Commerce.htm
2Chapter 3
Agent Technology for e-Commerce
MASs definition
Definition: A multi-agent system (MAS) consists of a network of loosely-coupled computational autonomous agents who can perform actions, they have resources at their disposal and they possess knowledge, capabilities or skills. They are situated in a common environment and they can interact through a set of rules, namely an interaction protocol.
It is rare for an agent to act in isolation and it is even more rare for an agent to be useful on its own
3Chapter 3
Agent Technology for e-Commerce
Single agent-based systems differ from multi-agent systems: Environment: agents need to take into account others who may
interfere with their plans and goals. They need to coordinate with others in order to avoid conflicts.
Knowledge/expertise/skills: these are distributed Design: agents need not be homogeneous and may be designed
and implemented using different methodologies and languages Interaction: agents interact following rules of interaction
(interaction protocols)
4Chapter 3
Agent Technology for e-Commerce
Coherence
Coherence, i.e. how well the system behaves as a unit, is important in MASs
Coherence can be measured in different ways depending on the problem domain and system
Usually measured from an external observer’s perspective who ascertains whether or not a system appears to be behaving in a coherent way – not necessarily something that the agents themselves are aware of
5Chapter 3
Agent Technology for e-Commerce
MASs applications
They are particularly suitable for: Building systems to solve complex problems that cannot be
solved by any one agent on its own Dealing with problems that involve many problem-solving
methods, require different types of expertise and knowledge or where there are multiple viewpoints
Creating systems where dynamic reorganization is required Tasks in which the information resources are distributed
6Chapter 3
Agent Technology for e-Commerce
MASs advantages
The use of MASs technology offers a number of advantages: Extensibility and flexibility Robustness and reliability Computational efficiency and speed Development and maintainability Reusability Reduced costs
7Chapter 3
Agent Technology for e-Commerce
MAS challenges
A number of issues with regards to their design and implementation: Efficient and effective interaction protocols Task and problem formulation, decomposition, task allocation to
individual agents and subtask synthesis Agent identification, search and location in open systems Coherent and stable system behaviour while avoiding harmful
interactions Representation of information about the state of the environment,
as well as other agents, their actions and knowledge Team and organization formation Efficient planning and learning algorithms
8Chapter 3
Agent Technology for e-Commerce
Closed MASs
Static design with pre-defined components and functionalities The properties of the system are known in advance:
common language each agent can be developed as an expert agents are cooperative multiple developers can work towards the development of the
system at the same time Example: a MAS in an organization
9Chapter 3
Agent Technology for e-Commerce
Advantages Distributed load and expertise Simplicity and predictability, since
components are known interaction language and protocols are known agents usually are cooperative agents share architecture and software
Disadvantages Maintenance costs can be high May be less fault tolerant Difficult to inter-operate with other systems
10Chapter 3
Agent Technology for e-Commerce
Open MASs
The system has no prior static design, only single agents within Agents are not necessarily aware of others – a mechanism for
identifying, searching and locating others is required Agents may be non-cooperative, malicious or not trustworthy Example: open electronic marketplaces
11Chapter 3
Agent Technology for e-Commerce
Advantages Single agent or groups are designed separately (modular) Flexible and fault tolerant Evolutionary design Easier to maintain Dynamic, open society
Disadvantages Overall behaviour of the system not predictable Protocols, languages, ontologies may vary across agents Malicious behaviour difficult to avoid
12Chapter 3
Agent Technology for e-Commerce
Interaction
Interactions develop as a result of a series of actions whose consequences influence the future behavior of agents
May be direct or indirect, intended, or unintended Interaction assumes:
Agents that are capable of acting and/or communicating Situations that promote interaction Dynamic elements allowing for local and temporary
relationships among agents
Definition: An interaction occurs when two or more agents are brought into a dynamic relationship through a set of reciprocal actions (Ferber 1999)
13Chapter 3
Agent Technology for e-Commerce
Elements of interactions
Goals: The agents’ objectives and goals are important. Goals of different agents can be conflicting
Resources: agents require resources to achieve their objectives. Resources are not infinite, other agents may want to use them as well. Conflicts may arise
Expertise/skills/capabilities. Agents may lack the necessary skills, expertise of capabilities for accomplishing one or more of their tasks. They may require the ‘help’ of others.
14Chapter 3
Agent Technology for e-Commerce
Agent characterization
Self-interested/antagonistic agents: have incompatible goals with others and they are interested in maximizing their own utility, not necessarily that of the society as a whole
Cooperative/nonantagonistic agents: have usually compatible goals; they act to maximize their own utility in conjunction with that of the entire system
15Chapter 3
Agent Technology for e-Commerce
Modes of interaction
16Chapter 3
Agent Technology for e-Commerce
Interaction protocols
Interaction protocols govern the exchange of a series of messages among agents
Communication protocols provide rules that structure message-passing and produce meaningful dialogues or conversations
Cooperation protocols provide a framework within which agents can coordinate their actions to achieve a complex task or solve a difficult problem in a cooperative way
Negotiation protocols are used in situations where agents have incompatible goals to enable the parties involved to reach a compromise and resolve conflict
17Chapter 3
Agent Technology for e-Commerce
Agent communication
Why is communication important? Communication is required in MASs where agents have to
cooperate, negotiate etc., with other agents Agents need to communicate in order to understand and be
understood by others Diversity introduces heterogeneity
Can we use natural language as an Agent Communication Language (ACL)? No, natural language is ambiguous
18Chapter 3
Agent Technology for e-Commerce
Aspects of communication
Communication has three aspects Syntax: how the symbols of communication are structured Semantics: what the symbols denote Pragmatics: how the symbols are interpreted
Meaning: A combination of semantics and pragmatics
An agent can have an active or passive role or even both An agent can function as a master, a slave or a peer respectively
19Chapter 3
Agent Technology for e-Commerce
Speech Act Theory
Introduced by Austin (1962) and extended by Searle (1969) Communication exchange is a form of action: a speech act An utterance has three aspects
Locution: the physical utterance with context and reference Illocution: the act of conveying intentions Perlocution: the action that occurs as a result of the illocution
Identifying the intent or illocutionary force of an utterance is important
20Chapter 3
Agent Technology for e-Commerce
Illocutionary Force Categories
Assertive: statements of fact Commissive: commitments Directive: commands in a master-slave structure Declarative: statements of fact Expressive: expressions of emotion
21Chapter 3
Agent Technology for e-Commerce
Communication protocols
An agent communication language is defined at three levels: Lower level: specifies method of interconnection Middle level: specifies format/syntax Top level: specifies meaning/semantics
Communication protocols need to separate: semantics of the protocol which must be domain-independent semantics of the enclosed message which may be domain-
dependent
22Chapter 3
Agent Technology for e-Commerce
ACL components
An agent communication language consists of three components: An ‘outer’ language (pragmatics): the language used to express
the primitives, i.e. the performatives An ‘inner’ language (syntax): the logical or representation
language which is used to write the message itself Vocabulary (semantics): describes the domain of discourse in
terms of concepts and their relationships and prescribes meaning to the terms used
23Chapter 3
Agent Technology for e-Commerce
Knowledge and Query Manipulation Language
KQML is a high level, message-oriented, communication language and protocol for information exchange
An outer language There is a separation of protocol semantics from content
semantics All the information required to understand the message is
included in the message KQML is independent of:
the transport mechanism (tcp/ip, corba etc.) the content language (KIF, SQL etc.) the ontology assumed by the content
24Chapter 3
Agent Technology for e-Commerce
KQML message structure
Message structure
(KQML-performative :sender <word> :receiver <word> :in-reply-to <word> :language <word> :ontology <word> :content <expression>
…)
Example
(tell :sender Agent435 :receiver Agent450 :in-reply-to id-msg-005 :language KIF :ontology cycbase :content (salary 9876543 32765))
• Reserved keywords for performatives and parameters• The performatives are organized into several categories
25Chapter 3
Agent Technology for e-Commerce
KQML semantics
Semantics to KQML performatives is given in terms of preconditions, postconditions and completion conditions
Semantics is described in a language which includes operators for expressing an agent’s attitudes: beliefs (BEL), knowledge (KNOW), desires (WANT) and intentions (INT)
26Chapter 3
Agent Technology for e-Commerce
If A and B are the sender and the receiver respectively Pre(A) and Pre(B) identify the necessary states for sending and
receiving and processing a performative respectively Post(A) and Post(B) determine the states of the agents after the
successful utterance of the performative and its receipt Completion describes the final state after the conversation has
taken place and the original intention for uttering the performative has been accomplished
27Chapter 3
Agent Technology for e-Commerce
Semantics of tell
tell(A,B,X)
Pre(A): BEL(A,X)KNOW(A,WANT(B,KNOW(B,S)))
Pre(B): INT(B,KNOW(B,S))
where S may be any of BEL(B,X) or BEL(B,X)
Post(A): KNOW(A,KNOW(B,BEL(A,X)))
Post(B): KNOW(B,BEL(A,X))
Completion: KNOW(B,BEL(A,X))
28Chapter 3
Agent Technology for e-Commerce
Criticisms of KQML
KQML has been criticized on a number of fronts: Some of its performatives (achieve, broker, stream-all) are not
really speech acts Lack of commissive performatives No security model
29Chapter 3
Agent Technology for e-Commerce
FIPA ACL
FIPA ACL was part of FIPA’s standardization efforts for interaction protocols
Based on speech acts, messages are communicative acts It upkeeps the distinction between outer and inner languages and
is independent of the inner language A number of communication exchange protocols based on the
FIPA ACL communicative acts have been defined
30Chapter 3
Agent Technology for e-Commerce
Features of FIPA ACL
All communicative acts can be defined compositionally in terms of two core ones: inform and request
The syntax of performatives is similar to that of KQML
(inform :sender Agent435 :receiver Agent450 :language Prolog :ontology companyx :content “salary(9876543,32765)”)
31Chapter 3
Agent Technology for e-Commerce
FIPA ACL semantics
The agents’ states are defined via SL (Semantic Language) Semantics is based on mental attitudes such as belief, desires and
intentions etc. The meaning of primitives is given in terms of Feasibility
Conditions (FPs) and Rational Effects (REs)
32Chapter 3
Agent Technology for e-Commerce
FP(a) describes the necessary conditions that need to hold true in order for the sender to send communicative act a
RE(a) represents the effect that an agent can expect to occur as a result of performing the act (the purpose of the message) – the RE of a communicative act cannot be guaranteed as the receiver of the message is autonomous and may not conform
<i,inform(j,)> FP: Bi()Bi(Bifj()Uifj()) RE: Bj()
33Chapter 3
Agent Technology for e-Commerce
Criticisms of FIPA ACL
Lack of security mechanism (though a proposal had been submitted)
No facilitation primitives
34Chapter 3
Agent Technology for e-Commerce
Comparing KQML and FIPA ACL
Syntactically similar and both ascribe to the same theory Semantics differ:
different ways to describe the primitives, i.e. pre, post, completion conditions for KQML, Feasibility Conditions and Rational Effects for FIPA ACL
different language to describe the propositional mental attitudes, e.g. KQML’s BEL operator is not the same as FIPA ACL’s B operator
Different treatment of the ‘administration’ primitives
35Chapter 3
Agent Technology for e-Commerce
Content Languages
Agents need to be able to represent and reason about: models of other agents, their beliefs, knowledge, perceptions tasks, task structure, planning, goals
A common language for representing these things is needed (content language)
Examples of content languages: SQL, Prolog, KIF
36Chapter 3
Agent Technology for e-Commerce
Knowledge Interchange Format (KIF)
KIF is a content language based on first order logic Highly expressive and can be used to represent knowledge in
declarative form in knowledge bases Human readable
37Chapter 3
Agent Technology for e-Commerce
KIF syntax and semantics
KIF is a prefix version of first order predicate calculus Standard logical operators as well as quantification
(exists ((?x bird) (?y tree)) (on ?x ?y) One can define objects, relations between objects and rules
(defrelation mother(?x ?y):= (and (female ?x) (parent ?x ?y))) Knowledge about knowledge can be expressed via the (‘) and (,)
operators
(interested agent435 ‘(distance ,?x ,?y ,?z))
Model-theoretic semantics
38Chapter 3
Agent Technology for e-Commerce
Issues
KIF is probably the most widely used content language for knowledge bases
Highly expressive, but: complicates the building of fully conforming systems resulting systems tend to be heavyweight
Its logic-oriented format may not be acceptable to a wider community
39Chapter 3
Agent Technology for e-Commerce
Dialogues
A series of messages being exchanged comprise a dialogue or conversation
40Chapter 3
Agent Technology for e-Commerce
A layered model of communication
To enable effective agent communication among agent platforms a layered approach is required
Network Infrastructure
Transport and Signalling (TCP, UDP)
Message Transport Protocol (IIOP, HTTP, RMI)
Message Envelope (FIPA message envelope)
Agent Communication Language (FIPA ACL, KQML)
Content Language (KIF, Prolog, SQL)
Dialogue (Auctions, ContractNet, SNP)
41Chapter 3
Agent Technology for e-Commerce
Ontologies: The problem
Different agent developers diversity/heterogeneity of agents Agents may refer to the same concept under different terms
Client: anyone who buys products Customer: anyone who buys products
Agents may refer to different concepts under the same term Client: a computer in the client-server architecture Client: anyone who buys products
42Chapter 3
Agent Technology for e-Commerce
A shared representation is essential for successful communication and interaction between perhaps heterogeneous agents to take place
An ontology is a specification of the objects, concepts, and relationships in an area of interest
An ontology represents a domain from a particular perspective
43Chapter 3
Agent Technology for e-Commerce
Ontologies are useful: They define a common vocabulary for those who need to share
information They enable the reuse of domain knowledge They allow us to encode assumptions about a domain explicitly –
these can then easily be changed by simply changing the ontology
They allow us to separate domain from operational knowledge They can be used by people, software agents, databases and other
computer systems
44Chapter 3
Agent Technology for e-Commerce
Explicit ontologies
Domain knowledge can be encoded implicitly in procedures or explicitly in declarative statements
An explicit ontology is a formal description usually in a logical language of the concepts in a domain of discourse, their properties and relations
Focus is on classes which describe concepts
45Chapter 3
Agent Technology for e-Commerce
Three aspects Conceptualization: describes the underlying model of the domain
in terms of classes, objects, attributes and relations Vocabulary: assigns symbols or terms to refer to the classes,
objects, attributes and relations Axiomatization: encodes rules and constraints capturing
significant aspects of the domain model
46Chapter 3
Agent Technology for e-Commerce
Developing ontologies
Ontology development is done in a number of steps:
1. Determine the domain and the scope of the ontology as well as the purpose for using it
2. Organize the ontology and design the overall conceptual structure of the domain (pivotal in ontology design and development) Top-down approach: starts with general concepts and
proceeds with specialization Bottom-up approach: starts with defining specific classes
and proceeds with generalization Mixed
47Chapter 3
Agent Technology for e-Commerce
3. Check the ontology for syntactic, logical and semantic inconsistencies
4. Publish and deploy the ontology
5. Ontologies need to be maintained, updated and perhaps linked with other ontologies
48Chapter 3
Agent Technology for e-Commerce
Ontology Web Language
Used to describe the terminology of documents on the web OWL builds on the Resource Definition Framework (RDF) and
proposes a specific vocabulary that provides selected frame and description logic primitives to capture ontologies
49Chapter 3
Agent Technology for e-Commerce
Three sublanguages with increasing expressiveness: OWL Lite: mainly intended for class hierarchies and limited
constraints. Lowest complexity OWL DL (includes OWL Lite): intended when completeness and
decidability are important OWL Full (includes OWL DL): maximum expressivity, but no
computational guarantees
50Chapter 3
Agent Technology for e-Commerce
OWL example
An ontology describes classes and relations between classes Example
51Chapter 3
Agent Technology for e-Commerce
Cooperative problem-solving
Key questions: How to determine shared goals and common tasks How to decompose tasks, match subtasks to available agents and
synthesize the partial results How to reconcile different views and avoid unnecessary conflicts What should be the structure of the system: fixed, self-repairing
or self-organizing How to facilitate convergence on solutions despite incomplete or
inconsistent knowledge or data
The design of systems of agents that successfully cooperate to solve a difficult and large problem or perform a complex task
52Chapter 3
Agent Technology for e-Commerce
MAS for cooperative problem-solving
Complex Task
Task Decomposition
Sub-sub-sub tasks performed
53Chapter 3
Agent Technology for e-Commerce
Task decomposition
Can be programmed by the designer during implementation or by the agents using hierarchical planning
Can be done spatially based on the layout of information resources or decision points
Can be done functionally according to the expertise available to the agents
Given a complex task, how can this be divided into smaller subtasks?
54Chapter 3
Agent Technology for e-Commerce
Task distribution
Criteria for task distribution Avoid overloading critical resources Assign tasks to agents with appropriate capabilities Make an agent with a wide view assign tasks to other agents Assign overlapping responsibilities to agents to achieve
coherence Assign closely-related tasks to agents in spatial or semantic
proximity Reassign tasks if necessary for completing urgent tasks
Once a complex task has been decomposed the subtasks need to be distributed
55Chapter 3
Agent Technology for e-Commerce
Task distribution mechanisms
Market Mechanisms: tasks are matched to agents by generalised agreement
Multi-agent planning: planning agents have the responsibility for task assignment
Organizational structure: agents have fixed responsibilities for particular tasks
ContractNet
56Chapter 3
Agent Technology for e-Commerce
The ContractNet protocol
Developed by Reid Smith, it is an interaction protocol for co-operative problem-solving among agents
Modelled on the contracting mechanism used by businesses to govern the exchange of goods and services
Provides a solution to the connection problem: finding an appropriate agent to work on a given task
57Chapter 3
Agent Technology for e-Commerce
Manageragent
Contractoragent
Task announcementTask evaluation
Bid message
Task performed
Reports
Bid evaluation
Award message
Report assimilation
Termination message
Contract established
58Chapter 3
Agent Technology for e-Commerce
In the original ContractNet implementation each node (agent) comprised of
communication processor task processor contract processor local database
A common internode language with a very simple grammar and a partly domain-independent vocabulary was used for communication
59Chapter 3
Agent Technology for e-Commerce
Advantages of the ContractNet
Simple to implement, and constitutes the basis for other protocols Fully distributed Graceful performance degradation
Applications suitable for the ContractNet protocol are those that feature:
A hierarchy of tasks or levels of data abstraction Relatively large subtasks which justify considerable effort
being put into agent selection Examples: manufacturing control and scheduling
60Chapter 3
Agent Technology for e-Commerce
Limitations of the ContractNet
A manager may not receive any bids because: all potential contractors are busy with other tasks a potential contractor is idle but may rank the proposed task
below other tasks under consideration no contractors, even if idle, are capable of working on the task
(the manager may request immediate responses from contractors with messages such as eligible but busy, ineligible, or uninterested)
Managers are under no obligation to inform potential contractors that a contract has already been awarded
61Chapter 3
Agent Technology for e-Commerce
An agent may bid on a task for which it is marginally suited and preclude itself from bidding on a much more suitable task announced soon afterwards
Agents have knowledge only of contracts which they are part of. So an agent cannot decide its bids in the light of other existing bids and contracts
Agents do not know how busy other agents are. This is especially important for managers
Agents must know how to decompose tasks/problems and synthesize solutions out of sub-solutions
62Chapter 3
Agent Technology for e-Commerce
Virtual organizations as MASs
Organizations need to be agile and innovative to be able to withstand competition and respond to the changing needs of the customer force
Virtual organization (VO), virtual enterprise (VE) or agile enterprise: comprises a number of partners that forge a consortium dynamically. Reasons:
Meet customer demand Offer new or improved services or added value Exploit a niche in the market
VOs can be naturally seen as MASs Since agents are autonomous, integration and coordination are
fundamental issues
63Chapter 3
Agent Technology for e-Commerce
Lifecycle of a virtual organization
Creation One or more agents become aware of the need for a VO Potential partners are contacted and invited to join Agent selection is important as it determines future success
Operation Tasks are distributed to partners who also need to coordinate
their actions
64Chapter 3
Agent Technology for e-Commerce
Maintenance Essential in a dynamic environment as conditions change Partners may leave and have to be replaced Changes in the structure and objectives may be necessary Self-organization
Disbanding
Marks the end of the VO When the VO has served its purpose, or is no longer
profitable, the services provided are no longer needed or competitive
65Chapter 3
Agent Technology for e-Commerce
Infrastructure requirements for MASs
To facilitate the creation, operation and interaction of multiple agents an underlying infrastructure is needed
A MAS infrastructure consists of the services, conventions and knowledge and facilitate agent interactions
The MAS infrastructure views agents as black boxes – nothing is known about their internal workings
It is the responsibility of the agent developer to ensure that the agent has appropriate components that allow it to function and interact with other agents and use the services provided by the infrastructure
66Chapter 3
Agent Technology for e-Commerce
The set of services that are considered essential for the enactment and support of open MASs
Operating Environment
Communication Infrastructure
ACL Infrastructure
Performance and Management Services
Security and Trust Management Services
Agent Description and Discovery Services
Interoperation Services
MAS Infrastructure