Calculator Inputs
Use the responsive form below. Large screens show three columns, smaller screens show two, and mobile uses one column.
Required Coalition Checklist
This helper table shows every coalition you need to define for the chosen players.
Example Data Table
This example uses three players and a characteristic function with seven non-empty coalitions.
| Coalition | Example Value | Interpretation |
|---|---|---|
| A | 20 | Player A working alone. |
| B | 30 | Player B working alone. |
| C | 25 | Player C working alone. |
| A,B | 70 | Joint value created by players A and B. |
| A,C | 65 | Joint value created by players A and C. |
| B,C | 80 | Joint value created by players B and C. |
| A,B,C | 120 | Grand coalition value shared using Shapley allocation. |
Formula Used
Shapley Value Formula
φᵢ(v) = Σ [ |S|! (n - |S| - 1)! / n! ] × [ v(S ∪ {i}) - v(S) ]
Where:
- φᵢ(v) is the Shapley value for player i.
- S is any subset of players that excludes player i.
- v(S) is the value of coalition S.
- v(S ∪ {i}) - v(S) is player i’s marginal contribution.
- The factorial weight averages that contribution across all joining orders.
This calculator evaluates every subset, applies the standard combinational weight, sums the weighted marginal contributions, and reports the allocation for each player.
How to Use This Calculator
- Select the number of players, from 2 to 6.
- Enter player names in the same order you want shown in outputs.
- Optionally adjust the value label and decimal precision.
- Enter every non-empty coalition on a new line using coalition=value.
- Click Generate Coalition Checklist if you want a complete entry guide.
- Press Calculate Shapley Value to show results above the form.
- Review the player allocation table, efficiency summary, coalition audit, and Plotly graph.
- Download the result set in CSV or PDF format when needed.
FAQs
1. What does the Shapley value measure?
It measures the average contribution a player makes across every possible coalition order. The method allocates total value fairly by considering all marginal gains.
2. Why must I enter all non-empty coalitions?
The formula compares a player’s contribution against every subset that excludes them. Missing coalition values break that comparison and prevent accurate allocation.
3. Why is the empty coalition not required?
In standard cooperative game setup, the empty coalition value is usually defined as zero. This calculator assumes that default automatically.
4. What if the sum of Shapley values differs from the total?
A non-zero efficiency gap usually means data entry issues, inconsistent coalition values, or numerical rounding. The Shapley method should normally match the grand coalition value.
5. Can this calculator handle negative values?
Yes. Coalition values can be negative, positive, or mixed. The calculator still computes each player’s weighted marginal contribution correctly.
6. Why is there a six-player limit?
The number of coalitions doubles with each added player. Six players already require 63 non-empty coalition entries, which is practical for a single-page calculator.
7. What does average marginal contribution show?
It shows the simple mean of a player’s marginal gains across all subsets. It complements the Shapley value, which uses factorial weights instead of plain averaging.
8. When should I use Shapley allocation?
Use it when a group jointly creates value and you need a transparent way to divide that outcome fairly among participants, teams, channels, or models.