AGV 11.4 -- Parity Games

Previous chapter: Büchi Games

This is a learning note of a course in CISPA, UdS. Taught by Bernd Finkbeiner

Introduction

Perhaps the most intriguing type of infinite games are parity games. Parity games play a key role in verification (in particular for μ-calculus model checking) and synthesis, and finding fast algorithms for parity games is an active research topic.

The algorithm discussed in the following takes exponential time. There are also several quasi-polynomial-time algorithms for solving parity games (starting with a breakthrough result by Calude, Jain, Khoussainov, Li, and Stephan in 2017). In practice, however, these algorithms do not perform well (yet).

Parity Condition

Definition 11.10. The parity condition PARITY(C) for a coloring function c:VN is the set
PARITY(C)={αVωmax{c(q)qInf(α)}is even}.

The parity condition is satisfied if the biggest number q of the coloring function is even, among all positions that are visited infinitely often.

Example

  • The winning region for Player 0: W0(G)={v3,v6,v7}

    • Strategy: σ(v3)=v6,σ(v7)=v4,σ(v7)=v6 (v8 have no choices and v1 is arbitrary)
  • The winning region for Player 1: W1(G)={v0,v1,v2,v4,v5,v8}

    • Strategy: τ(v0)=v1,τ(v2)=v5,τ(v4)=v0,τ(v5)=v1

We first prove that parity games are memoryless determined, then derive an algorithm for solving parity games. In the following theorem, we emphasize that determinacy holds also for (countably) infinite game arenas.

This will be helpful when we use the determinacy to complement tree automata, because the acceptance game of a tree automaton refers to the infinite input tree and is therefore infinite.

Theorem 11.3. Parity games are memoryless determined with uniform winning strategiesfor game arenas with a countable set of positions and a finite number of colors.

Here, we try to construct a uniform winning strategy for an arbitrary parity game.

Proof

Let k=max{c(v)vV} be the highest color in the given parity game. We prove that parity games are memoryless determined by induction on k.

Case k=0: If the highest color is 0, then all plays are winning. W0(G)=V,W1(G)=. For the memoryless winning strategy σ, we fix an arbitrary total order on V and choose σ(v)=min{vV(v,v)E}.

Case k>0: If k is even, consider Player i, otherwise Player (1-i). Let Wi1 be the set of positions where Player (1-i) has a memoryless winning strategy. We show that Player i has a memoryless winning strategy σ from VW1i . Consider the subgame G:

  • V0=V0W1i,Vi=V1W1i,V=V0V1
  • E=E(V×V)
  • c(v)=c(v) for all vV

Note that G is still a game:

  • for vVi, there is a vVW1i with (v,v)E, otherwise v would be in W1i
  • for vV1i, for all vV with (v,v)E, vVW1i, hence there is a vV with (v,v)E.

Let c1(k)={vVc(v)=k} (set of highest color positions in V), and
Let Y=Attri(c1(k)). (attractor here means the set of positions that at least visit c1(k) once)
Let σA be the corresponding attractor strategy on G into c1(k), as defined in the proof of Theorem 11.1.

Now consider the subgame G:

  • V0=V0Y,Vi=V1Y,V=V0V1
  • E=E(V×V)
  • c:V{0,,k1};c(v)=c(v) for all vV

Note that G is still a game, and that the maximal color in G is at most k1 (we removed position that color as k and positions that can visit it by Player i). By induction hypothesis, that G is memoryless determined.

It is also clear that W1i, the set of positions in game G where Player (1−i) has a memoryless winning strategy, is empty, because W1i is a subset of W1i:

assume Player (1−i) had a memoryless winning strategy from some position in V. Then this strategy would win in G, too, since Player i has no opportunity to leave G other than to W1i.

Hence, there is a uniform winning memoryless winning strategy σIH for player i from all positions in V. We define the following uniform strategy σ for Player i in game G:

