agent coordination - kth

101
ID2209 Distributed Artificial Intelligence and Intelligent Agents Agent Coordination Mihhail Matskin: www.ict.kth.se/courses/ID2209 Autumn 2015

Upload: others

Post on 22-Apr-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Agent Coordination - KTH

ID2209 Distributed Artificial Intelligence and Intelligent Agents

Agent Coordination

Mihhail Matskin: www.ict.kth.se/courses/ID2209

Autumn 2015

Page 2: Agent Coordination - KTH

Agent Coordination •  general models

–  why? –  how? –  effective control of distributed search

•  common coordination techniques –  organizational structures –  meta-level information exchange –  multi-agent planning –  explicit analysis and synchronization –  coordination based on human teamwork –  commitments and conventions

Page 3: Agent Coordination - KTH

References - Curriculum

•  Wooldridge: ”Introduction to MAS”,

–  Chapter 8

Page 4: Agent Coordination - KTH

Coordination Example

Consider an interaction between two robots, A and B,

operating in a warehouse. The robots have been designed

by different companies, and they are stacking and

unstacking boxes to remove certain goods that have been

stored in the building. They need to coordinate their

actions to share the work load and to avoid knocking

into each other and dropping the boxes.

Page 5: Agent Coordination - KTH

Another Coordination Problem

•  Managing the

interdependencies between the

activities of agents. e.g.

–  You and I both want to leave the

room. We independently walk

towards the door, which can only

fit one of us. I graciously permit

you to leave first.

Cartoon taken from Klein, AAMAS2002.

Page 6: Agent Coordination - KTH

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.”

Jennings,1996

Page 7: Agent Coordination - KTH

Coordination

•  Preventing anarchy or chaos •  Meeting global constraints •  Distributed expertise, resources or information •  Dependencies between agents’ actions •  Efficiency

Page 8: Agent Coordination - KTH

Coordination To ensure: •  coverage •  connectivity •  rationality •  capability

Activities: •  supplying timely information to needy agents •  ensuring synchronization •  avoiding redundant problem solving

Page 9: Agent Coordination - KTH

How to reach coherent behavior? •  complete knowledge •  centralized control •  distributed control

Fundamental coordination processes

•  mutual adjustment •  direct supervision •  standardization

Page 10: Agent Coordination - KTH

Basic steps in coordination problem

•  analysis of a perspective for coordination –  external observation may be not enough

•  coordinated but incoherent •  coherent but non-coordinated

–  examining an internal goals and motivations is necessary

•  applying appropriate coordination model

Page 11: Agent Coordination - KTH

Control decisions and search View to coordination as a matter of effective control of

distributed search. What is a control? •  control decisions are decisions about what actions to take next •  control decisions are choices •  control knowledge is any knowledge that informs control

decisions •  each control choice is the outcome of an overall control regime

which includes knowledge about: –  what are the control alternatives? –  what are the decision criteria? –  what is the decision procedure?

Page 12: Agent Coordination - KTH

Control in cooperative distributed problem solving

Control choice becomes more complicated to the

degree that control decisions are more

•  numerous •  asynchronous •  decentralized

Page 13: Agent Coordination - KTH

DAI and distributed search •  the space of alternative problem states (goals) can be seen as a

large search space investigated by a number of agents •  each agent has to make local control decisions •  these local control decisions have impacts on the overall

efforts done by the collection of problem solvers

Search space

1

2 3a 3b

goal

Page 14: Agent Coordination - KTH

Control uncertainty Control decision uncertainty - ambiguity in the next

action choice (often is characterized as the size of the set of next-states)

A

B C

Page 15: Agent Coordination - KTH

Two kinds of control in DAI

•  network control or cooperative control - comprises decision procedures that lead to good overall performance

•  local control - refers to decision procedures that lead to good local decisions, and that are based on local information only

Page 16: Agent Coordination - KTH

Network control Sets contexts for agent's individual control decisions based on

network level information

