AOSE
description
Transcript of AOSE
![Page 1: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/1.jpg)
AOSEAdvanced Software Engineering
University College Dublin
December 2007
Dr Rem Collier
![Page 2: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/2.jpg)
Coordination
”The process by which an agent reasons about its local actions and the (anticipated) actions of others to try and ensure that the community acts in a coherent manner.”
Nick Jennings,1996
![Page 3: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/3.jpg)
Why Coordinate?
• Preventing anarchy or chaos
• Dependencies between agents’ actions.
• Need to meet global constraints
• No individual has sufficient competence, resources or information to solve the entire problem.
• Efficiency
![Page 4: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/4.jpg)
How to Coordinate?
• There are two basic ways of achieving this:
• Task sharing: – When a problem is
decomposed intosubproblems andallocated to differentagents.
• Result sharing: – When agents share
information relevantto their subproblems.
Task 1
Task 1.2 Task 1.3Task 1.1
A1 A2 A3
![Page 5: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/5.jpg)
Coordination Example
• Consider an interaction between two robots, A and B, operating in a warehouse.
• Each robot has been designed a different manufacturer.
• They both have the capability to stack and unstack boxes that contain goods that have been stored in the building.
• Because both robots work concurrently, they need to coordinate their actions to share the work load and to avoid knocking into each other and dropping the boxes.
![Page 6: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/6.jpg)
Coordination Example
• Task Sharing:– Our warehouse agents agree a distribution of work and then go
about that work.• Robot A works on the east side of the building.• Robot B works on the west side.
• Result Sharing:– Agents keep each other informed of their current activities and
decide what to do independently.• Robot A decides to move box number A10456.• Robot A tells Robot B.• Using this additional information, Robot B independently decides to
move another box A20987.
![Page 7: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/7.jpg)
Task Sharing
• The agent decomposes the task into a set of sub-tasks that are assigned dynamically to the agents at run-time.
• Key Steps:– Problem decomposition for distribution– Synthesis of sub-problem results to obtain the solution– Optimisation of the problem-solving activities of the agents– Techniques for the coordination of the agents’ activities
• Example Technique: Contract Net Protocol
![Page 8: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/8.jpg)
Task Sharing Process
1.Problem
decomposition
2.Subproblem
solution
3.Answer synthesis
Ref: Smith & Davis, 1980
![Page 9: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/9.jpg)
The Contract Net ProtocolI have a problem!
(a) Recognising the problem
managerPotentialcontrators
announcement
(b) Task Announcement
manager
bids
(c) Bidding
manager
Award task Potentialcontrator
(d) Award Contract
![Page 10: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/10.jpg)
The Contract Net Protocol
![Page 11: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/11.jpg)
Result Sharing
• Problem solving proceeds by agents cooperatively exchanging information as the solution is developed.– The set of tasks are pre-assigned at design time
• Results may be shared:– proactively - one agent sends another agent some information
because it believes that the other will be interested in it.– reactively – an agent sends information to another in response
to a request.
A1 A2 A3
![Page 12: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/12.jpg)
Question
• Traffic Management:– I have a community of agents that are monitoring the level of traffic on a
road network.– Individual agents are responsible for pre-defined area of the road
network.– When an agent detects a build up of traffic in its area, it contacts a pre-
assigned traffic management agent.
• Mobile Computing:– A personal agent (located on a users PDA) requests a map centred
around the users coordinates that shows nearby hotels.– The map request is sent to a pre-assigned map-broker agent who then
contacts an appropriate “map agent” to get the basic map and an appropriate “restaurant agent” to get a list of nearby restaurants and their coordinates.
• Are these examples of coordination? If so, what type?
![Page 13: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/13.jpg)
Coordination Techniques
![Page 14: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/14.jpg)
Coordination Techniques
• Organisational Structures
• Meta-level Information Exchange– e.g. Partial Global Planning (PGP), (Durfee)
• Multi-agent Planning
• Norms and social laws
• Coordination Models based on human teamwork:– Joint commitments (Jennings)– Mutual Modelling
![Page 15: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/15.jpg)
Organizational Structures
• A pattern of information and control relationships between individuals.
• Responsible for shaping the types of interactions among the agents.
• Aids coordination by specifying which actions an agent will undertake.
• Organisational structures may be:– Functional – Spatial
![Page 16: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/16.jpg)
Organizational Structure Models
• A pattern for decision-making and communication among a set of agents who perform tasks in order to achieve goals.
• Example: Automobile industry– Has a set of goals: To produce different lines of cars
– Has a set of agents to perform the tasks: designers, engineers, salesmen
Reference: Malone 1987
![Page 17: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/17.jpg)
Product Hierarchy
Designer
Product Manager I
SalesmanEngineer Designer
Product Manager 2
SalesmanEngineer
![Page 18: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/18.jpg)
Functional Hierarchy
Product Manager (several products)
Designers
DesignManager
Salesmen
SalesManager
Engineers
EngineeringManager
![Page 19: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/19.jpg)
Centralised Market
Product Manager 2
Designers
DesignManager
Salesmen
SalesManager
Engineers
EngineeringManager
Product Manager 1 Product Manager 3
FunctionalManagers
![Page 20: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/20.jpg)
Decentralised Market
Product Manager 2
Designers SalesmenEngineers
Product Manager 1 Product Manager 3
![Page 21: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/21.jpg)
Comparison of Organization Structures
21
Productioncost
Coordinationcost
Vulnerabilitycost
Product hierarchy
H L H-
Funtional hierarchy
L M- H+
Centralisedmarket
L M+ H-
Decentralisedmarket
L H L
![Page 22: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/22.jpg)
Organizational Structures - Critique
• Useful when there are master/slave relationships in the MAS.
• Control over the slaves actions – mitigates against benefits of DAI such as reliability, concurrency.
• Presumes that at least one agent has global overview – an unrealistic assumption in MAS.
• Focused on closed systems.
22
![Page 23: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/23.jpg)
From Structures to Patterns
• (Dignum & Dignum, 2001) introduce the idea of an organisational pattern as a mechanism for defining organisational structures.– Identify key roles & responsibilities– Shift from closed systems to open systems
• They introduce 3 basic patterns:– Hierarchy– Market– Network
• Expand the notion of an organisational structures to
![Page 24: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/24.jpg)
The Hierarchy Pattern
• Goal: Coordinate the flow of resources or information by controlling and directing it via some (management) central point.– Each agent controls a statically defines sub-hierarchy (possibly
empty).– Agents at lower levels in the hierarchy are dependent on agents at
higher levels in the hierarchy.– Interactions are determined at design time, and are hardcoded into
the system implementation.– Manager agents are responsible for controling, coordinating, and
optimising sub-system activities.
• Well suited to closed systems, this pattern has been used in information agents and management of communication networks.
![Page 25: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/25.jpg)
The Hierarchy Pattern
• Key Infrastructure Agent Roles:– Controller.
• Monitor and orient the overall performance of the (sub-) system.
– Interface Agents.• Responsible for communication between the system and the
‘outside world’.
![Page 26: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/26.jpg)
The Market Pattern
• Goal: Facilitate exchange between self-interested agents.– Agents are heterogenous and represent a diverse set of
services and/or competencies.– Agents compete to perform tasks leading to their satisfaction of
their own objectives.– Interaction occurs through communication and negotiation.– Negotiation rules are normally fixed (e.g. a particular auction
protocol must be used).– Payoff is immediate.
• Well suited to open-systems, this pattern has been used to model e-commerce scenarios and virtual enterprises.
![Page 27: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/27.jpg)
The Market Pattern
• Key Infrastructure Agent Roles:– Identification.
• registration of society members.
– Matchmaker.• keeps track of needs and services of agents in system.• mediates in matching of demand and supply of goods or services.
– Banking.• define ways to exchange goods and determine profit and fairness of
exchanges.
![Page 28: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/28.jpg)
The Network Pattern
• Goal: Facilitate collaboration between self-interested agents that have a mutual goal.– Agents are willing to trade freedom in exchange for guarantees
regarding security and trustworthiness.– Services may be traded for “soft rewards” such as increase in
prestige.– Relationships are dependent on clear communication patterns
and social norms.– Coordination is achieves through mutual interest, possibly via
trusted third parties.– Coordination is governed by well-defined rules and sanctions.
• Well suited to open systems in which security and trust are essential.
![Page 29: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/29.jpg)
The Network Pattern
• Key Infrastructure Agent Roles:– Matchmaker
• keeps track of needs and services of agents in system.• Mediates in matching of demand and supply of goods or services.
– Gatekeeper• responsible for accepting and introducing new agents to the market.• informs new agents of the possibilities and capabilities of the market.
– Notary• registers collaboration contracts between agents.
– Monitoring Agents• Trusted third parties that keep track of the execution of collaboration
contracts.
![Page 30: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/30.jpg)
Coordination Techniques
• Organisational Structures
• Meta-level Information Exchange– e.g. Partial Global Planning (PGP), (Durfee)
• Multi-agent Planning
• Norms and social laws
• Coordination Models based on human teamwork:– Joint commitments (Jennings)– Mutual Modelling
![Page 31: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/31.jpg)
Meta-level Information Exchange
• Exchange control level information about current priorities and focus.
• Control level information– May change– Influence the decisions of agents
• Does not specify which goals an agent will or will not consider.
• Imprecise
• Medium term – can only commit to goals for a limited amount of time.
![Page 32: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/32.jpg)
Partial Global Planning (PGP) 1
• A DAI testbed – Distributed Vehicle Monitoring Testbed (DVMT) – used to successfully track a number of vehicles that pass within the range of a set of distributed sensors (agents).
• Each agent monitors a dedicated area
• There could be overlapping areas
• Information is shared througha blackboard Overlapping
area
Agenti
Agentj
Vehicletrack
![Page 33: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/33.jpg)
Partial Global Planning (PGP) 2
• Main principle: cooperating agents exchange information in order to reach common conclusions about the problem solving process.
• Why is planning partial?– The system does not generate a plan for the entire problem.
• Why is planning global?– Agents form non-local plans by exchanging local plans and
cooperating to achieve a non-local view of problem solving.
![Page 34: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/34.jpg)
Partial Global Planning (PGP) 3
• Starts with the premise that tasks are inherently decomposed.
• Assumes that an agent with a task to plan for might be unaware as to what tasks other agents might be planning for and how those tasks are related to its own.
• No individual agent might be aware of the global tasks or states.
• Purpose of coordination is to develop sufficient awareness.
![Page 35: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/35.jpg)
Partial Global Planning (PGP) 4
• PGP involves 3 iterated stages:1. Each agent decides what its own goals are and generates
short-term plans in order to achieve them.
2. Agents exchange information to determine where plans and goals interact.
3. Agents alter local plans in order to better coordinate their own activities.
![Page 36: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/36.jpg)
Partial Global Planning (PGP) 5
• Partial Global Plan: a cooperatively generated data structure containing the actions and interactions of a group of agents.
• Contains:– Objective: the larger goal of the system.
– Activity map: what agents are actually doing and the results generated by the activities.
– Solution construction graph: a representation of how the agents ought to interact in order to successfully generate a solution.
![Page 37: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/37.jpg)
Coordination Techniques
• Organisational Structures
• Meta-level Information Exchange– e.g. Partial Global Planning (PGP), (Durfee)
• Multi-agent Planning
• Norms and social laws
• Coordination Models based on human teamwork:– Joint commitments (Jennings)– Mutual Modelling
![Page 38: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/38.jpg)
Multi-agent Planning 1
• Agents generate, exchange and synchronise explicit plans of actions to coordinate their joint activity.
• They arrange apriori precisely which tasks each agent will take on.
• Plans specify a sequence of actions for each agent.
• It is a trade-off between specificity and reactive.
![Page 39: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/39.jpg)
Multi-agent Planning 2
• Two basic approaches:
• Centralised: plans of individual agents analysed by a central coordinator to identify interactions.
• Distributed: a group of agents cooperate to form a:– Centralised plan
– Distributed plan
![Page 40: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/40.jpg)
Multi-agent Planning 3
• Distributed Planning for centralised plans:
• Example: Air traffic control domain (Cammarata)– Aim: Enable each aircraft to maintain a flight plan that will
maintain a safe distance with all aircrafts in its vicinity.
– Each aircraft sends a central coordinator information about its intended actions. The coordinator builds a plan which specifies all of the agents’ actions including the ones that they should take to avoid collision.
![Page 41: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/41.jpg)
Multi-agent Planning 5
• Critique: – Agents share and process a huge amount of information.– Requires more computing and communication resources.
• Difference between multi-agent planning and PGP:– PGP does not require agents to reach mutual agreements
before they start acting.
• Sometimes Plans can also become obsolete very quickly.– i.e. Short life-span.
![Page 42: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/42.jpg)
AOSE
Negotiation
![Page 43: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/43.jpg)
Negotiation
• ”The process of several agents searching for an agreement”e.g. about price.
• Reaching consensus
”Rules of Encouter” by Rosenchein and Zlotskin, 1994
![Page 44: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/44.jpg)
Auctions
• An Auction takes place between an auctioneer and a collection of bidders.
• Goal is for the auctioneer to allocate the goods to one of the bidders.
• In most settings, the auctioneer desires to maximise the price; bidders desire to minimise the price.
auctioneer
bidders
auctioneer
bidder
Price
![Page 45: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/45.jpg)
Auction Parameters
Value of goods Private,
public/common,
Correlated
Winner determination First price,
second price
Bids may be Open cry,
Sealed
Bidding may be One shot,
ascending,
descending
![Page 46: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/46.jpg)
English Auctions
• English auctions are:– First price– Open cry– Ascending
• Dominant strategy: successively bid a small amount more than the highest current bid until it reaches the valuation, then withdraw.
• Susceptible to Winners curse– Winner is the one who overvalues the goods on offer and may
end up paying more than its worth.
auctioneerBidder 1
Price
Bidder x
![Page 47: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/47.jpg)
English Auctions
![Page 48: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/48.jpg)
Dutch Auctions
• Dutch auctions are:– Open cry– Descending
• Auctioneer starts at an artificially high price.– Then continually lowers the offer price until an agent makes a
bid which is equal to the current offer price.
• Dominant strategy: None
• Susceptible to Winners curse
auctioneer
Bidder
Price
auctioneer
![Page 49: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/49.jpg)
Dutch Auctions
![Page 50: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/50.jpg)
First-price Sealed-bid Auctions
• One shot auction
• Single round, where bidders submit a sealed-bid for the good.
• Good is awarded to agent that made the highest bid.
• Winner pays price of highest bid.
• Best strategy: bid less than true value.
auctioneer
Bidders
![Page 51: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/51.jpg)
Vickrey Auctions
• Vickrey auctions are:– second-price– sealed-bids
• Goods are awarded to agent that made the highest bid.
• Winner pays price of second highest bid.
• Best strategy: bid the true value.
• Susceptible to anti-social behaviour
![Page 52: AOSE](https://reader035.fdocuments.in/reader035/viewer/2022070414/56814dfd550346895dbb68e2/html5/thumbnails/52.jpg)
Summary
• Agent Communication Languages make coordination and negotiation possible.
• Coordination is about managing the interdependencies between the activities of the agents.
• Negotiation is about reaching a consensus between agents.