Documentation

CslibFrontier.GameTheory.Polymatrix.Basic

Polymatrix games and pairwise potential characterizations #

In a polymatrix game ([Jan68]; [How72]), players i : ι interact pairwise: for each ordered pair of distinct players i ≠ j, a cost matrix edgeCost i j : S i → S j → ℝ gives the pairwise cost incurred by i against j, and player i's total cost at profile s is ∑ j ∈ univ.erase i, edgeCost i j (s i) (s j) (PolymatrixGame.toCostGame). Two-player BimatrixGames are the Bool-indexed special case (PolymatrixGame.ofBimatrixGame).

Under independent mixed strategies p, expectations factor into pairwise bilinear forms (deviationCost_toCostGame, expectedCost_toCostGame), characterizing mixed Nash equilibria of polymatrix games purely through pairwise matrix-vector inequalities (isMixedNash_toCostGame_iff, [Jan68]; [How72]).

When pairwise interaction matrices are symmetric (PolymatrixGame.IsSymmetric: edgeCost i j a b = edgeCost j i b a for i ≠ j), half the social cost edgePotential P s = (1 / 2) * ∑ i, ∑ j ∈ univ.erase i, edgeCost i j (s i) (s j) is an exact potential (IsSymmetric.isExactPotential_edgePotential). Consequently every finite symmetric polymatrix game has the finite improvement property and—by the potential function method ([TW07], Theorem 19.13)—has price of stability 1, admitting a pure Nash equilibrium that globally minimizes social cost (IsSymmetric.exists_isPureNash_socialCost_le).

More generally, applying Monderer and Shapley's four-cycle curl-zero criterion (CostGame.exists_isExactPotential_iff_fourCycleZero, [MS96], Corollary 2.9, p. 131), a polymatrix game with nonempty strategy sets admits an exact potential if and only if every pair i ≠ j satisfies cross-difference symmetry (PolymatrixGame.IsPairwisePotential), if and only if every skew-symmetric edge difference edgeCost i j a b - edgeCost j i b a separates additively as u i j a + v i j b (PolymatrixGame.IsSeparableSkew). Under baseline zero normalization at a reference profile z, exact potentiality is equivalent to IsSymmetric (isSymmetric_iff_exists_isExactPotential_of_zero_at_base).

Main definitions #

Main results #

References #

structure Cslib.GameTheory.PolymatrixGame (ι : Type u_1) (S : ι → Type u_2) :
Type (max u_1 u_2)

A polymatrix game on player set ι with strategy sets S : ι → Type* ([Jan68]; [How72]): for each ordered pair (i, j) of distinct players, edgeCost i j is the pairwise cost matrix paid by player i when interacting with player j. Diagonal entries edgeCost i i are ignored by toCostGame.

  • edgeCost (i j : ι) : S i → S j → ℝ

    Pairwise interaction cost edgeCost i j a b paid by player i playing a against j playing b.

def Cslib.GameTheory.PolymatrixGame.toCostGame {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] (P : PolymatrixGame ι S) :

The normal-form CostGame induced by a polymatrix game: player i pays the sum of its pairwise interaction costs over all other players j ≠ i.

@[simp]
theorem Cslib.GameTheory.PolymatrixGame.toCostGame_cost {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] (P : PolymatrixGame ι S) (i : ι) (s : (k : ι) → S k) :
P.toCostGame.cost i s = ∑ j ∈ Finset.univ.erase i, P.edgeCost i j (s i) (s j)

Embeds a two-player BimatrixGame M N (in payoff form) as a Bool-indexed PolymatrixGame (in cost form).

@[simp]

The cost game of ofBimatrixGame G agrees identically with BimatrixGame.toCostGame G.

Bilinear mixed-strategy expectations and mixed Nash characterization #