Network-level information is: •  aggregated from more than one agent or abstracted from data

from more than one agent •  information that concerns the relationships among a collection

of agents

Network-level information can be utilized to influence: •  set of action alternatives to consider a control decisions •  the decision criteria applied to choose one of them •  the control decision procedure

Page 17: Agent Coordination - KTH

Network control One type of network control (or coordination) is

allocation of search-space regions to agents •  search space - alternative problem states (goals) •  search process explores that space by generating a tree of

possibilities •  since a search process explores a tree of possibilities (and any

tree is recursively composed of subtrees) it follows that any region of the search space can be characterized by a set of subtree roots

•  allocation of search-space regions to agents takes place by allocating collections of search-subtree roots to agents

•  dynamic nature of region allocation

Page 18: Agent Coordination - KTH

Local control

Concerns the status and process of a single node in its own local environment and its own local search-space region

Interaction with network control: •  network may increase or decrease local control

uncertainty •  better local control may more efficiently

uncover information that can focus network control decision.

Page 19: Agent Coordination - KTH

Reducing uncertainty Reducing degree and/or reducing impact of uncertainty

–  Impact - arbitrariness of control decisions –  Impact of control uncertainty can be reduced by reducing

common dependencies that agents share

Two kinds of dependencies: –  logical dependencies –  resource dependencies

A very important part of coordination is analysis of interdependencies

Page 20: Agent Coordination - KTH

Search tree (example) G0

G1 G2

G3 G4 G5 G7

G8 G9 G10 G11

agent1 agent2

G9 ∨ G10

G1 & G2

and

or

resources r1 r2

Page 21: Agent Coordination - KTH

Joint goals •  team members are mutually responsible to one another •  the team members have a joint commitment to the joint

activity •  the team members are committed to be mutually supportive of

one another

G1 G2

G3 G4 G5

G6 G7

agent1 agent2

Page 22: Agent Coordination - KTH

Activities in coordination

•  defining the goal graph •  assigning regions of search space •  controlling decisions about which areas of the graph

to explore •  traversing the goal structure satisfying dependencies •  ensuring report of the successful traversal

Determining the approach for each of the phases is a matter of system design and it depends upon:

•  the nature of the domain •  the type of agents included into community •  the desired solution characteristics

Page 23: Agent Coordination - KTH

Coordination Techniques

•  Organisational Structures

•  Meta-level Information Exchange

–  e.g. Partial Global Planning (PGP), (Durfee)

•  Multi-agent Planning

•  Explicit Analysis and Syncronization

•  Norms and social laws

•  Coordination Models based on human teamwork:

–  Joint commitments (Jennings)

–  Mutual Modelling

Page 24: Agent Coordination - KTH

Comparing Common Coordination Techniques

Organisation structures

Meta-level Information exchange

Multi-agent Planning

low low less

high high more

P r e d i c t a b i l i t y

R e a c t i v t y

I n f o E x c h a n g e

Explicit analysis and synchronization

Page 25: Agent Coordination - KTH

Organizational structures •  the simplest coordination approach •  implicit coordination •  provides framework for defining

–  roles –  communication paths –  authority relationships

•  pre-defined, long-term relations •  specifies the distribution of specializations among

agents •  a precise way of dividing the problem space without

specifying particular problems •  agents are associated with problem types and problem

instances circulate to the agents which are responsible for instances of that type

Page 26: Agent Coordination - KTH

Organizational Structures

•  Organisational structures may be:

– Functional

– Spatial

– Product-Oriented

Page 27: Agent Coordination - KTH

Organizational Structure Models

•  A pattern for decision-making and communication among

a set of agents who perform tasks in order to achieve goals.

e.g.

–  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 •  Costs considered

–  production costs –  coordination costs –  vulnerability costs

Reference: Malone 1987

Page 28: Agent Coordination - KTH

Alternative Coordination Structures 1 Product Hierarchy

Designer

Product Manager I

Salesman Engineer Designer

Product Manager 2

Salesman Engineer Designer

