Documentation

CslibFrontier.GameTheory.Bimatrix.ZeroSum

Two-player zero-sum bimatrix games and linear-programming duality #

A two-player bimatrix game G : BimatrixGame M N is zero-sum (BimatrixGame.IsZeroSum) if G.B = -G.A, so the column player's payoff is the negation of the row player's payoff at every outcome (BimatrixGame.zeroSum A = ⟨A, -A⟩; [TV07a], Section 1.4.2, pp. 16–18).

Following [TV07a], Section 1.4.2, p. 17, the row player's maximum guaranteed win is given by the maximin linear program max v subject to x ≥ 0, ∑ i, x i = 1, and ∀ j, v ≤ (x ᵥ* A) j (IsMaximinFeasible, IsMaximinOptimal), while the column player's minimum guaranteed loss is given by the dual minimax linear program min v subject to y ≥ 0, ∑ j, y j = 1, and ∀ i, (A *ᵥ y) i ≤ v (IsMinimaxFeasible, IsMinimaxOptimal).

This module establishes:

Main definitions #

Main results #

References #

def Cslib.GameTheory.BimatrixGame.zeroSum {M : Type u_1} {N : Type u_2} (A : Matrix M N ℝ) :

The two-player zero-sum bimatrix game ⟨A, -A⟩ determined by the row player's payoff matrix A ([TV07a], Section 1.4.2, p. 16).

@[simp]
theorem Cslib.GameTheory.BimatrixGame.zeroSum_A {M : Type u_1} {N : Type u_2} (A : Matrix M N ℝ) :
(zeroSum A).A = A
@[simp]
theorem Cslib.GameTheory.BimatrixGame.zeroSum_B {M : Type u_1} {N : Type u_2} (A : Matrix M N ℝ) :
(zeroSum A).B = -A

A bimatrix game G is zero-sum ([TV07a], Section 1.4.2, p. 16) if G.B = -G.A.

@[simp]
def Cslib.GameTheory.BimatrixGame.IsMaximinFeasible {M : Type u_1} {N : Type u_2} [Fintype M] (A : Matrix M N ℝ) (x : M → ℝ) (v : ℝ) :

(x, v) is feasible for the row player's maximin linear program ([TV07a], Section 1.4.2, p. 17): x is a mixed strategy guaranteeing expected payoff at least v against every pure column j.

def Cslib.GameTheory.BimatrixGame.IsMaximinOptimal {M : Type u_1} {N : Type u_2} [Fintype M] (A : Matrix M N ℝ) (x : M → ℝ) (v : ℝ) :

(x, v) is optimal for the row player's maximin linear program ([TV07a], Section 1.4.2, p. 17): it is feasible and v is at least the value of every maximin-feasible pair.

theorem Cslib.GameTheory.BimatrixGame.IsMaximinFeasible.le_vecMul {M : Type u_1} {N : Type u_2} [Fintype M] {A : Matrix M N ℝ} {x : M → ℝ} {v : ℝ} (hx : IsMaximinFeasible A x v) (j : N) :
theorem Cslib.GameTheory.BimatrixGame.IsMaximinOptimal.isMaximinFeasible {M : Type u_1} {N : Type u_2} [Fintype M] {A : Matrix M N ℝ} {x : M → ℝ} {v : ℝ} (hx : IsMaximinOptimal A x v) :
def Cslib.GameTheory.BimatrixGame.IsMinimaxFeasible {M : Type u_1} {N : Type u_2} [Fintype N] (A : Matrix M N ℝ) (y : N → ℝ) (v : ℝ) :

(y, v) is feasible for the column player's minimax linear program ([TV07a], Section 1.4.2, p. 17): y is a mixed strategy holding every pure row i to expected payoff at most v.

def Cslib.GameTheory.BimatrixGame.IsMinimaxOptimal {M : Type u_1} {N : Type u_2} [Fintype N] (A : Matrix M N ℝ) (y : N → ℝ) (v : ℝ) :

(y, v) is optimal for the column player's minimax linear program ([TV07a], Section 1.4.2, p. 17): it is feasible and v is at most the value of every minimax-feasible pair.

theorem Cslib.GameTheory.BimatrixGame.IsMinimaxFeasible.mulVec_le {M : Type u_1} {N : Type u_2} [Fintype N] {A : Matrix M N ℝ} {y : N → ℝ} {v : ℝ} (hy : IsMinimaxFeasible A y v) (i : M) :
A.mulVec y i ≤ v
theorem Cslib.GameTheory.BimatrixGame.IsMinimaxOptimal.isMinimaxFeasible {M : Type u_1} {N : Type u_2} [Fintype N] {A : Matrix M N ℝ} {y : N → ℝ} {v : ℝ} (hy : IsMinimaxOptimal A y v) :
theorem Cslib.GameTheory.BimatrixGame.IsZeroSum.payoff₂_eq_neg_payoff₁ {M : Type u_1} {N : Type u_2} [Fintype M] [Fintype N] {G : BimatrixGame M N} (hG : G.IsZeroSum) (x : M → ℝ) (y : N → ℝ) :
G.payoff₂ x y = -G.payoff₁ x y

