Algorithm Search⌘K

Definitionintro

Shapley value

Also called Shapley value of a cooperative game.

Pays each player its marginal contribution averaged over all orders in which the players can join the grand coalition.

The Shapley value is a way to divide the worth v(N)v(N) of a transferable utility game among its players. Each player gets its marginal contribution, averaged over all n!n! orders in which the players can arrive. Shapley (1953) showed that it is the only rule with four natural properties; that result is the Shapley uniqueness theorem. Unlike the core and the nucleolus, the Shapley value is defined by a closed formula, it exists for every game, and it does not ask for stability against coalitions. On simple games it is the Shapley-Shubik power index.

Definition

A TU game is a pair (N,v)(N, v) with the players N={1,…,n}N = \{1, \ldots, n\} and a function vv that gives a real number v(S)v(S) to each coalition S⊆NS \subseteq N, with v(∅)=0v(\emptyset) = 0. For a player ii and a coalition SS with i∉Si \notin S, the number v(S∪{i})−v(S)v(S \cup \{i\}) - v(S) is the marginal contribution of ii to SS.

Let π\pi be an order of the players, a permutation of NN, and let PiπP_i^\pi be the set of the players that come before ii in π\pi. The Shapley value of ii is

φi(v)=1n!∑π(v(Piπ∪{i})−v(Piπ)),\varphi_i(v) = \frac{1}{n!} \sum_{\pi} \Big( v(P_i^\pi \cup \{i\}) - v(P_i^\pi) \Big),

where the sum is over all n!n! orders. Think of the players as arriving one at a time in the order π\pi, each one paid the amount that it adds to the worth of the players already there. The Shapley value is the expected payment when the order is uniform at random.

For a fixed S⊆N∖{i}S \subseteq N \setminus \{i\} with ∣S∣=s|S| = s, the number of orders with Piπ=SP_i^\pi = S is s! (n−s−1)!s!\,(n-s-1)!: the players of SS come first in any order, then ii, then the others in any order. So the same value is

φi(v)=∑S⊆N∖{i}s! (n−s−1)!n!(v(S∪{i})−v(S)).\varphi_i(v) = \sum_{S \subseteq N \setminus \{i\}} \frac{s!\,(n-s-1)!}{n!} \Big( v(S \cup \{i\}) - v(S) \Big).

This subset formula has 2n−12^{n-1} terms per player, where the order formula has n!n!.

A third form uses the unanimity games. For a nonempty T⊆NT \subseteq N, the game uTu_T has uT(S)=1u_T(S) = 1 if T⊆ST \subseteq S and uT(S)=0u_T(S) = 0 if not. Every game is a unique sum v=∑T≠∅dT uTv = \sum_{T \ne \emptyset} d_T\, u_T, with the Harsanyi dividends dT=∑S⊆T(−1)∣T∣−∣S∣v(S)d_T = \sum_{S \subseteq T} (-1)^{|T| - |S|} v(S) (this is Möbius inversion on the subsets of NN). Then

φi(v)=∑T∋idT∣T∣:\varphi_i(v) = \sum_{T \ni i} \frac{d_T}{|T|}:

each dividend is split equally among the members of its coalition.

The Shapley value has these properties for all games vv and ww on NN:

  • Efficiency. ∑i∈Nφi(v)=v(N)\sum_{i \in N} \varphi_i(v) = v(N). Along each order the marginal contributions telescope to v(N)−v(∅)v(N) - v(\emptyset).
  • Symmetry. If v(S∪{i})=v(S∪{j})v(S \cup \{i\}) = v(S \cup \{j\}) for every SS that contains neither ii nor jj, then φi(v)=φj(v)\varphi_i(v) = \varphi_j(v).
  • Null player. If v(S∪{i})=v(S)v(S \cup \{i\}) = v(S) for every SS, then φi(v)=0\varphi_i(v) = 0.
  • Additivity. φ(v+w)=φ(v)+φ(w)\varphi(v + w) = \varphi(v) + \varphi(w).

