In cooperative game theory, the Shapley value is a method (solution concept) for fairly distributing the total gains or costs among a group of players who have collaborated. For example, in a team project where each member contributed differently, the Shapley value provides a way to determine how much credit or blame each member deserves. It was named in honor of Lloyd Shapley, who introduced it in 1951. The Shapley value determines each player's contribution by considering how much the overall outcome changes when they join each possible combination of other players, and then averaging those changes. In essence, it calculates each player's average marginal contribution across all possible coalitions. It is the only solution that satisfies four fundamental properties: efficiency, symmetry, additivity, and the dummy player (or null player) property, which are widely accepted as defining a fair distribution.
This method is used in many fields, from dividing profits in business partnerships to understanding feature importance in machine learning.
Definition Suppose we have a situation where players can win certain rewards by cooperating (forming a coalition) to accomplish a task; such situations are often called coalitional games. For a coalition (set of players) S, we define the payoff or value function v(S) as the total sum of payoffs that the members of S can obtain by cooperating. The Shapley value is one way to divide up the value created by a coalition between its members. It is a "fair" distribution in the sense that it is the only distribution with certain desirable properties (listed below). According to the Shapley value, the amount that player i is given in a coalitional game (v,N) is
φi(v)=∑S⊆N∖{i}|S|!(n−|S|−1)!n!(v(S∪{i})−v(S)) =1n∑S⊆N∖{i}(n−1|S|)−1(v(S∪{i})−v(S)) where n is the total number of players and the sum extends over all subsets S of N not containing player i, including the empty set. Also note that (nk) is the binomial coefficient. The formula can be interpreted as follows: imagine the coalition is formed one actor at a time, with each actor demanding their contribution v(S∪{i})−v(S) as a fair compensation, and then for each actor take the average of this contribution over the possible different permutations in which the coalition can be formed. An alternative, equivalent formula for the Shapley value is:
φi(v)=1n!∑R[v(PiR∪{i})−v(PiR)] where the sum ranges over all n! orders R of the players and PiR is the set of players in N which precede i in the order R.
In terms of synergy
From the characteristic function v one can compute the synergy (Harsanyi dividend) that each group of players provides. The synergy is the unique function w:2N→ℝ, such that
v(S)=∑R⊆Sw(R) for any subset S⊆N of players. In other words, the 'total value' of the coalition S comes from summing up the synergies of each possible subset of S. Given a characteristic function v, the synergy function w is calculated via
w(S)=∑R⊆S(−1)|S|−|R|v(R) using the Inclusion exclusion principle. The Shapley values are given in terms of the synergy function by
φi(v)=∑i∈S⊆Nw(S)|S| where the sum is over all subsets S of N that include player i. This can be interpreted as
φi(v)=∑coalitions including isynergy of the coalitionnumber of members in the coalition In other words, the synergy of each coalition is divided equally between all members. This can be interpreted visually with a Venn diagram. In the first example diagram above, each region has been labeled with the synergy bonus of the corresponding coalition. The total value produced by a coalition is the sum of synergy bonuses of the composing subcoalitions - in the example, the coalition of the players labeled "You" and "Emma" would produce a profit of 30+20+40=90 dollars, as compared to their individual profits of 30 and 20 dollars respectively. The synergies are then split equally among each member of the subcoalition that contributes that synergy - as displayed in the second diagram.
Examples
Business example Consider a simplified description of a business. An owner, o, provides crucial capital in the sense that, without him/her, no gains can be obtained. There are m workers w1,...,wm, each of whom contributes an amount p to the total profit. Let
N={o,w1,…,wm}. The value function for this coalitional game is
v(S)={(|S|−1)pif o∈S,0otherwise. Computing the Shapley value for this coalition game leads to a value of mp/2 for the owner and p/2 for each one of the m workers. This can be understood from the perspective of synergy. The synergy function w is
w(S)={p,if S={o,wi}0,otherwise so the only coalitions that generate synergy are one-to-one between the owner and any individual worker. Using the above formula for the Shapley value in terms of w we compute
φwi=w({o,wi})2=p2 and
φo=∑i=1mw({o,wi})2=mp2 The result can also be understood from the perspective of averaging over all orders. A given worker joins the coalition after the owner (and therefore contributes p) in half of the orders and thus makes an average contribution of p2 upon joining. When the owner joins, on average half the workers have already joined, so the owner's average contribution upon joining is mp2.
Glove game The glove game is a coalitional game where the players have left- and right-hand gloves and the goal is to form pairs. Let
N={1,2,3}, where players 1 and 2 have right-hand gloves and player 3 has a left-hand glove. The value function for this coalitional game is
v(S)={1if S∈{{1,3},{2,3},{1,2,3}};0otherwise. The formula for calculating the Shapley value is
φi(v)=1|N|!∑R[v(PiR∪{i})−v(PiR)], where R is an ordering of the players and PiR is the set of players in N which precede i in the order R. The following table displays the marginal contributions of Player 1.
Order RMC11,2,3v({1})−v(∅)=0−0=01,3,2v({1})−v(∅)=0−0=02,1,3v({1,2})−v({2})=0−0=02,3,1v({1,2,3})−v({2,3})=1−1=03,1,2v({1,3})−v({3})=1−0=13,2,1v({1,3,2})−v({3,2})=1−1=0 Observe
φ1(v)=(16)(1)=16. By a symmetry argument it can be shown that
φ2(v)=φ1(v)=16. Due to the efficiency axiom, the sum of all the Shapley values is equal to 1, which means that
φ3(v)=46=23.
Properties The Shapley value has many desirable properties, including satisfying the four properties of efficiency, symmetry, linearity and null player (or dummy player).
Efficiency The sum of the Shapley values of all agents equals the value of the grand coalition, so that all the gain is distributed among the agents:
… excerpt ends here. Continue reading the full article.



