Computing Nash equilibria in tree and acyclic graphical games #
This module formalizes the two-pass dynamic programming algorithm TreeNash and its
τ-grid approximation ApproximateTreeNash from [Kea07], §7.3 (Figure 7.1, Theorem 7.3,
Lemma 7.4, and the equilibrium correctness/completeness step of Theorem 7.5, pp. 164–168), together
with the forest extension to arbitrary finite acyclic graphs.
Orientation and subtree semantics #
Given a tree G : SimpleGraph ι (hT : G.IsTree) rooted at r : ι, Kearns's convention places r
at the bottom and the leaves at the top ([Kea07], §7.3, p. 164):
- for
v ≠ r,hT.parent r vis the unique downstream neighbor ("child"WofV); UpstreamNeighbors hT r v = {u : ι // u ≠ r ∧ hT.parent r u = v}is the set of upstream neighbors ("parents"U_1, …, U_kofV);hT.treeSide v (hT.parent r v)is the upstream vertex setUP_G(v)(containingvand isolated from the rest ofGonce the strategy ofhT.parent r vis fixed,SimpleGraph.IsTree.eq_of_mem_treeSide_of_adj_notMem).
Parameterized two-pass dynamic program #
Both exact TreeNash and discretized ApproximateTreeNash are instances of one parameterized
two-pass recurrence over (allowed : ∀ i, Set (S i → ℝ)) and additive best-response slack ε : ℝ:
- Downstream pass (
treePassTable,IsTreePassWitness,rootPassTable,IsRootPassWitness): starting at leaves (whereUpstreamNeighborsis empty,treePassTable_of_isEmpty) and moving towardrby decreasingFintype.card ι - (hT.pathTo r v).length, vertexv ≠ rmarks(xw, xv)valid iffxwandxvlie inallowedand some upstream witnessusatisfies all upstream tablestreePassTable … c.1 xv (u c)while makingxva localε-best response to(xw, u). - Subtree invariant (
treePassTable_iff_exists_subtreeEquilibrium):treePassTableholds atv ≠ riff(xw, xv)extends to a profile inallowedthat is locally anε-best response at every vertex ofhT.treeSide v (hT.parent r v). - Upstream pass (
IsTreePassOutput,treePassUpstream): any nondeterministic witness selection fromrupstream produces anε-Nash equilibrium inallowed, and conversely everyε-Nash equilibrium inallowedis represented by the tables and witness sets (isTreePassOutput_iff_isApproxNash).
Main results #
Cslib.GameTheory.GraphicalGame.isTreeNashOutput_iff_isMixedNash,Cslib.GameTheory.GraphicalGame.treeNash_isMixedNash: [Kea07], Theorem 7.3 (p. 166) — exactTreeNashcomputes a mixed Nash equilibrium of any finite tree graphical game with nonempty action sets, and its downstream tables and witness sets represent all mixed Nash equilibria.Cslib.GameTheory.GraphicalGame.acyclicNash_isMixedNash,Cslib.GameTheory.GraphicalGame.isMixedNash_iff_component_treeNash: extension ofTreeNashto arbitrary finite acyclic graphical games (forests) via connected tree components.Cslib.GameTheory.GraphicalGame.sum_abs_prod_sub_prod_le: product-distributionL₁telescoping bound∑ u, |∏ j, p j (u j) - ∏ j, q j (u j)| ≤ ∑ j, ∑ a, |p j a - q j a|.Cslib.GameTheory.GraphicalGame.isApproxNash_of_l1_le,Cslib.GameTheory.GraphicalGame.isApproxNash_nearestGridStrategy: [Kea07], Lemma 7.4 (p. 167) — rounding an exact Nash equilibrium of a degree-d,[0, 1]-payoff binary graphical game to theL₁-nearest strategy on the(τ = 1 / m)-grid yields a(d * τ)-Nash equilibrium.Cslib.GameTheory.GraphicalGame.approxTreeNash_isApproxNash,Cslib.GameTheory.GraphicalGame.exists_approxTreeNashOutput_of_isMixedNash: equilibrium correctness andL₁-closeness completeness step of [Kea07], Theorem 7.5 (pp. 167–168) (formalizing the mathematical equilibrium guarantees ofApproximateTreeNash; machine running-time bounds remain separate).
References #
Rooted upstream decomposition #
Upstream neighbors ("parents" in Kearns's upside-down tree convention, [Kea07], §7.3,
p. 164) of vertex v when the tree G is rooted at r: all non-root vertices u whose step
toward r is v.
Every upstream neighbor c of v in a tree rooted at r has hT.parent r c.1 = v.
A non-root vertex's neighbors other than its downstream parent hT.parent r v are precisely its
upstream neighbors in UpstreamNeighbors hT r v.
Distinct upstream neighbors of v have disjoint subtrees hT.treeSide c.1 v.
Moving from v to an upstream neighbor c strictly decreases
Fintype.card ι - (hT.pathTo r ·).length.
For a non-root vertex v ≠ r, each upstream neighbor's subtree hT.treeSide c.1 v is
contained in hT.treeSide v (hT.parent r v).
Every non-root vertex z ≠ r lies in the subtree hT.treeSide c.1 r of some upstream
neighbor c of the root r.
Assemble a neighbor mixed-strategy profile at the root r from strategies on
UpstreamNeighbors hT r r.
Assemble a neighbor mixed-strategy profile at a non-root vertex v ≠ r from the strategy xw
of its unique downstream neighbor hT.parent r v and strategies u of UpstreamNeighbors hT r v.
Downstream dynamic-programming table T(w, v) of parameterized TreeNash ([Kea07],
Figure 7.1 Step (ii), p. 165) passed from non-root vertex v to its downstream neighbor
w = hT.parent r v.
Witness predicate for treePassTable at v ≠ r ([Kea07], Figure 7.1 Step (ii)(d)2,
pp. 165–166): u belongs to the witness list of (xw, xv) iff every upstream table entry
T(xv, u c) holds and xv is locally an ε-best response to (xw, u).
Leaf base case ([Kea07], Figure 7.1 Step (ii)(c), p. 165): when v ≠ r has no upstream
neighbors, treePassTable holds iff xw ∈ allowed (hT.parent r v), xv ∈ allowed v, and xv is
locally an ε-best response to xw.
Witness predicate at the root r ([Kea07], §7.3, p. 166).
One-dimensional root table T(z) at the root r ([Kea07], §7.3, p. 166).
Nondeterministic upstream-pass output predicate ([Kea07], Figure 7.1 Step (iii),
pp. 165–166): p is produced by choosing a valid root entry p r, a root witness, and valid
witnesses at every non-root vertex v ≠ r upstream.
Subtree equilibrium invariant and master two-pass equivalence #
Subtree table invariant ([Kea07], §7.3, pp. 164–166): for v ≠ r, treePassTable
accepts (xw, xv) if and only if there exists a profile q assigning xw to hT.parent r v, xv
to v, strategies from allowed across UP_G(v) = hT.treeSide v (hT.parent r v), and making every
vertex z ∈ hT.treeSide v (hT.parent r v) locally an ε-best response to q.
Root table characterization ([Kea07], §7.3, p. 166): rootPassTable accepts xr iff
xr extends to an ε-Nash equilibrium q of M with q r = xr and ∀ i, q i ∈ allowed i.
Master two-pass equivalence: a strategy profile p is produced by a nondeterministic
upstream pass through treePassTable and rootPassTable if and only if ∀ i, p i ∈ allowed i
and M.IsApproxNash ε p.
Constructive upstream pass #
Constructive upstream pass ([Kea07], Figure 7.1 Step (iii), p. 165): given a valid root
entry xr (rootPassTable M hT r allowed ε xr), recursively assigns strategies from r to the
leaves using chosen witnesses at each vertex.
Exact root table T(z) of algorithm TreeNash ([Kea07], §7.3, p. 166).
Nondeterministic output predicate of exact TreeNash ([Kea07], Theorem 7.3, p. 166).
TreeNash completeness ([Kea07], Theorem 7.3, second sentence, p. 166): the downstream
tables and witness sets of TreeNash represent all mixed Nash equilibria of (G, M).
When every player has a nonempty finite action set, the exact root table treeNashRootTable is
nonempty ([Kea07], §7.3, p. 166).
Algorithm TreeNash ([Kea07], Figure 7.1 & Theorem 7.3, pp. 165–166): computes an
exact mixed Nash equilibrium of a finite tree graphical game by running the downstream table pass to
root r followed by the upstream witness pass.
TreeNash soundness ([Kea07], Theorem 7.3, first sentence, p. 166): M.treeNash hT r
is a mixed Nash equilibrium of (G, M) (and is produced by TreeNash's tables and witnesses).
TreeNash soundness ([Kea07], Theorem 7.3, p. 166): M.treeNash hT r is an exact
mixed Nash equilibrium of M.toCostGame.
Forest extension: acyclic graphical games (M.graph.IsAcyclic) #
Restrict a graphical game M to an adjacency-closed set of players U : Set ι (such as a
connected component).
Restriction of a graphical game M to a connected component C : M.graph.ConnectedComponent.
When M.graph is acyclic, every connected component induces a tree.
Forest decomposition of ε-Nash equilibria: a profile p is an ε-Nash equilibrium of M
if and only if its restriction to every connected component C of M.graph is an ε-Nash
equilibrium of M.componentGame C.
On an acyclic graphical game M (hA : M.graph.IsAcyclic), running TreeNash independently on
each connected tree component characterizes all mixed Nash equilibria of M.
Two-pass TreeNash on acyclic graphical games (forests): runs treeNash independently on
every connected tree component of M.graph.
Soundness of acyclicNash: on any finite acyclic graphical game with nonempty action sets,
M.acyclicNash hA is an exact mixed Nash equilibrium of M.toCostGame.
Product-distribution L₁ telescoping bound: the L₁ distance between two finite product
probability distributions is bounded by the sum of the coordinatewise L₁ distances.
General L₁ Nash perturbation lemma ([Kea07], Lemma 7.4 over arbitrary finite action
sets, p. 167): if M has [0, 1] payoffs and maximum degree at most d, p is an exact mixed
Nash equilibrium of M, and q is a mixed strategy profile with ∑ a, |p i a - q i a| ≤ τ and
support inclusion 0 < q i a → 0 < p i a for every player i, then q is a (d * τ)-Nash
equilibrium of M.
Nearest mixed strategy on binaryTauGrid m (in L₁ norm) to x : Bool → ℝ ([Kea07],
Lemma 7.4, p. 167), defined explicitly via rounding m * x false to the nearest integer in
{0, …, m}.
L₁ error bound of nearestGridStrategy: on Bool, rounding to binaryTauGrid m changes
each coordinate by at most 1 / (2 * m), hence changes the distribution in L₁ norm by at most
1 / m = τ.
L₁ optimality of nearestGridStrategy ([Kea07], Lemma 7.4, p. 167):
nearestGridStrategy m x minimizes the L₁ distance to x over all strategies y in
binaryTauGrid m.
Rounding a binary mixed strategy x to binaryTauGrid m (1 ≤ m) never introduces a new
action into its support, because pure strategies (0, 1) and (1, 0) already lie on the grid.
τ-grid Nash perturbation lemma ([Kea07], Lemma 7.4, p. 167): let M be a binary
graphical game of maximum degree at most d with payoffs in [0, 1], and let p be an exact
mixed Nash equilibrium of M. For any grid resolution 1 ≤ m (τ = 1 / m), the L₁-nearest
τ-grid profile fun i => nearestGridStrategy m (p i) is a (d * (1 / m))-Nash equilibrium of
M.
Nondeterministic output predicate of discretized ApproximateTreeNash ([Kea07],
§7.3.1, p. 167) on a binary tree graphical game at grid resolution m (τ = 1 / m) and slack ε.
Equilibrium completeness step, not the full polynomial-time endpoint, for discretized
ApproximateTreeNash (a step of [Kea07], Theorem 7.5, pp. 167–168, without the machine
running-time bound): with grid resolution m = max 1 ⌈(d : ℝ) / ε⌉₊ (τ = 1 / m ≤ ε / d), for
every exact mixed Nash equilibrium p of a degree-d, [0, 1]-payoff binary tree graphical game
M, the τ-grid tables and witnesses of ApproximateTreeNash contain an ε-Nash equilibrium q
within L₁ distance 1 / m of p.
Nonemptiness of the discretized ApproximateTreeNash root table at resolution
m = max 1 ⌈(d : ℝ) / ε⌉₊.
Discretized algorithm ApproximateTreeNash ([Kea07], §7.3.1, p. 167): runs the
two-pass dynamic program restricted to binaryTauGrid (max 1 ⌈(d : ℝ) / ε⌉₊) with ε-best
responses.
Equilibrium correctness step, not the full polynomial-time endpoint, for discretized
ApproximateTreeNash (a step of [Kea07], Theorem 7.5, pp. 167–168, without the machine
running-time bound): approxTreeNash outputs a τ-grid ε-Nash equilibrium of M.