Product Manager 3

Salesman Engineer

Page 29: Agent Coordination - KTH

Product hierarchy

•  several divisions for different product lines •  each division has a product manager •  each division has its own separate departments (agents) for

different functions •  product manager assigns tasks to agents in its department •  communication links in product structure •  fails inside department do not affect other products •  one message to assign task and one message to notify result •  also model for set of separate companies

Page 30: Agent Coordination - KTH

Product Manager (several products)

Alternative Coordination Structures 2 Functional Hierarchy

Designers

Design Manager

Salesmen

Sales Manager

Engineers

Engineering Manager

Page 31: Agent Coordination - KTH

Functional hierarchy

•  a number of agents of similar types are pooled into functional departments

•  each department has a functional manager •  reduce duplication of efforts •  executive office - production manager for all products

hierarchical task allocation •  2 messages to assign task and 2 messages to notify about

results •  failure of task agent - delay and task reallocation •  managers are critical

Page 32: Agent Coordination - KTH

Markets

•  not necessary to make all components by itself

•  subcontracting

Page 33: Agent Coordination - KTH

Alternative Coordination Structures 4 Decentralised Market

Product Manager 2

Designers Salesmen Engineers

Product Manager 1 Product Manager 3

Page 34: Agent Coordination - KTH

Decentralized market

•  all buyers are in contact with all possible suppliers •  buyers play a role of product managers •  each has a communication link with each supplier •  buyers can choose the best supplier •  m suppliers - 2m+2 messages •  processor fails the task is reassigned •  if manager fails – product is failed

Page 35: Agent Coordination - KTH

Alternative Coordination Structures 3 Centralised Market

Product Manager 2

Designers

Design Manager

Salesmen

Sales Manager

Engineers

Engineering Manager

Product Manager 1 Product Manager 3

Functional Managers

Page 36: Agent Coordination - KTH

Centralized market

•  brokers are in contact with possible sellers •  fewer connections and communications are required •  brokers play a role of functional managers •  broker chooses the best supplier •  4 messages •  similar to functional model •  failure of one product manager does not affect others

Page 37: Agent Coordination - KTH

Summary of organization structures Processors shared among products

Messages required to assign task

Result of task processor failure

Result of functional manager failure

Result of product manager failure

Product hierarchy Decentralised market Centralised market Funtional hierarchy

no 2 1 product disrupted - 1 prod.

disrupted

yes 2m+2 Task reassigned - 1 prod.

disrupted

yes 4 Task reassigned

All prod. disrupted

1 prod. disrupted

yes 4 Task reassigned

All prod. disrupted

All prod. disrupted

Page 38: Agent Coordination - KTH

Comparison of Organization Structures

Production cost

Coordination cost

Vulnerability cost

Product hierarchy

H L H

Functional hierarchy

L M- H+

Centralised market

L M+ H-

Decentralised market

L H L

Page 39: Agent Coordination - KTH

Changes in costs as size of structure increases

Production cost

Coordination cost

Vulnerability cost

Product hierarchy

+ + +++

Funtional hierarchy

+ ++ +

Centralised market

+ +++ ++

Decentralised market

+ ++++ ++

Page 40: Agent Coordination - KTH

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 atleast one agent has global overview – an

unrealistic assumption in MAS.

Page 41: Agent Coordination - KTH

Comparing Common Coordination Techniques

Organisation structures

Meta-level Information exchange

Multi-agent Planning

low low less

high high more

P r e d i c t a b i l i t y

R e a c t i v t y

I n f o E x c h a n g e

Explicit analysis and synchronization

Page 42: Agent Coordination - KTH

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 43: Agent Coordination - KTH

Partial Global Planning (PGP) Durfee

•  The basic condition - requirement that several distributed agents work on solution of the same problem

•  An agent can observe actions and relations between groups of other agents

A B

A1 A2 A3

A B

B1 B2 A2

Agent 1 Agent 2

communication

Page 44: Agent Coordination - KTH