In a zero-sum game, player 2's expected payoff is the negation of player 1's expected payoff.

@[simp]
theorem Cslib.GameTheory.BimatrixGame.payoff₂_zeroSum {M : Type u_1} {N : Type u_2} [Fintype M] [Fintype N] (A : Matrix M N ℝ) (x : M → ℝ) (y : N → ℝ) :
theorem Cslib.GameTheory.BimatrixGame.IsMaximinFeasible.le_payoff₁ {M : Type u_1} {N : Type u_2} [Fintype M] [Fintype N] {A : Matrix M N ℝ} {x : M → ℝ} {v : ℝ} (hx : IsMaximinFeasible A x v) {y : N → ℝ} (hy : IsMixedStrategy y) :

Against any mixed column strategy y, a maximin-feasible row strategy (x, v) earns expected payoff at least v.

theorem Cslib.GameTheory.BimatrixGame.IsMinimaxFeasible.payoff₁_le {M : Type u_1} {N : Type u_2} [Fintype M] [Fintype N] {A : Matrix M N ℝ} {y : N → ℝ} {v : ℝ} (hy : IsMinimaxFeasible A y v) {x : M → ℝ} (hx : IsMixedStrategy x) :

Against any mixed row strategy x, a minimax-feasible column strategy (y, v) holds player 1's expected payoff to at most v.

theorem Cslib.GameTheory.BimatrixGame.IsMaximinFeasible.le_of_isMinimaxFeasible {M : Type u_1} {N : Type u_2} [Fintype M] [Fintype N] {A : Matrix M N ℝ} {x : M → ℝ} {y : N → ℝ} {v₁ v₂ : ℝ} (hx : IsMaximinFeasible A x v₁) (hy : IsMinimaxFeasible A y v₂) :
v₁ ≤ v₂

Weak LP duality for zero-sum matrix games ([TV07a], Section 1.4.2, p. 17): every maximin-feasible value v₁ is at most every minimax-feasible value v₂.

theorem Cslib.GameTheory.BimatrixGame.isMaximinOptimal_and_isMinimaxOptimal_of_feasible {M : Type u_1} {N : Type u_2} [Fintype M] [Fintype N] {A : Matrix M N ℝ} {x : M → ℝ} {y : N → ℝ} {v : ℝ} (hx : IsMaximinFeasible A x v) (hy : IsMinimaxFeasible A y v) :

Maximin-feasible and minimax-feasible solutions attaining the same value v are both optimal.

theorem Cslib.GameTheory.BimatrixGame.isMinimaxValue_transpose_iff {M : Type u_1} {N : Type u_2} [Fintype M] [Fintype N] (A : Matrix M N ℝ) (v : ℝ) :
Probability.IsMinimaxValue A.transpose v ↔ (∃ (x : M → ℝ), IsMaximinOptimal A x v) ∧ ∃ (y : N → ℝ), IsMinimaxOptimal A y v

Bridge to Cslib.Probability.IsMinimaxValue: v is the minimax value of the transposed loss table Aᵀ (where the first player chooses j : N paying A i j and the second chooses i : M collecting A i j) iff v is simultaneously attained by maximin-optimal and minimax-optimal strategies.

theorem Cslib.GameTheory.BimatrixGame.exists_isMaximinOptimal_and_isMinimaxOptimal {M : Type u_1} {N : Type u_2} [Fintype M] [Fintype N] [Nonempty M] [Nonempty N] (A : Matrix M N ℝ) :
∃ (x : M → ℝ) (y : N → ℝ) (v : ℝ), IsMaximinOptimal A x v ∧ IsMinimaxOptimal A y v

Strong LP duality / minimax existence for zero-sum matrix games ([TV07a], Section 1.4.2, pp. 17–18; [vN28]): every finite nonempty zero-sum matrix game admits optimal primal and dual strategies (x, y) sharing a common optimal value v.

theorem Cslib.GameTheory.BimatrixGame.eq_of_isMaximinOptimal_of_isMinimaxOptimal {M : Type u_1} {N : Type u_2} [Fintype M] [Fintype N] {A : Matrix M N ℝ} {x : M → ℝ} {y : N → ℝ} {v₁ v₂ : ℝ} (hx : IsMaximinOptimal A x v₁) (hy : IsMinimaxOptimal A y v₂) :
v₁ = v₂

Strong LP duality for optimal values ([TV07a], Section 1.4.2, pp. 17–18): if (x, v₁) is maximin-optimal and (y, v₂) is minimax-optimal, then v₁ = v₂.

