tucoopy.games.production¶
Production games.¶
In a (linear) production game, players own resources and coalitions can pool their resources to produce output that is valued by fixed prices.
This implementation uses a simplified linear model where the coalition worth is the total market value of the pooled resources:
\[ v(S) = \sum_{k} p_k \left(\sum_{i \in S} r_{i,k}\right), \]
where \(r_{i,k}\) is the amount of resource \(k\) owned by player \(i\).
Examples:
>>> from tucoopy.games.production import production_game
>>> g = production_game(resources=[[1, 0], [0, 2]], prices=[10, 5])
>>> g.value(0b11)
20.0
production_game ¶
production_game(resources, prices, *, player_labels=None)
Generate a production game.
Players own resources, and coalitions can combine resources to produce goods with given prices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resources | Sequence[Sequence[float]] | resources[i][k] = amount of resource k owned by player i. | required |
prices | Sequence[float] | Price per unit of each resource. | required |
player_labels | list[str] | None | Optional labels. | None |
Returns:
| Type | Description |
|---|---|
Game | Production cooperative game. |
Notes
- Coalition value is total market value of combined resources.
- This is a simplified linear production model.
Examples:
>>> from tucoopy.games.production import production_game
>>> g = production_game(resources=[[1, 0], [0, 2]], prices=[10, 5])
>>> g.value(0b01) # player 0 alone
10.0
>>> g.value(0b11) # pooled
20.0