Partial Global Planning (PGP)

•  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 45: Agent Coordination - KTH

Partial Global Planning (PGP) •  Task decomposition •  Local plan formulation •  Local plan abstraction •  Communication of Local plan abstraction •  Partial global goal identification •  PGP construction and modification •  Communication planning •  Acting on PGP •  Ongoing modifications •  Task reallocation

Page 46: Agent Coordination - KTH

Partial Global Planning (PGP) 1

•  A DAI testbed – Distributed Vehicle Monitoring Testbed

(DVMT) – to successfully track a number of vehicles that

pass within the range of a set of distributed sensors (agents).

•  Geographically distributed agents •  Each agent monitors sensing a portion

of the overal area

•  Discrete time-interval

•  By analyses of sound – type of vehicle and movement map

•  Provides information to another agent

•  There should be overlapping areas Overlapping

area

Agenti

Agentj

Vehicle track

1

2

3

4

5

6

7

8

Page 47: Agent Coordination - KTH

Partial Global Planning (PGP)

•  Main principle: cooperating agents exchange information

in order to reach common conclusions about the problem

solving process.

•  Why is planning partial?

–  A agent 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 48: Agent Coordination - KTH

Task decomposition (PGP) •  Starts with the premise that tasks

are inherently decomposed.

•  Assumes that an agent with a task to plan for might be unaware of what tasks other agents might be planning for and how those tasks are related to its own.

Overlapping area

Agenti

Agentj

Vehicle track

1

2

3

4

5

6

7

8

•  No individual agent might be aware of the global tasks or states.

•  Purpose of coordination is to develop sufficient awareness.

Page 49: Agent Coordination - KTH

Local plan formulation (PGP) •  before agent communicates with

other it must first develop understanding of what goals it is trying to achieve and which actions to perform

•  local plans will most often be uncertain, involving branches of alternative actions depending on results of previous actions and changes in environments

Overlapping area

Agenti

Agentj

Vehicle track

1

2

3

4

5

6

7

8

Page 50: Agent Coordination - KTH

Local plan abstraction (PGP) •  alternative courses of action for

achieving the same goal are important for an agent

•  however, the detail of alternatives might be unnecessary considering the agent's ability to coordinate with others

Overlapping area

Agenti

Agentj

Vehicle track

1

2

3

4

5

6

7

8

•  an agent might have to commit to activities at one level of details without committing to activities at more detailed levels

•  agents are designed to identify their major plan steps that could be of interest to other agents

Page 51: Agent Coordination - KTH

Communication (PGP)

•  agents must communicate about abstract local plans in order to build models of joint activity

•  in PGP, the knowledge to guide this communication is contained in the meta-level-organization

Page 52: Agent Coordination - KTH

Partial global goal identification (PGP)

•  the exchange of local plans gives an opportunity to identify when the goal of one or more agents could be subgoals of a single global goal

•  only portions of the global goal might be known to agents

•  partial global goal

Overlapping area

Agenti

Agentj

Vehicle track

1

2

3

4

5

6

7

8

Page 53: Agent Coordination - KTH

PGP construction and modification

•  local plans can be integrated into PGP

•  PGP can identify opportunities for improved coordination (performing related tasks earlier, avoiding redundant task achievement)

•  reordering of actions (usage of action rates)

Overlapping area

Agenti

Agentj

Vehicle track

1

2

3

4

5

6

7

8

Page 54: Agent Coordination - KTH

PGP construction and modification Rates: •  whether the task is unlikely to

have been accomplished already by another agent

•  how long it is expected to take •  how useful its results will be to

others in performing their tasks

Algorithm 1.  For the current ordering, rate the individual actions and sum the ratings 2.  For each action, examine the later actions for the same agent and find

the most highly-rated one. If it is higher rated, then swap the actions 3.  If the new ordering is more highly rated than the current one, then

replace the current ordering with the new one and go to step 2. 4.  Return the current ordering

Overlapping area

Agenti

Agentj