theorem Cslib.GameTheory.PolymatrixGame.deviationCost_toCostGame {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (P : PolymatrixGame ι S) {p : (i : ι) → S i → ℝ} (hp : ∀ (k : ι), ∑ c : S k, p k c = 1) (i : ι) (a : S i) :
P.toCostGame.deviationCost p i a = ∑ j ∈ Finset.univ.erase i, ∑ b : S j, p j b * P.edgeCost i j a b

In a polymatrix game, player i's unilateral expected cost deviationCost against a product of probability vectors p decomposes into the sum of pairwise matrix-vector products over j ≠ i ([Jan68]; [How72]).

theorem Cslib.GameTheory.PolymatrixGame.expectedCost_toCostGame {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (P : PolymatrixGame ι S) {p : (i : ι) → S i → ℝ} (hp : ∀ (k : ι), ∑ c : S k, p k c = 1) (i : ι) :
P.toCostGame.expectedCost p i = ∑ j ∈ Finset.univ.erase i, ∑ a : S i, ∑ b : S j, p i a * (p j b * P.edgeCost i j a b)

Player i's expected cost in P.toCostGame is the sum of pairwise bilinear forms ∑_{j ≠ i} p_iᵀ A_{ij} p_j.

theorem Cslib.GameTheory.PolymatrixGame.isMixedNash_toCostGame_iff {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (S i)] (P : PolymatrixGame ι S) {p : (i : ι) → S i → ℝ} :
P.toCostGame.IsMixedNash p ↔ (∀ (i : ι), IsMixedStrategy (p i)) ∧ ∀ (i : ι) (a' : S i), ∑ j ∈ Finset.univ.erase i, ∑ a : S i, ∑ b : S j, p i a * (p j b * P.edgeCost i j a b) ≤ ∑ j ∈ Finset.univ.erase i, ∑ b : S j, p j b * P.edgeCost i j a' b

Pairwise bilinear characterization of mixed Nash equilibria in a polymatrix game ([Jan68]; [How72]).

Symmetric polymatrix games, exact edge potential, and price of stability #

def Cslib.GameTheory.PolymatrixGame.IsSymmetric {ι : Type u_1} {S : ι → Type u_2} (P : PolymatrixGame ι S) :

A polymatrix game is pairwise symmetric (a pairwise coordination / undirected edge game) if edgeCost i j a b = edgeCost j i b a for all i ≠ j.

def Cslib.GameTheory.PolymatrixGame.skewEdge {ι : Type u_1} {S : ι → Type u_2} (P : PolymatrixGame ι S) (i j : ι) (a : S i) (b : S j) :

Skew-symmetric part edgeCost i j a b - edgeCost j i b a of a directed polymatrix interaction pair (i, j).

Pairwise cross-difference vanishing: for each pair i ≠ j, the 2 × 2 cross-difference of skewEdge P i j vanishes on every strategy rectangle (xᵢ, yᵢ) × (xⱼ, yⱼ).

P has separable skew-symmetry if for every i ≠ j, edgeCost i j a b - edgeCost j i b a splits additively into a self-action term u i j a and a dummy opponent-action term v i j b.

With nonempty strategy sets, pairwise cross-difference vanishing is equivalent to additive row-plus-column separability of skewEdge.

noncomputable def Cslib.GameTheory.PolymatrixGame.edgePotential {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] (P : PolymatrixGame ι S) (s : (i : ι) → S i) :

Quadratic edge potential (1 / 2) * ∑ i, ∑ j ≠ i, edgeCost i j (s i) (s j) of a symmetric polymatrix game (half the social cost, counting each undirected pair {i, j} once).

theorem Cslib.GameTheory.PolymatrixGame.edgePotential_def {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] (P : PolymatrixGame ι S) (s : (i : ι) → S i) :
P.edgePotential s = 1 / 2 * ∑ i : ι, ∑ j ∈ Finset.univ.erase i, P.edgeCost i j (s i) (s j)
theorem Cslib.GameTheory.PolymatrixGame.socialCost_eq_two_mul_edgePotential {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] (P : PolymatrixGame ι S) (s : (i : ι) → S i) :

The social cost of a polymatrix game is twice edgePotential.

Symmetric polymatrix games are exact potential games: when P.IsSymmetric, P.edgePotential is an exact potential for P.toCostGame.

theorem Cslib.GameTheory.PolymatrixGame.IsSymmetric.hasFIP {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [∀ (i : ι), Finite (S i)] {P : PolymatrixGame ι S} (h : P.IsSymmetric) :

Every finite symmetric polymatrix game has the finite improvement property.

theorem Cslib.GameTheory.PolymatrixGame.IsSymmetric.exists_isPureNash_socialCost_le {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [∀ (i : ι), Finite (S i)] [∀ (i : ι), Nonempty (S i)] {P : PolymatrixGame ι S} (h : P.IsSymmetric) :
∃ (s : (i : ι) → S i), P.toCostGame.IsPureNash s ∧ ∀ (s' : (i : ι) → S i), P.toCostGame.socialCost s ≤ P.toCostGame.socialCost s'

Price of stability 1 for symmetric polymatrix games (via [TW07], Theorem 19.13): every finite symmetric polymatrix game with nonempty strategy sets admits a pure Nash equilibrium that globally minimizes socialCost.

theorem Cslib.GameTheory.PolymatrixGame.fourCycle_toCostGame_eq {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] (P : PolymatrixGame ι S) {i j : ι} (hij : i ≠ j) (s : (k : ι) → S k) (xᵢ yᵢ : S i) (xⱼ yⱼ : S j) :
have A := Function.update (Function.update s i xᵢ) j xⱼ; have B := Function.update (Function.update s i yᵢ) j xⱼ; have C := Function.update (Function.update s i yᵢ) j yⱼ; have D := Function.update (Function.update s i xᵢ) j yⱼ; P.toCostGame.cost i B - P.toCostGame.cost i A + (P.toCostGame.cost j C - P.toCostGame.cost j B) + (P.toCostGame.cost i D - P.toCostGame.cost i C) + (P.toCostGame.cost j A - P.toCostGame.cost j D) = P.skewEdge i j yᵢ xⱼ - P.skewEdge i j xᵢ xⱼ + (P.skewEdge i j xᵢ yⱼ - P.skewEdge i j yᵢ yⱼ)

In a polymatrix game, Monderer and Shapley's four-cycle sum on players i ≠ j collapses to the 2 × 2 cross-difference of skewEdge P i j (all third-player edges k ∉ {i, j} cancel).

theorem Cslib.GameTheory.PolymatrixGame.exists_isExactPotential_toCostGame_iff_isPairwisePotential {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [∀ (k : ι), Nonempty (S k)] {P : PolymatrixGame ι S} :
(∃ (Φ : ((i : ι) → S i) → ℝ), P.toCostGame.IsExactPotential Φ) ↔ P.IsPairwisePotential

Exact-potential characterization of polymatrix games (via [MS96], Corollary 2.9, p. 131): a polymatrix game with nonempty strategy sets admits an exact potential if and only if every pair of distinct players satisfies cross-difference vanishing (IsPairwisePotential).

theorem Cslib.GameTheory.PolymatrixGame.exists_isExactPotential_toCostGame_iff_isSeparableSkew {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] [∀ (k : ι), Nonempty (S k)] {P : PolymatrixGame ι S} :
(∃ (Φ : ((i : ι) → S i) → ℝ), P.toCostGame.IsExactPotential Φ) ↔ P.IsSeparableSkew

Separable skew-symmetry characterization of exact-potential polymatrix games: a polymatrix game with nonempty strategy sets admits an exact potential if and only if each skew-symmetric edge difference edgeCost i j a b - edgeCost j i b a (i ≠ j) separates as u i j a + v i j b.

theorem Cslib.GameTheory.PolymatrixGame.isSymmetric_iff_exists_isExactPotential_of_zero_at_base {ι : Type u_1} {S : ι → Type u_2} [Fintype ι] [DecidableEq ι] {P : PolymatrixGame ι S} (z : (k : ι) → S k) (hzero : ∀ ⦃i j : ι⦄, i ≠ j → (∀ (b : S j), P.edgeCost i j (z i) b = 0) ∧ ∀ (a : S i), P.edgeCost i j a (z j) = 0) :
P.IsSymmetric ↔ ∃ (Φ : ((i : ι) → S i) → ℝ), P.toCostGame.IsExactPotential Φ

Under baseline zero normalization at a reference profile z (edgeCost i j (z i) b = 0 and edgeCost i j a (z j) = 0 for all i ≠ j), a polymatrix game admits an exact potential if and only if it is pairwise symmetric (P.IsSymmetric).