Lecture 3: Games on graph

Teachers: Dietmar Berwanger

Games on graph

Graph $G ≝ (V, E, V_0, V_1)$, where the $V_i$’s are the players’ vertices

Strategy:

For player $0$: σ: V^\ast V_0 ⟶ V

To encode winning conditions:

Ω: V ⟶ \underbrace{C}_{\text{colors}}

$W ⊆ C^ω$ means $W’ = \lbrace π \text{ play in } (G, v_0) \; \mid \; \underbrace{Ω(π)}_{Ω(v_0) Ω(v_1) ⋯ } ∈ W \rbrace$$

Complex system:

Graph of processes and channels, each node (process) has inputs and produces some output

Models of computation:

  • Turing machine: out of reach
  • 2/1 counter machines (2cm, 1cm)
  • Pushdown automata
  • Non-deterministic pushdown automata with one step
  • Non-deterministic finite automata
  • Deterministic finite automata

In our model: processes are automata, with a common clock

Motivation: you have a node which is a process, two inputs, among which one string. Ouput: one string

  digraph {
    rankdir=LR;
    invis1[shape=none, label=""];
    invis2[shape=none, label=""];
    invis3[shape=none, label=""];
    invis1 -> "Process"[label="x_0 x_1 x_2"];
    invis2 -> "Process";
    "Process" -> invis3[label="y_0 y_1 y_2"];
  }
  • input: $Σ^ω$
  • output: $\Pi^ω$
Spec ⊆ (Σ × \Pi)^ω

Ex:

  • LTL = FO

    \bigwedge_{i=1}^n \texttt{globally} (Request_i ⟶ \texttt{finally } Acknowledge_i)\\ φ \texttt{ until } ψ
  • MSO (better than FO) = RegExp = $ω$-Automata on words (ND Büchi automata: $ℒ(𝒜) ⊆ (Σ × \Pi)^ω$)

⟶ Church Synthesis Problem

Is there an input $\overline{x}$ such that $(\overline{x}, P(\overline{x})) ∉ ℒ(𝒜)$? (the specification does not hold). Goal: win a game played on a Büchi automaton.

Parity Games

$G ≝ (V, E, V_0, V_1, Ω)$: finite game graph

Priority function: $Ω: V ⟶ ℕ$

Winning condition:

play $v_0, v_1, v_2, …$ is winning

If in $Ω(v_0) Ω(v_1) Ω(v_2) ⋯$ the least priority that appears infinitely often (io) is even.

Büchi automaton recognizing $(a+b)^\ast b^ω$:

  digraph {
    rankdir=LR;
    0 -> 0[label="a, b"];
    0 -> "final"[label="b"];
    "final" -> "final"[label="b"];
    "final" -> "sink"[label="a"];
    "sink" -> "sink"[label="a,b"];
  }

Deterministic version:

  digraph {
    rankdir=LR;
    0 -> 0[label="a"];
    0 -> "final"[label="b"];
    "final" -> "final"[label="b"];
    "final" -> 0[label="a"];
  }

Questions

  • Is there a winner, for a given game with perfect information? (true with the axiom of choice)

  • Determinacy

  • Memory for winning?

    • ex: input: $1^n 0 1^m 0 ⋯$, output: $1^{2n} 0 1^{2m} 0 ⋯$

    • Winning condition for $π$:

      \vert \lbrace X ∈ \lbrace A, B\rbrace \; \mid \; X \text{ appears io in } π\rbrace \vert = \min \lbrace i ∈ \lbrace1, 2\rbrace \; \mid \; i \text{ appears io in } π\rbrace
          digraph {
            rankdir=LR;
            sq[shape=rectangle, label=""];
            circ[shape=circle, label=""];
            sq -> A, B;
            A -> circ -> 1;
            B -> circ -> 2;
          }
      
  • Complexity of determining the winner

  • Constructing a winning strategy


A set $W ⊆ Plays(G)$ is prefix invariant:

if for all $x, x’ ∈ V^\ast, y ∈ V^ω$: xy ∈ W ⟺ x' y ∈ W

$G$: finite game graph, $W$ prefix invariant winning strategy

A map $σ: V_0 ⟶ V$ is a uniform winning strategy on a set $U ⊆ V$ of positions:

if $σ$ describes a winning strategy in every game $(G, v_0)$ for $v_0 ∈ U$

Exercise: If in $(G, W)$ we have positional strategy $(σ^u)_{u ∈ U}$, for some set $U ⊆ V$ s.t. $σ^u$ winning in $(G, u)$, then there exists a uniform winning strategy on $U$.

Theorem: In every parity game, the set of positions can be partitioned into two sets $W_0$ and $W_1$ s.t.

  • Player $0$ (Pl0) has a uniform memoryless strategy on $W_0$
  • Pl1 has a uniform memoryless strategy on $W_1$

Let $G = (V, E, V_0, V_1, Ω)$ be a parity game with $Ω(V) = \lbrace 0,…, m-1 \rbrace$ or $Ω(V) = \lbrace 1,…, m \rbrace$ for some $m ∈ ℕ$ (wlog).

Induction over $m$:

  • if $m=1$, then either Pl0 or Pl1 wins every (inf) play. Pick any memoryless uniform strategy ($W_0 = V$ or $W_1 = V$)

  • If $m> 1$, consider the case $0 ∈ Ω(V)$ (otherwise, switch the player).

    Let X_1 ≝ \lbrace v ∈ V \; \mid \; \text{Pl1 has a memoryless winning strategy from } v\rbrace

    Choose $τ$ to be a uniform winning strategy on $X_1$

    Observe $V \backslash X_1$ is a trap for Pl1. Pl0 has a strategy $σ_0$ to maintain all plays in $V \backslash X_1$.

    Let $Y ≝ Ω^{-1}(0) \backslash X_1$. Take $Z ≝ Attr^0(Y)$ (attractor for Pl0, ending up in $Y$). Fix an attractor strategy $α$ for Pl0.

    Look at $V’ ≝ V \backslash (X_1 ∪ Z)$. $G_{ V’}$ is a game graph with fewer priorities.

    So by induction hypothesis: V' = \overbrace{\underbrace{W_0'}_{\text{uni. win. str. } σ'} \sqcup \underbrace{W_1'}_{\text{uni. win. str. } τ'}}^{\text{winning regions}}

    Actually, $W_1’ = ∅$ because τ+τ' ≝ \begin{cases} τ(x) &&\text{ if } x∈X_1 \\ τ'(x) &&\text{ else if } x ∈ W_1' \end{cases} is a memoryless uniform winning strategy, and it is winning. Every play that follows $τ+τ’$ either stays in $W_1’$ or reaches $X_1$ ⟶ winning.

    Finally, consider

    σ(x) ≝ \begin{cases} σ'(x) &&\text{ if } x ∈ V' \\ α(x) &&\text{ if } x ∈ Z \backslash Y\\ σ_0(x) &&\text{ if } x ∈ Y \\ \end{cases}

    This is a memoryless strategy for Pl0 on $V \backslash X_1$. Why? We consider play $π$ consistent with $σ$:

    • it never reaches $X_1$
    • either it stays in $W_0’$ eventually
    • or it reaches $Z$, hence priority 0, infinitely often.

Leave a comment