Vehicle track

1

2

3

4

5

6

7

8

Page 55: Agent Coordination - KTH

Communication planning (PGP) •  agent must next consider what

interactions should take place between agents

•  interactions in form of communicating the results of tasks are planned

•  by examining PGP an agent can determine when a task will be completed by one agent that could be of interest to another agent and can explicitly plan the communication action to transmit the result

Overlapping area

Agenti

Agentj

Vehicle track

1

2

3

4

5

6

7

8

Page 56: Agent Coordination - KTH

Communication planning (PGP) 1.  Initialize the set of partial task

results to integrate 2.  While the set contains more than

one element: (a) For each pair of elements: find the

earliest time and agent at which they can be combined

(b) For the pair that can be combined earliest: add a new element to the set of partial results for the combination and remove the two elements that were combined

3.  Return the single element in the set

Overlapping area

Agenti

Agentj

Vehicle track

1

2

3

4

5

6

7

8

Page 57: Agent Coordination - KTH

Acting on PGP •  once a PGP has been constructed

and the concurrent local and communication actions have been ordered, the collective activities of the agents have been planned

•  these activities must be translated back to the local level

•  an agent responds to a change in its PGP by modifying the abstract representation of its local plans

•  modified representation is used by agent when choosing its next local action

Overlapping area

Agenti

Agentj

Vehicle track

1

2

3

4

5

6

7

8

Page 58: Agent Coordination - KTH

Ongoing modifications (PGP)

•  as agents pursue their plans, their actions or events in environment might lead to changes in tasks

•  a change in coordination is deciding when the changes in local plans are significant enough

•  defining a threshold (significant temporal deviations)

Overlapping area

Agenti

Agentj

Vehicle track

1

2

3

4

5

6

7

8

Page 59: Agent Coordination - KTH

Task reallocation (PGP)

•  disproportional task load

•  through PGP exchange of abstract models of agent's activities and detection whether they are overburdened

•  possible task reallocation

Overlapping area

Agenti

Agentj

Vehicle track

1

2

3

4

5

6

7

8

Page 60: Agent Coordination - KTH

Partial Global Planning (PGP) •  Partial Global Plan: a cooperatively generated

datastructure 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 61: Agent Coordination - KTH

Summary (PGP) •  PGP particularly suited to applications where

some uncoordinated activity can be tolerated and overcome

•  PGP focuses on dynamically revising plans in cost-effective ways given an uncertain world

•  PGP works well for many tasks, but could be inappropriate for domains such as air-traffic control where guarantees about coordination must be made prior to any execution

Page 62: Agent Coordination - KTH

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 63: Agent Coordination - KTH

Comparing Common Coordination Techniques

Organisation structures

Meta-level Information exchange

Multi-agent Planning

low low less

high high more

P r e d i c t a b i l i t y

R e a c t i v t y

I n f o E x c h a n g e

Explicit analysis and synchronization

Page 64: Agent Coordination - KTH

Multi-agent Planning •  Agents generate, exchange and synchronize 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.

•  Consideration of uncertainty is moved to the planning activity

•  More specific than organizational structures or PGP and shorter time-horizon

Page 65: Agent Coordination - KTH

Multi-agent Planning

•  Two basic approaches:

1.  Centralised – a central coordinator develops,

decomposes and allocates plans to individual agents.

2.  Distributed – a group of agents cooperate to form:

1.  Centralised plan

2.  Distributed plan

Page 66: Agent Coordination - KTH

Multi-agent Planning Centralized planning for distributed plans

•  Given a goal description, a set of operators and an initial state description, generate a partial order plan

•  Decompose the plan into subproblems such that ordering relationships between steps tend to be minimized across subproblems

•  Insert synchronization actions into subplans •  Allocate subplans to agents using task-passing

mechanisms •  Initiate plan execution and optionally monitor

progress

Page 67: Agent Coordination - KTH

Multi-agent Planning •  Distributed Planning for centralised plans:

–  e.g. 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.