σ(v)={σIH(v)if  vVσA(v)if  vVc1(k)min. successor in VW1iif  vVc1(k)min. successor in Votherwise.

The strategy σ is winning for Player 0 on VW1σ. Consider a play that is consistent with σ, it can be either:

  1. Y (Set of positions that Player 0 can visit the highest color k) is visited infinitely often. Thus, Player i wins.

  2. Eventually only positions in V are visited. Hence, since Player i follows σIH, Player i wins.

Construct W1i with McNaughton’s algorithm

The proof above is non-constructive in the sense that we begin the argument by considering (rather than computing) the set W1i of positions where the opponent, Player (1−i), has a memoryless winning strategy. McNaughton’s algorithm, one of the classic algorithms for parity games over finite arenas, computes this set iteratively, with repeated recursive calls:

Construction 11.3. Let a finite parity game G=(A,PARITY(C)) be given. We compute thewinning regions W0(G) and W1(G) as follows. (To avoid confusion we indicate in each attractorconstruction explicitly the game it refers to.)
Function McNaughton(G)=1.k:= highest color in G2.if k=0 or V=then return (V,)3.i:=k mod 24.W1i:=5.repeat(a)G:=GAttri(c1(k),G)(b)(W0,W1):=McNaughton(G)(c)if (W1i=) then i.Wi:=VW1i ii.return (W0,W1)(d)W1i:=W1iAttr1i(W1i,G)(e)G:=GAttr1i(c1(W1i,G)

Explaination

(Line 1): The construction begins by determining the highest color k that appears in the arena.

(Line 2): If this color is 0 (or the arena is empty), then Player 0 wins the game from all positions, function ends.

(Line 3): Otherwise we continue by analyzing the game from the perspective of Player i=0 if k is even and from the perspective of Player i=1 if k is odd.

(Line 4): We initialize the winning region for the opponent to and repeat the following:

(Line 5a): First, we eliminate all positions where Player i can enforce a visit to the highest color k (which, if visited infinitely often, is beneficial for Player i).

(Line 5b): We recursively solve the resulting subgame G.

(line 5c): If the oppoent does not have any winning positions in the subgame, then we are done:

  • If the play of G stays in the subgame, then Player i wins with the winning strategy of the subgame.

  • If the play leaves the subgame, then Player i can enforce a visit to the highest color.

So either the play eventually stays in the subgame forever, and Player i wins there, or it infinitely often leaves the subgame, and Player i wins by visiting the highest color infinitely often.

(line 5d): If the opponent wins from some non-empty winning region W1i of the subgame, then we add the opponent’s attractor of W1i to the winning region of G.

  • The opponent is sure to win from every position in the attractor by first ensuring a visit to W1i and then staying there forever applying its winning strategy inside G.

  • Player i cannot force the game out of the subgame, because G was constructed by removing Player i’s attractor from G.

(line 5e): We remove the entire attractor from G (line 5e) and continue with the resulting subgame.

Example

Consider again the example above.

(line 1): The highest color is k=4,
(line 3): k is even, hence i=0.
(line 5a): We have that c1(4)={v4,v8} and Attr0(c1(4))=Attr0({v4,v8})={v3,v4,v6,v7,v8}. Hence, G is the subgame consisting of positions v0, v1, v2, and v5:

(line 5b): The recursive call returns W0=,W1={v0,v1,v2,v5}. (We skip over the evaluation of the recursive call here, note that Player 1 wins from every position with a strategy that moves from v2 to v5.)
(line 5d): We have that Attr1({v0,v1,v2,v5})={v0,v1,v2,v4,v5,v8}. Hence, W1 is set to {v0,v1,v2,v4,v5,v8},
(line 5e): And G is reduced to the subgame consisting of positions v3, v6 and v7:

(line 5b): Now, the game does not contain any positions with color 4 anymore, we therefore call the algorithm recursively. It returns W0={v3,v6,v7},W1=. (We again skip over the evaluation of the recursive call, note that all plays are winning for Player 0.)
(line 5ci): Since W1=, we set W0 to VW1,
(line 5cii): Return the final result W0={v3,v6,v7}, W1={v0,v1,v2,v4,v5,v8}.


Next chapter: Muller Games

Further Reading:

Author

Alex Li

Posted on

2025-02-13

Updated on

2025-04-03

Licensed under

Comments

Related Issues not found

Please contact @GreenMeeple to initialize the comment

Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×