Chapter 10: Multi-Agent Systems
Agents and Multi-Agent Systems
Warm-up: The Shapley Coalition Game
Each player has a stand-alone value; a coalition's value is its members' stand-alone values plus a synergy bonus for every pair inside it. The grand coalition's value v(N) is split among the players.
- In the sample round shown, if the 21 units are split equally (7 each), is A treated unfairly?
- Should the most valuable player on their own always get the largest share?
Agents and Multi-Agent Systems
Learning Outcomes
Agents and Multi-Agent Systems
What Is a Multi-Agent System (MAS)?
- A system of several autonomous agents that perceive, decide and act in a shared environment.
- Agents may share a common goal or compete in their own interest.
- Each agent's knowledge is local, so coordination and communication are central design problems.
- Examples: robot teams, autonomous vehicle fleets, distributed sensor networks, traffic and economic simulations.
Agents and Multi-Agent Systems
The Agent Concept and Its Properties
The four properties in Wooldridge and Jennings's (1995) "weak agent" definition:
Agents and Multi-Agent Systems
How Does an Agent Decide? Architectures
| Architecture | Decision mechanism | Strength | Example |
|---|---|---|---|
| Reactive | Condition → action rules; no internal model | Fast, robust | Robot vacuum, swarm behavior |
| Deliberative | World model + planning / search | Long-term goals | Exploration robot, logistics planner |
| BDI | Belief, desire, intention | Human-like reasoning | Air traffic management, virtual assistant |
| Learning | Learns a policy from experience | Adapts to unknown environments | Game-playing agents |
| Hybrid | Reactive lower layer + deliberative upper layer | Speed and foresight together | Autonomous car |
An architecture describes the inside of an agent; game theory studies the interaction between agents.
Agents and Multi-Agent Systems
Real-World Applications
Cooperation and Coordination
Cooperative, Competitive and Mixed Systems
| Which is more efficient? | Condition |
|---|---|
| Cooperation | Goals overlap, communication is cheap, the job is beyond any single agent |
| Competition | Private information exists and prices/bids can reveal it (markets, auctions) |
The answer depends on the system's goal and its resources; mechanism design tries to steer competition toward good outcomes.
Cooperation and Coordination
The Spectrum of Interests: Three Small Games
- On the left interests are identical: communication or a shared convention (e.g. “keep right”) is enough (a coordination problem).
- In the middle interests partly conflict: individual incentives work against the common good, so incentives must be designed.
- On the right one's gain is the other's loss (zero-sum): being unpredictable, i.e. a mixed strategy, matters.
Orange cells: pure Nash equilibria (both players best-responding).
Cooperation and Coordination
Individual Rationality, Collective Harm
In the middle game Defect is a dominant strategy; the equilibrium is (−2, −2), while (Silent, Silent) would give both (−1, −1). Individual rationality yields a collectively bad outcome.
Cooperation and Coordination
Decision Making: Centralized or Distributed?
Agents plan from what they know about the environment. Who decides: a single center, or each agent itself?
| Centralized control | Distributed (full autonomy) | |
|---|---|---|
| Pros | All information in one place: the optimum can be computed; easy coordination, low risk of conflict | Flexible, scalable, quick to react locally; the system keeps running when a part fails |
| Cons | Single point of failure and a bottleneck; computation explodes as agents are added; agents may misreport private information | Decisions made on local information may clash; selfish agents may reach inefficient equilibria (the Price of Anarchy) |
| Example | A traffic light control center; a central server in a sensor network | Drone teams, autonomous vehicles, robotic exploration |
Cooperation and Coordination
Distributed Coordination and Conventions
- Without a center, agents decide using local information and messages.
- A protocol must handle communication delay, fault tolerance and scalability together.
- Missing common knowledge leads to clashing plans: two robots meeting in a narrow corridor may both dodge the same way.
- The fix: a convention / social law ("keep right"), which picks one equilibrium of the coordination game in advance.
| R1 ╲ R2 | Right | Left |
|---|---|---|
| Right | (1, 1) | (−1, −1) |
| Left | (−1, −1) | (1, 1) |
Corridor game: two pure Nash equilibria (orange)
Cooperation and Coordination
Game Theory and Incentives in MAS
Right incentives
- Increase cooperation, reduce conflict.
Wrong incentives
- Breed selfishness, excessive risk and free riding.
Cooperation and Coordination
Communication, Learning and Emergent Behavior
Task Allocation
Task and Resource Allocation
- Goal: assign jobs to suitable agents by ability and cost (e.g. minimum total time).
- Difficulty: costs are often private information; agents are many; tasks arrive over time.
- A good method trades solution quality against communication and computation.
| Method | How it works | Pros / cons |
|---|---|---|
| Centralized optimization | Collect all costs and solve the assignment problem (Hungarian algorithm: n tasks to n agents at minimum cost in about n³ steps) | Optimal / needs all information |
| Contract net | A task is announced, agents bid, the best bid wins | Simple, distributed / can be greedy |
| Auction | Tasks/resources sold by bidding; bundles via combinatorial auctions | Can be made incentive compatible |
| Market-based | Prices adjust to supply and demand; agents respond to prices | Scales / may converge slowly |
Task Allocation
The Contract Net Protocol
Smith (1980): the agent with a task acts as manager; agents able to do it act as contractors. Roles can change from task to task.
Task Allocation
Contract Net Step by Step: 3 Tasks, 3 Robots
The manager auctions three tasks (T1–T3) in order. Each robot takes at most one task; only the robot knows its own cost (estimated time); the manager never sees the table.
Announce: the manager broadcasts task T1 to the free robots: Robot 1, Robot 2, Robot 3.
Bids: each free robot reports its cost for T1: R1 → 2, R2 → 3, R3 → 6.
Award: Robot 1 bids lowest (2 min), so T1 goes to it; the robot is now busy.
Announce: the manager broadcasts task T2 to the free robots: Robot 2, Robot 3.
Bids: each free robot reports its cost for T2: R2 → 7, R3 → 8.
Award: Robot 2 bids lowest (7 min), so T2 goes to it; the robot is now busy.
Announce: the manager broadcasts task T3 to the free robots: Robot 3.
Bids: each free robot reports its cost for T3: R3 → 9.
Award: Robot 3 bids lowest (9 min), so T3 goes to it; the robot is now busy. With only one bid, there is no choice.
Result: the contract net totals 18 min (red). The optimum, trying all 6 assignments, is 13 min (dashed blue): T1→R3, T2→R1, T3→R2. Greedy sequential auctioning costs 38% more.
Legend: dashed arrow = announce · orange = bid · thick red arrow / frame = award · faded robot = busy · dashed blue frame = optimal assignment.
Task Allocation
Code Trace: contract_net(tasks, cost)
tasks = [T1, T2, T3] are auctioned in order. All robots are free; nothing assigned yet.
Announce: T1. Free robots bid: R1 → 2, R2 → 3, R3 → 6.
Award: lowest bid R1 (2 min).
assign[T1] = R1, total = 2; R1 is now busy.
Announce: T2. Free robots bid: R2 → 7, R3 → 8.
Award: lowest bid R2 (7 min).
assign[T2] = R2, total = 9; R2 is now busy. R1, which took T1 cheaply, was also cheapest for T2 (3) but is gone.
Announce: T3. Free robots bid: R3 → 9.
Award: lowest bid R3 (9 min). A single bid: no choice.
assign[T3] = R3, total = 18; R3 is now busy.
Result 18 min: the best local decision at each step, but not the optimal total.
def contract_net(tasks, cost): free = set(cost) assign, total = {}, 0 for g in tasks: bids = {r: cost[r][g] for r in free} winner = min(bids, key=bids.get) assign[g] = winner total += bids[winner] free.remove(winner) return assign, total
Task Allocation
Code Trace: optimum(tasks, cost)
The centralized solution: a manager who knows all costs tries all 3! = 6 orderings of the 3 robots.
p = (R1, R2, R3): t = 2 + 7 + 9 = 18 ⇒ new best.
p = (R1, R3, R2): t = 2 + 8 + 4 = 14 ⇒ new best.
p = (R2, R1, R3): t = 3 + 3 + 9 = 15 ≥ 14: unchanged.
p = (R2, R3, R1): t = 3 + 8 + 5 = 16 ≥ 14: unchanged.
p = (R3, R1, R2): t = 6 + 3 + 4 = 13 ⇒ new best.
p = (R3, R2, R1): t = 6 + 7 + 5 = 18 ≥ 13: unchanged.
Optimum 13 min: T1→R3, T2→R1, T3→R2; the contract net takes 18 min (38% more). But n robots have n! assignments: 3,628,800 at n = 10 (the Hungarian algorithm solves it in O(n³)).
from itertools import permutations def optimum(tasks, cost): best = None for p in permutations(cost): t = sum(cost[r][g] for g, r in zip(tasks, p)) if best is None or t < best[0]: best = (t, p) return best
Task Allocation
The Contract Net: Strengths and Weaknesses
Strengths
- Distributed: the manager finds a good assignment without knowing the cost table.
- O(n) messages per task: one announcement + n bids + one award.
- Adding robots is easy; a failed robot's task is simply re-auctioned.
Weaknesses
- Greedy and sequential: 18 min in the example vs. the optimal 13 (38% more). R1, which took T1 cheaply, was busy although it was the best candidate for T2.
- Robots can strategically inflate their costs.
- Task order changes the outcome.
Coalitional Games
Coalition Formation
- Agents that cannot reach a goal alone may form temporary or lasting coalitions: shipping firms share vehicles, drones carry a heavy load together.
- These games are cooperative: binding agreements are possible; the question is not "which strategy?" but "who joins whom, and how is the gain shared?"
- If the split is unfair, the coalition falls apart: stability depends directly on the sharing rule.
Coalitional Games
Coalition Structures: Who Joins Whom?
- A coalition structure partitions the agents into disjoint coalitions. Society's question: which structure has the largest total value?
- The number of structures is the number of ways to split n agents into nonempty disjoint groups (the Bell number): 5 for n = 3, 15 for n = 4, 4,140 for n = 8, 115,975 for n = 10.
- The example game is superadditive: merging never hurts, so the best structure is the grand coalition {A, B, C} (120).
- In general, finding the best structure is NP-hard (Sandholm et al., 1999); what remains is how to split the 120.
Coalitional Games
Coalitional Games and the Characteristic Function
- Player set N = {1, …, n}; for every coalition S ⊆ N, v(S) is the total value S's members can secure together, independently of the others.
- v assigns each coalition the total value the group can earn together; the empty coalition is worth 0. v is called the characteristic function. Because the gain can be shared freely within the group, these are transferable utility (TU) games.
- Superadditive: for disjoint S, T, v(S ∪ T) ≥ v(S) + v(T) → merging never hurts; the grand coalition N maximizes total value.
- In the example, three logistics firms A, B, C earn 120 together, at most 70 as the best pair and at most 30 alone.
| S | v(S) |
|---|---|
| {A} | 10 |
| {B} | 20 |
| {C} | 30 |
| {A, B} | 50 |
| {A, C} | 60 |
| {B, C} | 70 |
| {A, B, C} | 120 |
v(S): profit (thousand TL)
Coalitional Games
How Should 120 Be Split?
An imputation x = (xA, xB, xC) sums to v(N) = 120 (efficiency) and gives everyone at least their stand-alone value (individual rationality).
| Proposal | xA | xB | xC | Rationale / problem |
|---|---|---|---|---|
| Equal split | 40 | 40 | 40 | Simple, but ignores C's larger contribution |
| Proportional to stand-alone value (10 : 20 : 30) | 20 | 40 | 60 | Looks only at v({i}); misses synergies |
| Strong C's proposal | 10 | 25 | 85 | A and B can get 50 together; they refuse |
| Shapley value | 30 | 40 | 50 | Average marginal contribution |
Coalitional Games
The Shapley Value
- Players arrive in a random order and join the coalition. Each player is credited with the value it adds on arrival (its marginal contribution).
- Shapley value: the average marginal contribution over all n! orders.
- Cost: n! orders (or 2n−1 subsets); for large n it is approximated by sampling.
- Shapley (1953): the only rule satisfying the four axioms shown. It is also used to explain models (SHAP: splitting a model's decision into feature contributions).
Coalitional Games
Shapley Value Step by Step: 6 Orders
| S | v(S) |
|---|---|
| {A} | 10 |
| {B} | 20 |
| {C} | 30 |
| {A, B} | 50 |
| {A, C} | 60 |
| {B, C} | 70 |
| {A, B, C} | 120 |
v(S)
| order | A | B | C |
|---|---|---|---|
| A → B → C | · | · | · |
| A → C → B | · | · | · |
| B → A → C | · | · | · |
| B → C → A | · | · | · |
| C → A → B | · | · | · |
| C → B → A | · | · | · |
| total | · | · | · |
| φ = total / 6 | · | · | · |
In each order agents arrive one at a time; each is credited with the value it adds to the coalition on arrival (its marginal contribution).
| order | A | B | C |
|---|---|---|---|
| A → B → C | 10 | 40 | 70 |
| A → C → B | · | · | · |
| B → A → C | · | · | · |
| B → C → A | · | · | · |
| C → A → B | · | · | · |
| C → B → A | · | · | · |
| total | · | · | · |
| φ = total / 6 | · | · | · |
Order A → B → C. A: 10 − 0 = 10; B: 50 − 10 = 40; C: 120 − 50 = 70. Row total 120 = v(ABC).
| order | A | B | C |
|---|---|---|---|
| A → B → C | 10 | 40 | 70 |
| A → C → B | 10 | 60 | 50 |
| B → A → C | · | · | · |
| B → C → A | · | · | · |
| C → A → B | · | · | · |
| C → B → A | · | · | · |
| total | · | · | · |
| φ = total / 6 | · | · | · |
Order A → C → B. A: 10 − 0 = 10; C: 60 − 10 = 50; B: 120 − 60 = 60. Row total 120 = v(ABC).
| order | A | B | C |
|---|---|---|---|
| A → B → C | 10 | 40 | 70 |
| A → C → B | 10 | 60 | 50 |
| B → A → C | 30 | 20 | 70 |
| B → C → A | · | · | · |
| C → A → B | · | · | · |
| C → B → A | · | · | · |
| total | · | · | · |
| φ = total / 6 | · | · | · |
Order B → A → C. B: 20 − 0 = 20; A: 50 − 20 = 30; C: 120 − 50 = 70. Row total 120 = v(ABC).
| order | A | B | C |
|---|---|---|---|
| A → B → C | 10 | 40 | 70 |
| A → C → B | 10 | 60 | 50 |
| B → A → C | 30 | 20 | 70 |
| B → C → A | 50 | 20 | 50 |
| C → A → B | · | · | · |
| C → B → A | · | · | · |
| total | · | · | · |
| φ = total / 6 | · | · | · |
Order B → C → A. B: 20 − 0 = 20; C: 70 − 20 = 50; A: 120 − 70 = 50. Row total 120 = v(ABC).
| order | A | B | C |
|---|---|---|---|
| A → B → C | 10 | 40 | 70 |
| A → C → B | 10 | 60 | 50 |
| B → A → C | 30 | 20 | 70 |
| B → C → A | 50 | 20 | 50 |
| C → A → B | 30 | 60 | 30 |
| C → B → A | · | · | · |
| total | · | · | · |
| φ = total / 6 | · | · | · |
Order C → A → B. C: 30 − 0 = 30; A: 60 − 30 = 30; B: 120 − 60 = 60. Row total 120 = v(ABC).
| order | A | B | C |
|---|---|---|---|
| A → B → C | 10 | 40 | 70 |
| A → C → B | 10 | 60 | 50 |
| B → A → C | 30 | 20 | 70 |
| B → C → A | 50 | 20 | 50 |
| C → A → B | 30 | 60 | 30 |
| C → B → A | 50 | 40 | 30 |
| total | · | · | · |
| φ = total / 6 | · | · | · |
Order C → B → A. C: 30 − 0 = 30; B: 70 − 30 = 40; A: 120 − 70 = 50. Row total 120 = v(ABC).
| order | A | B | C |
|---|---|---|---|
| A → B → C | 10 | 40 | 70 |
| A → C → B | 10 | 60 | 50 |
| B → A → C | 30 | 20 | 70 |
| B → C → A | 50 | 20 | 50 |
| C → A → B | 30 | 60 | 30 |
| C → B → A | 50 | 40 | 30 |
| total | 180 | 240 | 300 |
| φ = total / 6 | 30 | 40 | 50 |
Average marginal contribution: φ = (30, 40, 50). Total 120: the efficiency axiom holds.
Coalitional Games
Code Trace: shapley(N, v) (1/2)
The phi dict is zeroed; permutations (itertools) generates the 3! = 6 orders.
Order 1 (A, B, C): agents arrive in this order. S starts as the empty coalition.
A joins: gain = v(A) − v(∅) = 10 − 0 = 10; phi[A] = 10.
B joins: gain = v(AB) − v(A) = 50 − 10 = 40; phi[B] = 40.
C joins: gain = v(ABC) − v(AB) = 120 − 50 = 70; phi[C] = 70.
Order 2 (A, C, B): agents arrive in this order. S starts as the empty coalition.
A joins: gain = v(A) − v(∅) = 10 − 0 = 10; phi[A] = 20.
C joins: gain = v(AC) − v(A) = 60 − 10 = 50; phi[C] = 120.
B joins: gain = v(ABC) − v(AC) = 120 − 60 = 60; phi[B] = 100.
Order 3 (B, A, C): agents arrive in this order. S starts as the empty coalition.
B joins: gain = v(B) − v(∅) = 20 − 0 = 20; phi[B] = 120.
A joins: gain = v(AB) − v(B) = 50 − 20 = 30; phi[A] = 50.
C joins: gain = v(ABC) − v(AB) = 120 − 50 = 70; phi[C] = 190.
from itertools import permutations def shapley(N, v): phi = {i: 0 for i in N} orders = list(permutations(N)) for order in orders: S = frozenset() for i in order: gain = v[S | {i}] - v[S] phi[i] += gain S = S | {i} return {i: phi[i] / len(orders) for i in N}
Coalitional Games
Code Trace: shapley(N, v) (2/2)
Order 4 (B, C, A): agents arrive in this order. S starts as the empty coalition.
B joins: gain = v(B) − v(∅) = 20 − 0 = 20; phi[B] = 140.
C joins: gain = v(BC) − v(B) = 70 − 20 = 50; phi[C] = 240.
A joins: gain = v(ABC) − v(BC) = 120 − 70 = 50; phi[A] = 100.
Order 5 (C, A, B): agents arrive in this order. S starts as the empty coalition.
C joins: gain = v(C) − v(∅) = 30 − 0 = 30; phi[C] = 270.
A joins: gain = v(AC) − v(C) = 60 − 30 = 30; phi[A] = 130.
B joins: gain = v(ABC) − v(AC) = 120 − 60 = 60; phi[B] = 200.
Order 6 (C, B, A): agents arrive in this order. S starts as the empty coalition.
C joins: gain = v(C) − v(∅) = 30 − 0 = 30; phi[C] = 300.
B joins: gain = v(BC) − v(C) = 70 − 30 = 40; phi[B] = 240.
A joins: gain = v(ABC) − v(BC) = 120 − 70 = 50; phi[A] = 180.
The totals are divided by 6: φA = 180/6 = 30, φB = 240/6 = 40, φC = 300/6 = 50. Total 120 = v(ABC).
from itertools import permutations def shapley(N, v): phi = {i: 0 for i in N} orders = list(permutations(N)) for order in orders: S = frozenset() for i in order: gain = v[S | {i}] - v[S] phi[i] += gain S = S | {i} return {i: phi[i] / len(orders) for i in N}
Coalitional Games
Back to the Warm-up: The Shapley Coalition Game
With pairwise synergies, the average marginal contribution is: φi = stand-alone value + half of each synergy involving i.
| Player | Alone | Synergy share | φ | Equal share |
|---|---|---|---|---|
| A | 6 | 4/2 + 2/2 = 3 | 9 | 7 |
| B | 4 | 4/2 + 0 = 2 | 6 | 7 |
| C | 5 | 2/2 + 0 = 1 | 6 | 7 |
| Total | 15 | 6 | 21 | 21 |
The six arrival orders also give (9, 6, 6). An equal split pays A 2 less.
Subjects' “fair” splits in three-person games are best fit by a Shapley/equal-split mix (de Clippel and Rozen, 2022). Half-and-half here: (8; 6.5; 6.5).
The game's equal-split error measures the same gap: |7 − 9| + |7 − 6| + |7 − 6| = 4.
Coalitional Games
The Core
- An imputation x is in the core ⇔ Σi∈N xi = v(N) and Σi∈S xi ≥ v(S) for every S ⊆ N.
- That is, no coalition can give its members more by breaking away (blocking) from the grand coalition.
- The core is a system of linear inequalities (Gillies, 1959): it may be empty, a single point or a region.
Coalitional Games
The Geometry of the Core Step by Step
All individually rational, efficient splits form a triangle; at a corner one agent takes all 60 of the surplus.
{A, B}: xA + xB ≥ 50 ⇔ xC ≤ 70: if C gets more than 70, A and B break away and take their own 50. The C corner is cut off.
{A, C}: xA + xC ≥ 60 ⇔ xB ≤ 60: the B corner is cut off.
{B, C}: xB + xC ≥ 70 ⇔ xA ≤ 50: the A corner is cut off too. The remaining orange hexagon is the core.
φ = (30, 40, 50) and the equal split are in the core (blue). y = (10, 25, 85) is outside (red): xA + xB = 35 < 50.
Coalitional Games
Checking the Core Step by Step
| coalition S | constraint | x = (30, 40, 50) | y = (10, 25, 85) |
|---|---|---|---|
| {A} | Σ ≥ 10 | · | · |
| {B} | Σ ≥ 20 | · | · |
| {C} | Σ ≥ 30 | · | · |
| {A, B} | Σ ≥ 50 | · | · |
| {A, C} | Σ ≥ 60 | · | · |
| {B, C} | Σ ≥ 70 | · | · |
| {A, B, C} | total = 120 | · | · |
If an imputation is in the core, no coalition can do better by breaking away and taking its own value v(S). Let's test two imputations against the 7 constraints.
| coalition S | constraint | x = (30, 40, 50) | y = (10, 25, 85) |
|---|---|---|---|
| {A} | Σ ≥ 10 | 30 ✓ | 10 ✓ |
| {B} | Σ ≥ 20 | · | · |
| {C} | Σ ≥ 30 | · | · |
| {A, B} | Σ ≥ 50 | · | · |
| {A, C} | Σ ≥ 60 | · | · |
| {B, C} | Σ ≥ 70 | · | · |
| {A, B, C} | total = 120 | · | · |
{A}: v(A) = 10. For x 30 ≥ 10 ✓; for y 10 ≥ 10 ✓.
| coalition S | constraint | x = (30, 40, 50) | y = (10, 25, 85) |
|---|---|---|---|
| {A} | Σ ≥ 10 | 30 ✓ | 10 ✓ |
| {B} | Σ ≥ 20 | 40 ✓ | 25 ✓ |
| {C} | Σ ≥ 30 | · | · |
| {A, B} | Σ ≥ 50 | · | · |
| {A, C} | Σ ≥ 60 | · | · |
| {B, C} | Σ ≥ 70 | · | · |
| {A, B, C} | total = 120 | · | · |
{B}: v(B) = 20. For x 40 ≥ 20 ✓; for y 25 ≥ 20 ✓.
| coalition S | constraint | x = (30, 40, 50) | y = (10, 25, 85) |
|---|---|---|---|
| {A} | Σ ≥ 10 | 30 ✓ | 10 ✓ |
| {B} | Σ ≥ 20 | 40 ✓ | 25 ✓ |
| {C} | Σ ≥ 30 | 50 ✓ | 85 ✓ |
| {A, B} | Σ ≥ 50 | · | · |
| {A, C} | Σ ≥ 60 | · | · |
| {B, C} | Σ ≥ 70 | · | · |
| {A, B, C} | total = 120 | · | · |
{C}: v(C) = 30. For x 50 ≥ 30 ✓; for y 85 ≥ 30 ✓.
| coalition S | constraint | x = (30, 40, 50) | y = (10, 25, 85) |
|---|---|---|---|
| {A} | Σ ≥ 10 | 30 ✓ | 10 ✓ |
| {B} | Σ ≥ 20 | 40 ✓ | 25 ✓ |
| {C} | Σ ≥ 30 | 50 ✓ | 85 ✓ |
| {A, B} | Σ ≥ 50 | 70 ✓ | 35 ✗ |
| {A, C} | Σ ≥ 60 | · | · |
| {B, C} | Σ ≥ 70 | · | · |
| {A, B, C} | total = 120 | · | · |
{A, B}: v(AB) = 50. For x 70 ≥ 50 ✓; for y 35 ≥ 50 ✗. Breaking away together, {A, B} gets 50: it blocks y.
| coalition S | constraint | x = (30, 40, 50) | y = (10, 25, 85) |
|---|---|---|---|
| {A} | Σ ≥ 10 | 30 ✓ | 10 ✓ |
| {B} | Σ ≥ 20 | 40 ✓ | 25 ✓ |
| {C} | Σ ≥ 30 | 50 ✓ | 85 ✓ |
| {A, B} | Σ ≥ 50 | 70 ✓ | 35 ✗ |
| {A, C} | Σ ≥ 60 | 80 ✓ | 95 ✓ |
| {B, C} | Σ ≥ 70 | · | · |
| {A, B, C} | total = 120 | · | · |
{A, C}: v(AC) = 60. For x 80 ≥ 60 ✓; for y 95 ≥ 60 ✓.
| coalition S | constraint | x = (30, 40, 50) | y = (10, 25, 85) |
|---|---|---|---|
| {A} | Σ ≥ 10 | 30 ✓ | 10 ✓ |
| {B} | Σ ≥ 20 | 40 ✓ | 25 ✓ |
| {C} | Σ ≥ 30 | 50 ✓ | 85 ✓ |
| {A, B} | Σ ≥ 50 | 70 ✓ | 35 ✗ |
| {A, C} | Σ ≥ 60 | 80 ✓ | 95 ✓ |
| {B, C} | Σ ≥ 70 | 90 ✓ | 110 ✓ |
| {A, B, C} | total = 120 | · | · |
{B, C}: v(BC) = 70. For x 90 ≥ 70 ✓; for y 110 ≥ 70 ✓.
| coalition S | constraint | x = (30, 40, 50) | y = (10, 25, 85) |
|---|---|---|---|
| {A} | Σ ≥ 10 | 30 ✓ | 10 ✓ |
| {B} | Σ ≥ 20 | 40 ✓ | 25 ✓ |
| {C} | Σ ≥ 30 | 50 ✓ | 85 ✓ |
| {A, B} | Σ ≥ 50 | 70 ✓ | 35 ✗ |
| {A, C} | Σ ≥ 60 | 80 ✓ | 95 ✓ |
| {B, C} | Σ ≥ 70 | 90 ✓ | 110 ✓ |
| {A, B, C} | total = 120 | 120 ✓ | 120 ✓ |
{A, B, C}: v(ABC) = 120. For x 120 = 120 ✓; for y 120 = 120 ✓.
| coalition S | constraint | x = (30, 40, 50) | y = (10, 25, 85) |
|---|---|---|---|
| {A} | Σ ≥ 10 | 30 ✓ | 10 ✓ |
| {B} | Σ ≥ 20 | 40 ✓ | 25 ✓ |
| {C} | Σ ≥ 30 | 50 ✓ | 85 ✓ |
| {A, B} | Σ ≥ 50 | 70 ✓ | 35 ✗ |
| {A, C} | Σ ≥ 60 | 80 ✓ | 95 ✓ |
| {B, C} | Σ ≥ 70 | 90 ✓ | 110 ✓ |
| {A, B, C} | total = 120 | 120 ✓ | 120 ✓ |
Result: the Shapley imputation x is in the core; y is outside the core because {A, B} blocks it. (The game is convex, so the Shapley value is in the core.)
Coalitional Games
A Game with an Empty Core: The Majority Game
- Three agents share a prize of 1; any two agents who agree get it: v(S) = 1 (|S| ≥ 2), otherwise 0.
- Core constraints: xA+xB ≥ 1, xA+xC ≥ 1, xB+xC ≥ 1.
- Adding them gives 2(xA+xB+xC) ≥ 3, so the total is ≥ 3/2. But the total must be 1 ⇒ the core is empty.
- In every imputation some pair gets ≤ 2/3 and wants to exclude the third and share the 1: endless bargaining.
Coalitional Games
Weighted Voting: Weight ≠ Power
- Weighted voting game [q; w1, …, wn]: a coalition wins if its total weight reaches q, v(S) = 1; otherwise 0.
- Shapley–Shubik index (1954) = the Shapley value of this game: the share of orders in which i is pivotal.
- Parliament [51; 50, 49, 1]: despite a 48-seat gap, B and C have equal power (1/6); the Banzhaf index counts critical memberships: A is critical in three winning coalitions ({A, B}, {A, C}, {A, B, C}), B and C in one each ⇒ (3/5, 1/5, 1/5).
- 1958 EEC Council of Ministers [12; 4, 4, 4, 2, 2, 1]: Luxembourg's vote could never change any coalition's outcome; power = 0.
Coalitional Games
Code Trace: power_index(N, w, q)
w = {A: 50, B: 49, C: 1}, q = 51. 3! = 6 arrival orders; in each, the player who crosses the quota is pivotal.
Order A → B → C: with the total at 50 < 51, B arrives and the total is 99 ≥ 51.
B is pivotal: pivots[B] = 1; break moves on to the next order.
Order A → C → B: with the total at 50 < 51, C arrives and the total is 51 ≥ 51.
C is pivotal: pivots[C] = 1; break moves on to the next order.
Order B → A → C: with the total at 49 < 51, A arrives and the total is 99 ≥ 51.
A is pivotal: pivots[A] = 1; break moves on to the next order.
Order B → C → A: with the total at 50 < 51, A arrives and the total is 100 ≥ 51.
A is pivotal: pivots[A] = 2; break moves on to the next order.
Order C → A → B: with the total at 1 < 51, A arrives and the total is 51 ≥ 51.
A is pivotal: pivots[A] = 3; break moves on to the next order.
Order C → B → A: with the total at 50 < 51, A arrives and the total is 100 ≥ 51.
A is pivotal: pivots[A] = 4; break moves on to the next order.
Power = pivots / 6 ⇒ (2/3, 1/6, 1/6). B's 49 seats bring no more power than C's single seat.
from itertools import permutations def power_index(N, w, q): pivots = {i: 0 for i in N} orders = list(permutations(N)) for order in orders: total = 0 for i in order: total += w[i] if total >= q: pivots[i] += 1 break return {i: pivots[i] / len(orders) for i in N}
The Public Goods Game
The Public Goods Game
- A public good: nobody can be excluded from it, and one person's use does not reduce another's (e.g. open-source software, clean air, a shared dataset).
- The game: n players with e tokens each. Player i puts ki tokens, between 0 and e, into a common pool. The pool is multiplied by r and split equally among everyone.
- Payoff: ui = e − ki + (r/n)·Σj kj (Σj kj: total tokens in the pool)
- r/n: the part of a token that returns to its contributor (MPCR: marginal per capita return). There is a dilemma if 1/n < r/n < 1.
The Public Goods Game
Why Free Riding?
- u1 = 10 − k1 + 0.4·(k1 + others). One more token from P1: −1 from the pocket, +0.4 from the pool, net −0.6.
- Whatever others do, each token costs P1 0.6: k = 0 is dominant.
- Unique equilibrium: all give 0 → 10 each. All giving 10 yields 16 each: not Pareto optimal.
- Red: others give fully, P1's payoff falls from 22 to 16. Blue: all give the same k, 10 up to 16.
- Multi-agent versions: a file-sharing peer that never uploads; a federated-learning client that never sends updates.
Summary
Summary
Summary
Sample Problems
- Contract net example: assignment and total time if auctioned in order T3, T2, T1?
- Glove game: A has a left glove, B and C each a right glove; a pair is worth 1. Write v; find the Shapley value.
- The core of this glove game?
- In the main example, is (40, 40, 40) in the core? Is (20, 25, 75)?
- Public goods: n = 5, e = 10, r = 2. Payoffs if all contribute fully, and if one free rides?
- Public goods with r ≥ n: dominant strategy?
Show answers
- T3→R2; T2→R1; T1→R3: total 13 min. This order reaches the optimum; the order changes the outcome.
- v = 1 only for coalitions containing A and at least one right glove. φ = (2/3, 1/6, 1/6).
- The single point (1, 0, 0): xA+xB ≥ 1 and xA+xC ≥ 1 ⇒ xB = xC = 0. The Shapley value is not in the core.
- (40, 40, 40): all constraints hold, so it is in the core. (20, 25, 75): xA+xB = 45 < 50 ⇒ not in the core.
- Everyone gives 10: pool 50·2 = 100, everyone gets 20. One gives 0: pool 80, 16 each; the free rider has 26, the others 16.
- r/n ≥ 1 ⇒ each token returns at least 1 to its contributor: full contribution is (weakly) dominant; the dilemma disappears.
Summary
References
- M. Wooldridge, An Introduction to MultiAgent Systems, 2nd ed., Wiley, 2009.
- Y. Shoham, K. Leyton-Brown, Multiagent Systems: Algorithmic, Game-Theoretic, and Logical Foundations, Cambridge University Press, 2009 (Chapter 12).
- G. Chalkiadakis, E. Elkind, M. Wooldridge, Computational Aspects of Cooperative Game Theory, Morgan & Claypool, 2011.
- R. G. Smith, "The contract net protocol: High-level communication and control in a distributed problem solver", IEEE Trans. Computers C-29(12), 1980.
- L. S. Shapley, "A value for n-person games", Contributions to the Theory of Games II, Princeton, 1953; "Cores of convex games", Int. J. Game Theory 1, 1971; L. S. Shapley, M. Shubik, APSR 48(3), 1954.
- G. de Clippel, K. Rozen, "Fairness through the lens of cooperative game theory: An experimental approach", American Economic Journal: Microeconomics 14(3), 2022.
- T. Sandholm et al., "Coalition structure generation with worst case guarantees", Artificial Intelligence 111, 1999.
Summary
References: Books, Courses and Tools
- A. R. Karlin, Y. Peres, Game Theory, Alive, American Mathematical Society, 2017 (chapter on coalitions and the Shapley value).
- N. Nisan, T. Roughgarden, É. Tardos, V. Vazirani (eds.), Algorithmic Game Theory, Cambridge University Press, 2007 (Chapter 15: cost sharing, the core and the Shapley value).
- C. W. Reynolds, "Flocks, herds and schools: A distributed behavioral model", SIGGRAPH '87, 1987; T. C. Schelling, "Dynamic models of segregation", J. Mathematical Sociology 1(2), 1971.
- FIPA, Contract Net Interaction Protocol Specification (SC00029H), 2002.
- M. Wooldridge, N. R. Jennings, "Intelligent agents: Theory and practice", Knowledge Engineering Review 10(2), 1995; D. B. Gillies, "Solutions to general non-zero-sum games", Contributions to the Theory of Games IV, Princeton, 1959.
- O. N. Bondareva, "Some applications of linear programming methods to the theory of cooperative games", Problemy Kibernetiki 10, 1963; L. S. Shapley, "On balanced sets and cores", Naval Research Logistics Quarterly 14(4), 1967.
- Course pages: N. Shah, CSC304 (Toronto) · A. Procaccia, 15-896 (CMU) · T. Roughgarden, CS364A (Stanford) · M. Hoefer, AGT (Frankfurt)
- Tools: Nashpy (Nash equilibria of two-player games, e.g. the three games on the spectrum of interests) · Gambit (open-source game theory tools).