–  e.g. A general technological process (manufacturing) •  Centralized controll and plan is centralized but each step can

be planned in parallel

•  Disitrbuted expertize but control is centralized

Page 68: Agent Coordination - KTH

Multi-agent Planning

•  Distributed Planning for distributed plans: –  Individual plans of agents, coordinated dynamically.

–  No individual with a complete view of all the agents’

actions.

–  More difficult to detect and resolve undesirable

interactions.

Page 69: Agent Coordination - KTH

Centralized multi-agent plans (plan coordination) - an example (Georgeff)

•  robots world •  actions - sequences of states •  each action has pre- and post-conditions •  plans are generated separately

This approach has several steps •  interaction analysis •  safety analysis •  interaction resolution

Page 70: Agent Coordination - KTH

Centralized multi-agent plans An action a is a sequence of states p : a = {p1, ... , pi, ... , pn}, where p1 is action's initial state, pn is

action’s final state and p2,…, pn-1 are intermediate states

A planning problem consists of •  set of states S •  a designated set of initial states I •  a set of actions A •  a set of goal states G

A single-agent plan P is a description of sequence of actions a1, a2, ... , an from A such that:

•  a1 is applicable to all initial states (a1 initial state is in I) •  for all i, 1 < i ≤ n, the action ai is applicable to all states in the

range of ai-1 •  an achieves the goal G (final state of an is in G)

Page 71: Agent Coordination - KTH

Interaction analysis •  establishing incompatible situations •  <p, q> - the situation where both p and q hold (it can

be unsatisfiable if contradictory) •  possible alternatives for safe action execution

–  actions can be executed in parallel (actions said to be commuted)

–  suspending one of the action •  precedence may exist of one over another (post-

condition of one is a pre-condition for another) –  both actions may have precedence over each other –  neither actions may have precedence

•  plans are generated separately

Page 72: Agent Coordination - KTH

Safety analysis

Determining unsafe situations for each pair of actions in two plans

•  if ai and bj do not commute, then <begin(ai),begin(bj)> is unsafe

•  if ai doesn't have precedence over bj, then <begin(ai),end(bj-1)> is unsafe

The set of all such unsafe situations is called interaction set

Page 73: Agent Coordination - KTH

Rules for safety governing

•  if s=<begin(ai),begin(bj)>, then s is unsafe if either of its successor situations are unsafe

•  if s=<begin(ai),end(bj)>, then s is unsafe if <end(ai),end(bj)> is unsafe

•  if s=<end(ai),end(bj)>, then s is unsafe if both successor situations are unsafe

•  together with those situations occurring in the interaction set, these are all the unsafe situations

Page 74: Agent Coordination - KTH

Interaction resolution

The set of unsafe situations is next analyzed to identify contiguous sequences of unsafe situations

Handling synchronization

•  critical regions •  communication commands

–  P!s - send s to process P –  P?s - receive s from P

Page 75: Agent Coordination - KTH

Centralized multi-agent plans (plan coordination)

•  drop commuting actions •  exponential search of interleavings •  introducing synchronization

Page 76: Agent Coordination - KTH

Example - 2 robots The actions are informally as follows:

•  a1m: agent 1 moves to the lathe •  a2m: agent 2 moves to the lathe •  a1p: agent 1 places metal stock in lathe •  a2p: agent 2 places metal stock in lathe •  a1b: agent 1 makes a bolt •  a2n: agent 2 makes a nut •  a1f: agent 1 moves to end •  a2f: agent 2 moves to end

Preconditions for a1b and a2n - the lathe must be in possession of the appropriate agent, as well as postconditions for a1p and a2p

Page 77: Agent Coordination - KTH

Example (cont.) Assume the simple planner produces the following

single-agent plans:

a1m -> a1p -> a1b -> a1f a2m -> a2p -> a2n -> a2f

The following properties can be established •  actions a1b and a2n conflict with one another •  actions a1p and a2p each have precedence over each

other but do not commute •  action a1b has precedence over a2p, but not vice

