Documentation

CslibFrontier.GameTheory.Strategic.SwapRegretDynamics

Swap regret dynamics #

If every player in a finite game runs an online learning algorithm with vanishing swap regret, the time average of the product distributions converges to a correlated equilibrium ([Rou13], Lecture 18, Proposition 1.3; [BM07a], Theorem 3). Specifically, if player i has total swap regret at most R i over T rounds, the time average is an (R i / T)-approximate correlated equilibrium (timeAverage_productDist_isApproxCorrelatedEquilibrium).

We instantiate this with the coupled multi-player Blum–Mansour dynamics (blumMansourDynamics G T) using Hedge copies with the horizon-tuned learning rate η_i = √(m_i ln m_i / T) for a fixed known horizon T > 0, where m_i = |S i| ≥ 2 and T ≥ m_i ln m_i. Because each player's mixed strategy in round t depends only on its expected cost vectors deviationCost from rounds < t, the coupled trajectory is constructed by well-founded recursion on t, and satisfies the online Blum–Mansour learner identity (blumMansourDynamics_eq_blumMansourProb). When game costs lie in [-1, 1], the time average over the first T rounds is a 2 √(m_i ln m_i / T)-approximate correlated equilibrium (blumMansour_isApproxCorrelatedEquilibrium). This is a fixed-horizon, expected-cost, full-information analysis, not sampled play, last-iterate convergence, or a running-time bound.

Main definitions #

Main results #

References #

theorem Cslib.GameTheory.CostGame.timeAverage_productDist_isApproxCorrelatedEquilibrium {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(i : ι) → DecidableEq (S i)] [(i : ι) → Fintype (S i)] (G : CostGame ι S) {p : ℕ → (i : ι) → S i → ℝ} {T : ℕ} (hT : 0 < T) (h_nonneg : ∀ (t : ℕ) (i : ι) (c : S i), 0 ≤ p t i c) (h_sum : ∀ (t : ℕ) (i : ι), ∑ c : S i, p t i c = 1) {R : ι → ℝ} (hR : ∀ (i : ι) (δ : S i → S i), ∑ t ∈ Finset.range T, ∑ a : S i, p t i a * G.deviationCost (p t) i a ≤ ∑ t ∈ Finset.range T, ∑ a : S i, p t i a * G.deviationCost (p t) i (δ a) + R i) :
G.IsApproxCorrelatedEquilibrium (fun (i : ι) => R i / ↑T) (timeAverage (fun (t : ℕ) => productDist ⋯ ⋯) T hT)

No-swap-regret play yields approximate correlated equilibria ([Rou13], Lecture 18, Proposition 1.3; [BM07a], Theorem 3): if after T > 0 rounds player i has total swap regret at most R i with respect to every switching function, then the time average of the product distributions is an approximate correlated equilibrium up to the additive slack R i / T.

noncomputable def Cslib.GameTheory.CostGame.blumMansourDynamics {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(i : ι) → DecidableEq (S i)] [(i : ι) → Fintype (S i)] (G : CostGame ι S) (T : ℕ) :
ℕ → (i : ι) → S i → ℝ

The coupled multi-player Blum–Mansour dynamics for a fixed finite horizon T: in round t, each player i plays the single-learner Blum–Mansour distribution with Hedge copies tuned for T against the sequence of its realized expected cost vectors from rounds < t.

theorem Cslib.GameTheory.CostGame.blumMansourDynamics_eq_blumMansourProb {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(i : ι) → DecidableEq (S i)] [(i : ι) → Fintype (S i)] (G : CostGame ι S) (T t : ℕ) (i : ι) :

Each player i in blumMansourDynamics G T runs the single-learner Blum–Mansour algorithm against its realized expected-cost sequence s c ↦ G.deviationCost (blumMansourDynamics G T s) i c.

theorem Cslib.GameTheory.CostGame.blumMansourDynamics_nonneg {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(i : ι) → DecidableEq (S i)] [(i : ι) → Fintype (S i)] [∀ (i : ι), Nonempty (S i)] (G : CostGame ι S) (T t : ℕ) (i : ι) (a : S i) :

Every weight produced by blumMansourDynamics is nonnegative.

theorem Cslib.GameTheory.CostGame.sum_blumMansourDynamics {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(i : ι) → DecidableEq (S i)] [(i : ι) → Fintype (S i)] [∀ (i : ι), Nonempty (S i)] (G : CostGame ι S) (T t : ℕ) (i : ι) :
∑ a : S i, G.blumMansourDynamics T t i a = 1

In every round, each player's strategy in blumMansourDynamics sums to 1.

theorem Cslib.GameTheory.CostGame.blumMansour_isApproxCorrelatedEquilibrium {ι : Type u_1} {S : ι → Type u_2} [DecidableEq ι] [Fintype ι] [(i : ι) → DecidableEq (S i)] [(i : ι) → Fintype (S i)] (G : CostGame ι S) [∀ (i : ι), Nonempty (S i)] {T : ℕ} (hT : 0 < T) (hn : ∀ (i : ι), 2 ≤ Fintype.card (S i)) (hT_bound : ∀ (i : ι), ↑(Fintype.card (S i)) * Real.log ↑(Fintype.card (S i)) ≤ ↑T) (hc : ∀ (i : ι) (s : (i : ι) → S i), |G.cost i s| ≤ 1) :
G.IsApproxCorrelatedEquilibrium (fun (i : ι) => 2 * √(↑(Fintype.card (S i)) * Real.log ↑(Fintype.card (S i)) / ↑T)) (timeAverage (fun (t : ℕ) => productDist ⋯ ⋯) T hT)

Blum–Mansour swap-regret dynamics yield approximate correlated equilibria ([Rou13], Lecture 18, Proposition 1.3; [BM07a], Theorem 3 and Corollary 7): for a finite game with costs in [-1, 1], at least 2 strategies per player, and horizon T > 0 satisfying m_i ln m_i ≤ T for every player i, the time average of the first T rounds of blumMansourDynamics G T is a 2 √(m_i ln m_i / T)-approximate correlated equilibrium.