theorem Cslib.GameTheory.BimatrixGame.payoff₁_zeroSum_eq_of_lpOptimal {M : Type u_1} {N : Type u_2} [Fintype M] [Fintype N] {A : Matrix M N ℝ} {x : M → ℝ} {y : N → ℝ} {v₁ v₂ : ℝ} (hx : IsMaximinOptimal A x v₁) (hy : IsMinimaxOptimal A y v₂) :
(zeroSum A).payoff₁ x y = v₁

At any pair of maximin-optimal (x, v₁) and minimax-optimal (y, v₂) solutions, player 1's expected payoff (zeroSum A).payoff₁ x y equals the maximin optimum v₁.

theorem Cslib.GameTheory.BimatrixGame.isNash_zeroSum_of_lpOptimal {M : Type u_1} {N : Type u_2} [Fintype M] [Fintype N] {A : Matrix M N ℝ} {x : M → ℝ} {y : N → ℝ} {v₁ v₂ : ℝ} (hx : IsMaximinOptimal A x v₁) (hy : IsMinimaxOptimal A y v₂) :
(zeroSum A).IsNash x y

Optimal LP solutions form a Nash equilibrium ([TV07a], Theorem 1.11, pp. 17–18): if (x, v₁) is optimal for the row player's maximin LP and (y, v₂) is optimal for the column player's minimax LP, then (x, y) is a Nash equilibrium of zeroSum A.

Every Nash equilibrium (x, y) of zeroSum A is a primal-dual optimal pair at the equilibrium payoff (zeroSum A).payoff₁ x y ([TV07a], Section 1.4.2, pp. 17–18).

theorem Cslib.GameTheory.BimatrixGame.isNash_zeroSum_iff_lpOptimal {M : Type u_1} {N : Type u_2} [Fintype M] [Fintype N] {A : Matrix M N ℝ} {x : M → ℝ} {y : N → ℝ} :
(zeroSum A).IsNash x y ↔ ∃ (v : ℝ), IsMaximinOptimal A x v ∧ IsMinimaxOptimal A y v

Primal-dual LP characterization of zero-sum Nash equilibria ([TV07a], Section 1.4.2 and Theorem 1.11, pp. 17–18): (x, y) is a Nash equilibrium of zeroSum A iff there is a value v at which x is maximin-optimal and y is minimax-optimal.

theorem Cslib.GameTheory.BimatrixGame.IsZeroSum.isNash_iff_payoff₁ {M : Type u_1} {N : Type u_2} [Fintype M] [Fintype N] {G : BimatrixGame M N} (hG : G.IsZeroSum) {x : M → ℝ} {y : N → ℝ} :

LP characterization of Nash equilibria for any zero-sum bimatrix game (G.B = -G.A).

theorem Cslib.GameTheory.BimatrixGame.IsZeroSum.isNash_iff {M : Type u_1} {N : Type u_2} [Fintype M] [Fintype N] {G : BimatrixGame M N} (hG : G.IsZeroSum) {x : M → ℝ} {y : N → ℝ} :
G.IsNash x y ↔ ∃ (v : ℝ), IsMaximinOptimal G.A x v ∧ IsMinimaxOptimal G.A y v

Existential LP characterization of Nash equilibria for any zero-sum bimatrix game.

Structural properties of zero-sum Nash equilibria #

theorem Cslib.GameTheory.BimatrixGame.IsZeroSum.isNash_exchange {M : Type u_1} {N : Type u_2} [Fintype M] [Fintype N] {G : BimatrixGame M N} (hG : G.IsZeroSum) {x₁ x₂ : M → ℝ} {y₁ y₂ : N → ℝ} (h₁ : G.IsNash x₁ y₁) (h₂ : G.IsNash x₂ y₂) :
G.IsNash x₁ y₂

Equilibrium exchangeability: in a zero-sum bimatrix game, if (x₁, y₁) and (x₂, y₂) are Nash equilibria, then (x₁, y₂) is also a Nash equilibrium.

theorem Cslib.GameTheory.BimatrixGame.IsZeroSum.payoff₁_eq_of_isNash {M : Type u_1} {N : Type u_2} [Fintype M] [Fintype N] {G : BimatrixGame M N} (hG : G.IsZeroSum) {x₁ x₂ : M → ℝ} {y₁ y₂ : N → ℝ} (h₁ : G.IsNash x₁ y₁) (h₂ : G.IsNash x₂ y₂) :
G.payoff₁ x₁ y₁ = G.payoff₁ x₂ y₂

Unique equilibrium value: all Nash equilibria of a zero-sum bimatrix game yield the same expected payoff to player 1.

theorem Cslib.GameTheory.BimatrixGame.IsZeroSum.convex_isNash {M : Type u_1} {N : Type u_2} [Fintype M] [Fintype N] {G : BimatrixGame M N} (hG : G.IsZeroSum) :
Convex ℝ {p : (M → ℝ) × (N → ℝ) | G.IsNash p.1 p.2}

Convexity of Nash equilibria: in a zero-sum bimatrix game, the set of Nash equilibria is convex in (M → ℝ) × (N → ℝ).