versa •  action a2n has precedence over a1p, but not vice

versa

Page 78: Agent Coordination - KTH

Example (cont.) Interaction set is determined to be:

<begin(a1b),begin(a2n)>, <begin(a1b),end(a2p)>,

<end(a1p),begin(a2n)>, <begin(a1p),begin(a2p)>,

<begin(a1b),begin(a2p)>, <end(a1p),begin(a2p)>,

<begin(a1p),begin(a2n)>, <begin(a1p),end(a2p)>

We next form the simplified solutions: begin(a1p) -> end(a1p) -> begin(a1b) -> end(a1b)

begin(a2p) -> end(a2p) -> begin(a2n) -> end(a2n)

Page 79: Agent Coordination - KTH

Example (cont.) Safety analysis - we get 2 critical regions

begin(a1p) -> end(a1b) begin(a2p) -> end(a2n)

Next we insert synchronization commands into initial plans:

a1m -> S!begin(a1p) -> a1p -> a1b -> S!end(a1b) -> a1f a2m -> S!begin(a2p) -> a2p -> a2n -> S!end(a2n) -> a2f

Synchronizer (very generally):

N, M := false not N; P?begin(a1p) -> M := true not M; Q?begin(a2p) -> N := true true; P?end(a1b) -> M := false true; Q?end(a2n) -> N := false

Page 80: Agent Coordination - KTH

Multi-agent Planning

•  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.

Page 81: Agent Coordination - KTH

Comparing Common Coordination Techniques

Organisation structures

Meta-level Information exchange

Multi-agent Planning

low low less

high high more

P r e d i c t a b i l i t y

R e a c t i v t y

I n f o E x c h a n g e

Explicit analysis and synchronization

Page 82: Agent Coordination - KTH

Explicit analysis and synchronization •  analysis of a situation in each decision-making step

(possible-next-action-set) •  interacting with other agents

–  exchange among all interdependent agents –  locks action –  uses reply information to prune its next-action set –  send synchronization unlocking messages

•  a lot of time for communication during planning •  if the level of dependency is low and the granularity

of actions is high - can provide useful coordination •  short time-horizon

Page 83: Agent Coordination - KTH

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:

–  Mutual Modelling

–  Joint commitments

Page 84: Agent Coordination - KTH

Social Norms and Laws •  Norm: an established, expected pattern of behaviour.

–  e.g. To queue when waiting for the bus

•  Social laws: similar to Norms, but carry some authority.

–  e.g. Traffic rules.

•  Social laws in an agent system can be defined as a set of constraints:

–  Constraint => 〈E’,α 〉,

•  E’ ⊆ E is a set of environment states

•  α ∈ Ac is an action, (Ac is the finite set of actions possible for an agent)

Ø  if the environment is in some state e ∈ E’, then the action α is forbidden.

An agent (or plan) is said to be legal wrt a social law if it never attempts to

perform an action that is forbidden by some constraint in the social law

Page 85: Agent Coordination - KTH

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:

–  Mutual Modelling

–  Joint commitments

Page 86: Agent Coordination - KTH

Mutual Modelling

•  Build a model of the other agents – their

beliefs and intentions.

Ø Put ourselves in the place of the other

•  Coordinate own activities based on this

model

•  Cooperation without communication

Page 87: Agent Coordination - KTH

Coordination, Cooperation & Teamwork

•  Can we have coherent behaviour without

cooperation?

”A group of people are sitting in a park. As a

result of a sudden downpour, all of them run to

a tree in the middle of the park because it is the

only source of shelter.”

Page 88: Agent Coordination - KTH

Teamwork Example

Two vehicles travelling in a convoy:

Consider two agents Bob and Alice. Bobs wants to drive

home, but does not know his way. He knows that Alice is

going near there and that she does know the way. Bob

talks to Alice and they both agree that he follows her

through traffic and that they drive together.

Ref: Cohen & Levesque, 1991

Page 89: Agent Coordination - KTH