The uniqueness theorem shows that no other rule has all four. The value is also individually rational for superadditive games (φi(v)≥v({i})\varphi_i(v) \ge v(\{i\}), because each marginal contribution of ii is at least v({i})v(\{i\}) there), and it lies in the core of every convex game (Shapley's theorem on convex games).

For a cost game (N,c)(N, c), where c(S)c(S) is the cost of serving SS, the same formula applied to cc gives cost shares that sum to c(N)c(N). The airport game is the standard example.

Computation. With vv given as a table or as an oracle, the subset formula costs 2n−12^{n-1} marginal contributions per player, and the exact value needs exponentially many values of vv in general. For compact inputs the cost depends on the input: it is linear in the size of a marginal contribution net, pseudo-polynomial for a weighted voting game by dynamic programming, and #P-hard for weighted voting games with binary weights (hardness of power indices). Sampling random orders gives an unbiased estimate with a Hoeffding error bound.

Examples and non-examples

A three-player game. Let n=3n = 3, v({1,2})=4v(\{1, 2\}) = 4, v({1,3})=2v(\{1, 3\}) = 2, v(N)=6v(N) = 6, and v(S)=0v(S) = 0 for the other coalitions. The marginal contributions in the six orders are:

order player 1 player 2 player 3
1, 2, 3 0 4 2
1, 3, 2 0 4 2
2, 1, 3 4 0 2
2, 3, 1 6 0 0
3, 1, 2 2 4 0
3, 2, 1 6 0 0
sum 18 12 6

So φ(v)=(3,2,1)\varphi(v) = (3, 2, 1), which sums to v(N)=6v(N) = 6. Each row sums to 6 too: one order alone already divides v(N)v(N), but the rows differ, and only their mean treats the orders alike. The dividends give the same answer faster: d{1,2}=4d_{\{1,2\}} = 4, d{1,3}=2d_{\{1,3\}} = 2 and every other dividend is 0, so v=4u{1,2}+2u{1,3}v = 4u_{\{1,2\}} + 2u_{\{1,3\}}. Player 1 gets 4/2+2/2=34/2 + 2/2 = 3, player 2 gets 22 and player 3 gets 11.

The glove game. Player 1 has a left glove and players 2 and 3 each have a right glove. A pair is worth 1, so v(S)=min⁡(∣S∩{1}∣,∣S∩{2,3}∣)v(S) = \min(|S \cap \{1\}|, |S \cap \{2, 3\}|). Player 1 adds 1 in every order except the two in which it comes first, so φ1=4/6=2/3\varphi_1 = 4/6 = 2/3. By symmetry and efficiency, φ2=φ3=1/6\varphi_2 = \varphi_3 = 1/6. This is the same vector as the Shapley-Shubik index of the weighted voting game [51;50,49,1][51; 50, 49, 1]. The core of the glove game is the single point (1,0,0)(1, 0, 0): if x2>0x_2 > 0, then the coalition {1,3}\{1, 3\} gets less than its worth 1. So the Shapley value is not in the core here. The value rewards the right gloves for their share in the orders, while the core lets the scarce left glove take everything.

Non-example: equal split. The rule ψi(v)=v(N)/n\psi_i(v) = v(N)/n is efficient, symmetric and additive, but it is not the Shapley value. In the three-player game above it gives (2,2,2)(2, 2, 2), and it pays a null player: add a fourth player who adds nothing, and the equal split gives that player 6/46/4.

Non-example: one marginal vector. The marginal vector of one fixed order, for example (0,4,2)(0, 4, 2) for the order 1,2,31, 2, 3, is efficient and additive, and in a convex game it is even in the core. It is not symmetric, so it is not the Shapley value.

The Banzhaf value is a different average. The Banzhaf value of ii is the plain mean of the 2n−12^{n-1} marginal contributions v(S∪{i})−v(S)v(S \cup \{i\}) - v(S) over S⊆N∖{i}S \subseteq N \setminus \{i\}, with no weights. In the three-player game the sums of the marginal contributions are 12, 8 and 4, so the Banzhaf value is (3,2,1)(3, 2, 1), the same as the Shapley value. This is a property of the example: every dividend sits on a pair, and a pair's dividend is split in half by both rules. In general the Banzhaf value is not efficient; see the Banzhaf power index.

  • Shapley-Shubik power index: the Shapley value of a simple game, the fraction of orders in which a player is the pivot.
  • Banzhaf power index: the unweighted mean of the marginal contributions, on simple games.
  • Owen's multilinear extension: the Shapley value is the integral of its gradient along the diagonal of the cube, and the Banzhaf value is its gradient at the center.
  • Core and nucleolus: solution concepts based on the excesses of coalitions. The core can be empty and the nucleolus is always in the core when the core is nonempty; the Shapley value need not be in the core.
  • Convex games: the Shapley value is the center of gravity of the marginal vectors, which are the vertices of the core.
  • Sobol indices: the Shapley effects of sensitivity analysis are the Shapley value of a game whose worth is the variance that a set of inputs explains.
  • Shapley network design game: a strategic game in which the cost of each edge is split by the Shapley value of a simple cost game, in equal shares among its users.

References

  1. Lloyd S. Shapley, A value for n-person games, in H. W. Kuhn and A. W. Tucker (eds.), Contributions to the Theory of Games II, Annals of Mathematics Studies 28, Princeton University Press, 1953, 307-317, the axioms of the value, the formula as an average over orders, and the proof that the value is unique
  2. Lloyd S. Shapley and Martin Shubik, A method for evaluating the distribution of power in a committee system, American Political Science Review 48(3) (1954), 787-792, the value applied to simple games, with the description by orders and pivots
  3. Michael Maschler, Eilon Solan and Shmuel Zamir, Game Theory, Cambridge University Press, 2013, Chapter 18, The Shapley value (Section 18.1 the properties, Section 18.3 the definition and the characterization)
  4. Yoav Shoham and Kevin Leyton-Brown, Multiagent Systems, Algorithmic, Game-Theoretic, and Logical Foundations, Cambridge University Press, 2009, Section 12.2.1, The Shapley value
  5. Georgios Chalkiadakis, Edith Elkind and Michael Wooldridge, Computational Aspects of Cooperative Game Theory, Morgan and Claypool, 2011, Chapter 2, Basic concepts (the Shapley value and the Banzhaf index), and Chapter 3, Representations and algorithms

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/4T207Y/text.yaml