Documentation

CslibFrontier.GameTheory.Extensive.SequenceFormLP

Two-player sequence-form equilibria, best-response LP duality, and zero-sum games #

This module develops two-player equilibrium and linear-programming theory in sequence form for extensive-form games with perfect recall ([vS07], Sections 3.10–3.11):

Main definitions #

Main results #

References #

theorem Cslib.GameTheory.Extensive.exists_seqMat_transpose_mulVec_ge {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [∀ (j : ι) (h : H j), Finite (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} [Fintype (H i)] (hpr : T.PerfectRecall i) (b : SeqVar T i → ℝ) :
∃ (p : Option { h : H i // T.OccursInfoSet i h } → ℝ), b ≤ (seqMat T i).transpose.mulVec p

Under perfect recall, every objective b : SeqVar T i → ℝ admits a dual multiplier vector p satisfying b ≤ (seqMat T i)ᵀ *ᵥ p ([vS07], Section 3.10).

@[simp]
theorem Cslib.GameTheory.Extensive.seqRhs_dotProduct {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (T : ExtensiveTree ι H Act) (i : ι) [Fintype { h : H i // T.OccursInfoSet i h }] (q : Option { h : H i // T.OccursInfoSet i h } → ℝ) :
@[simp]
theorem Cslib.GameTheory.Extensive.dotProduct_seqRhs {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (T : ExtensiveTree ι H Act) (i : ι) [Fintype { h : H i // T.OccursInfoSet i h }] (q : Option { h : H i // T.OccursInfoSet i h } → ℝ) :
theorem Cslib.GameTheory.Extensive.exists_isGreatest_isLeast_seqLP {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(j : ι) → (h : H j) → Fintype (Act j h)] [∀ (j : ι) (h : H j), Nonempty (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} [Fintype (H i)] (hpr : T.PerfectRecall i) (b : SeqVar T i → ℝ) :
∃ (v : ℝ), IsGreatest ((fun (x : SeqVar T i → ℝ) => b ⬝ᵥ x) '' {x : SeqVar T i → ℝ | T.IsRealizationPlan i x}) v ∧ IsLeast ((fun (x : Option { h : H i // T.OccursInfoSet i h } → ℝ) => seqRhs T i ⬝ᵥ x) '' {q : Option { h : H i // T.OccursInfoSet i h } → ℝ | b ≤ (seqMat T i).transpose.mulVec q}) v

Sequence-form linear programming strong duality ([vS07], Section 3.11, p. 73): under perfect recall, maximizing b ⬝ᵥ x over T.IsRealizationPlan i x and minimizing seqRhs T i ⬝ᵥ q (= q none) over dual multipliers b ≤ (seqMat T i)ᵀ *ᵥ q attain equal optima.

def Cslib.GameTheory.Extensive.ExtensiveTree.IsBehaviorNash {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] [(i : ι) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree ι H Act) (β : (i : ι) → (h : H i) → Act i h → ℝ) :

A behavioral strategy profile β is a behavioral Nash equilibrium if every player plays a valid behavior strategy and no unilateral deviation to another behavior strategy strictly increases expected payoff.

theorem Cslib.GameTheory.Extensive.exists_isBehaviorNash {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Finite ι] [DecidableEq ι] [∀ (i : ι), Finite (H i)] [(i : ι) → (h : H i) → Fintype (Act i h)] [∀ (i : ι) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree ι H Act} (hpr : ∀ (i : ι), T.PerfectRecall i) :
∃ (β : (i : ι) → (h : H i) → Act i h → ℝ), T.IsBehaviorNash β

Existence of a behavioral Nash equilibrium in any finite extensive game with perfect recall (via Nash's theorem on T.toCostGame and Kuhn's theorem).

noncomputable def Cslib.GameTheory.Extensive.ExtensiveTree.IsSeqBestResponseFalse {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree Bool H Act) (x : SeqVar T false → ℝ) (y : SeqVar T true → ℝ) :

x is a sequence-form best response for player false to player true's strategy y.

noncomputable def Cslib.GameTheory.Extensive.ExtensiveTree.IsSeqBestResponseTrue {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree Bool H Act) (y : SeqVar T true → ℝ) (x : SeqVar T false → ℝ) :

y is a sequence-form best response for player true to player false's strategy x.

noncomputable def Cslib.GameTheory.Extensive.ExtensiveTree.IsSeqNash {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree Bool H Act) (x : SeqVar T false → ℝ) (y : SeqVar T true → ℝ) :

A pair (x, y) of realization plans is a sequence-form Nash equilibrium ([vS07], Sections 3.10–3.11) if each plan maximizes its bilinear payoff against the other.

theorem Cslib.GameTheory.Extensive.isSeqBestResponseFalse_iff_dual {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Fintype (H false)] (hpr : T.PerfectRecall false) (x : SeqVar T false → ℝ) (y : SeqVar T true → ℝ) :

Complementarity / KKT characterization of sequence-form best response for player false ([vS07], Section 3.11, pp. 73–74): under perfect recall, x is a sequence-form best response to y iff x is a valid realization plan and there exists an information-set multiplier vector q satisfying dual feasibility T.seqPayoffMat false *ᵥ y ≤ (seqMat T false)ᵀ *ᵥ q and complementary slackness.

theorem Cslib.GameTheory.Extensive.isSeqBestResponseTrue_iff_dual {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Fintype (H true)] (hpr : T.PerfectRecall true) (y : SeqVar T true → ℝ) (x : SeqVar T false → ℝ) :

Complementarity / KKT characterization of sequence-form best response for player true ([vS07], Section 3.11, p. 74).

theorem Cslib.GameTheory.Extensive.isSeqNash_iff_complementarity {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Fintype (H false)] [Fintype (H true)] (hpr : ∀ (i : Bool), T.PerfectRecall i) (x : SeqVar T false → ℝ) (y : SeqVar T true → ℝ) :

Sequence-form complementarity / LCP characterization of two-player Nash equilibria ([vS07], Theorem 3.14, Section 3.11, p. 74): (x, y) is a sequence-form Nash equilibrium iff (x, y) are valid realization plans paired with dual multipliers (q, p) satisfying dual feasibility and complementary slackness.

theorem Cslib.GameTheory.Extensive.isMixedNash_toCostGame_iff_isSeqNash {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → Fintype (H i)] [(i : Bool) → DecidableEq (H i)] [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} (hpr : ∀ (i : Bool), T.PerfectRecall i) (μ : (i : Bool) → PureStrategy H Act i → ℝ) :

Mixed Nash equilibria equal sequence-form Nash equilibria ([vS07], §3.10): under perfect recall for both players, a mixed strategy profile μ is a mixed Nash equilibrium of T.toCostGame iff its induced realization plans (x, y) form a sequence-form Nash equilibrium.

theorem Cslib.GameTheory.Extensive.isBehaviorNash_iff_isSeqNash {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} (hpr : ∀ (i : Bool), T.PerfectRecall i) (β : (i : Bool) → (h : H i) → Act i h → ℝ) :

Behavioral Nash equilibria equal sequence-form Nash equilibria ([vS07], §3.10): under perfect recall for both players, β is a behavioral Nash equilibrium iff its induced realization plans form a sequence-form Nash equilibrium.

theorem Cslib.GameTheory.Extensive.exists_isSeqNash {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [∀ (i : Bool), Finite (H i)] [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} (hpr : ∀ (i : Bool), T.PerfectRecall i) :
∃ (x : SeqVar T false → ℝ) (y : SeqVar T true → ℝ), T.IsSeqNash x y

Existence of a sequence-form Nash equilibrium in any finite two-player extensive game with perfect recall ([vS07], Sections 3.10–3.11).

def Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum {H : Bool → Type v} {Act : (i : Bool) → H i → Type} (T : ExtensiveTree Bool H Act) :

A two-player extensive-form game is zero-sum ([vS07], Section 3.11, p. 73) if the players' payoffs sum to 0 at every terminal leaf.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.evalBehavior_true {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] {T : ExtensiveTree Bool H Act} (hzs : T.IsZeroSum) (β : (i : Bool) → (h : H i) → Act i h → ℝ) :
theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.evalMixed_true {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → Fintype (H i)] [(i : Bool) → DecidableEq (H i)] [(i : Bool) → (h : H i) → Fintype (Act i h)] {T : ExtensiveTree Bool H Act} (hzs : T.IsZeroSum) (μ : (i : Bool) → PureStrategy H Act i → ℝ) :
theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.seqPayoffMat_true_of_perfectRecall {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} (hpr : ∀ (i : Bool), T.PerfectRecall i) (hzs : T.IsZeroSum) :
theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.seq_weak_duality {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] {T : ExtensiveTree Bool H Act} [Fintype (H false)] [Fintype (H true)] {x : SeqVar T false → ℝ} {y : SeqVar T true → ℝ} {q : Option { h : H true // T.OccursInfoSet true h } → ℝ} {p : Option { h : H false // T.OccursInfoSet false h } → ℝ} (hx : T.IsRealizationPlan false x) (hy : T.IsRealizationPlan true y) (hq : (seqMat T true).transpose.mulVec q ≤ (T.seqPayoffMat false).transpose.mulVec x) (hp : (T.seqPayoffMat false).mulVec y ≤ (seqMat T false).transpose.mulVec p) :

Weak duality between player false's maximin sequence-form LP and player true's minimax sequence-form LP ([vS07], Section 3.11, p. 73).

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.exists_seq_lp_minimax {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Fintype (H false)] [Fintype (H true)] (hpr : ∀ (i : Bool), T.PerfectRecall i) (hzs : T.IsZeroSum) :

Zero-sum sequence-form LP minimax theorem ([vS07], Theorem 3.13, Section 3.11, p. 73): in a two-player zero-sum extensive-form game with perfect recall, the sequence-form LP pair max { q none | x ≥ 0, E₁ x = e₁, E₂ᵀ q ≤ Aᵀ x } and min { p none | y ≥ 0, E₂ y = e₂, A y ≤ E₁ᵀ p } attains a common optimal value v, and any optimal solutions (x*, y*) form a sequence-form Nash equilibrium / minimax saddle point with value x* ⬝ᵥ A *ᵥ y* = v. Proved directly from LP duality without fixed-point theorems.

theorem Cslib.GameTheory.Extensive.ExtensiveTree.IsZeroSum.exists_behavior_minimax {H : Bool → Type v} {Act : (i : Bool) → H i → Type} [(i : Bool) → (h : H i) → Fintype (Act i h)] [∀ (i : Bool) (h : H i), Nonempty (Act i h)] {T : ExtensiveTree Bool H Act} [Finite (H false)] [Finite (H true)] (hpr : ∀ (i : Bool), T.PerfectRecall i) (hzs : T.IsZeroSum) :
∃ (v : ℝ) (β : (i : Bool) → (h : H i) → Act i h → ℝ), T.IsBehaviorNash β ∧ evalBehavior β T false = v ∧ evalBehavior β T true = -v

In a zero-sum extensive-form game with perfect recall, LP strong duality also constructs an explicit minimax behavioral Nash equilibrium profile β realizing the minimax game value.