Teamwork

•  Important distinction:

–  Coherent behaviour that is not cooperative, e.g

•  Individual drivers in traffic following traffic rules

–  Coordinated cooperative action, e.g

•  A convoy of drivers

Page 90: Agent Coordination - KTH

Teamwork Definition

•  American Heritage Dictionary

–  Cooperative effort by the members of a

team to achieve a common goal.

Page 91: Agent Coordination - KTH

Teamwork

•  How does an individual intention towards a particular

goal differ from being a part of a team with a

collective intention towards a goal?

–  Responsibility towards the other members of the team.

•  e.g. You and I are lifting a heavy object

–  Agents i, j and k are a team and have a common goal G. G

g2 g3 g1

i j k

Page 92: Agent Coordination - KTH

Joint Intentions model

•  Based on human teamwork models

”When a group of agents are engaged in a

cooperative activity, they must have a joint

commitment to the overall aim as well as their

individual commitments.”

Page 93: Agent Coordination - KTH

Commitments

•  Commitment – a pledge or promise (e.g. to lift the heavy

object).

–  Commitment persists – if an agent adopts a commitment, it is not

dropped until for some reason it becomes redundant.

–  Commitments may change over time, e.g. due to a change in the

environment

–  Main problem with joint commitment:

•  Hard to be aware of each others states at all times

Page 94: Agent Coordination - KTH

Conventions

•  Convention – means of monitoring a commitment

–  e.g. specifies under what circumstances a commitment can be

abandoned.

•  Need conventions to describe when to change a

commitment:

1.  When to keep a commitment (retain)

2.  When to revise a commitment (rectify)

3.  When to remove a commitment (abandon)

Page 95: Agent Coordination - KTH

Convention - Example

•  Reasons for terminating a Commitment: –  Commitment Satisfied

–  Commitment Unattainable

–  Motivation for commitment no longer present

•  Rule R1: If Commitment Satisfied OR

Commitment Unattainable OR

Motivation for Commitment no longer present

then

terminate Commitment.

Page 96: Agent Coordination - KTH

Joint Commitments

•  Joint action by a team involves more than just the union of simultaneous individual actions.

•  When a group of agents are engaged in a cooperative activity, they must have: •  Joint commitment to the overall activity

•  Individual commitment to the specific task that they have been assigned to

G

g2 g3 g1

i j k

Page 97: Agent Coordination - KTH

Social Conventions

•  Individual Conventions describe how an agent should monitor its

commitments, but not how it should behave towards other

agents.

–  Asocial

–  Sufficient for goals that are independent.

•  For inter-dependent goals:

–  Need social conventions

•  Specify how to behave with respect to the other members of the team.

Page 98: Agent Coordination - KTH

Social Conventions

•  Team members must be aware of the convention that govern their interactions. e.g.

G

g1 g2 AND

Ai Aj

G

g1 g2 OR

Ai Aj

•  Both Ai and Aj must fulfill their commitments

to achieve G.

•  Either Ai or Aj must fulfill their commitment.

Ø  There is a need for all agents in a team to

inform other members of the status of their

commitments!

Page 99: Agent Coordination - KTH

Coordination Summary •  Coordination – ensuring coherent behaviour.

•  Can be considered as a control over distributed search

•  Coordination Techniques: –  Organisational structures

–  Meta-level information exchange

–  Multi-agent Planning

–  Social norms and laws

–  Mutual Modelling

–  Joint Intentions

Page 100: Agent Coordination - KTH

References – Recommended Reading for Teamwork

•  Not curriculum:

–  Cohen, P. R. and Levesque, H. J., ”Teamwork”, Nous, 25, 1991.

–  Tambe, M., ”Towards Flexible Teamwork”, Journal of Artificial

Intelligence Research, Volume 7, 1997, pp. 83-124.

Page 101: Agent Coordination - KTH

Next Topic: MAS Architectures Wooldridge: ”Introduction to MultiAgent Systems” Appendix A