Tutorial on infinite games (slides)
Tutorial on infinite games (slides)
Christof Löding
RWTH Aachen, Germany
• two player
• zero-sum (win-lose)
• sequential or turn-based
• deterministic (no randomization/probabilities)
• perfect information
• infinite duration
Problem:
• Decide if the there is a sequential transformation
f : Σ1∗ → Σ2 realizing ϕ, and construct one if possible.
Problem:
• Decide if the there is a sequential transformation
f : Σ1∗ → Σ2 realizing ϕ, and construct one if possible.
Modeled as a game:
• One player plays input signals, the other player output
signals
• The specification is the winning condition for the output
player
• A transformation f realizing the specification is a winning
strategy for the output player
Games · MOVEP, June 2008 4 / 80
Reactive Systems
• Games can serve as general model for reactive systems,
i.e., systems with input/output behavior
• To obtain more realistic models it is often required to add
features like time, probabilities, concurrency, ...
• To study these more complex models a good
understanding of the core theory originating from
Church’s problem is fundamental
{ this tutorial
3 Büchi Games
5 Parity Games
Positional Determinacy
Algorithms for Parity Games
Reducing Muller Games to Parity Games
6 Applications
3 Büchi Games
5 Parity Games
Positional Determinacy
Algorithms for Parity Games
Reducing Muller Games to Parity Games
6 Applications
• | X | = size of X
• X ∗ = the set of finite sequences over X
• X ω = the set of infinite sequences over X
• For α ∈ X ω :
y1 x1 y2 x2
y3 x3 y4 x4 x5 y5
x6 y6 y7 x7
y1 x1 y2 x2
y3 x3 y4 x4 x5 y5
x6 y6 y7 x7
y1 x1 y2 x2
y3 x3 y4 x4 x5 y5
x6 y6 y7 x7
α: y7
c(α) : •
Games · MOVEP, June 2008 10 / 80
Plays
A play in G is an infinite sequence α = v0 v1 v2 · · · of vertices
such that (vi , vi+1 ) ∈ E for all i ≥ 0.
By c(α) we denote the corresponding sequence of colors
c(v0 )c(v1 )c(v2 ) · · ·
y1 x1 y2 x2
y3 x3 y4 x4 x5 y5
x6 y6 y7 x7
α: y7 x6
c(α) : • •
Games · MOVEP, June 2008 10 / 80
Plays
A play in G is an infinite sequence α = v0 v1 v2 · · · of vertices
such that (vi , vi+1 ) ∈ E for all i ≥ 0.
By c(α) we denote the corresponding sequence of colors
c(v0 )c(v1 )c(v2 ) · · ·
y1 x1 y2 x2
y3 x3 y4 x4 x5 y5
x6 y6 y7 x7
α: y7 x6 y3
c(α) : • • •
Games · MOVEP, June 2008 10 / 80
Plays
A play in G is an infinite sequence α = v0 v1 v2 · · · of vertices
such that (vi , vi+1 ) ∈ E for all i ≥ 0.
By c(α) we denote the corresponding sequence of colors
c(v0 )c(v1 )c(v2 ) · · ·
y1 x1 y2 x2
y3 x3 y4 x4 x5 y5
x6 y6 y7 x7
α: y7 x6 y3 y6
c(α) : • • • •
Games · MOVEP, June 2008 10 / 80
Plays
A play in G is an infinite sequence α = v0 v1 v2 · · · of vertices
such that (vi , vi+1 ) ∈ E for all i ≥ 0.
By c(α) we denote the corresponding sequence of colors
c(v0 )c(v1 )c(v2 ) · · ·
y1 x1 y2 x2
y3 x3 y4 x4 x5 y5
x6 y6 y7 x7
α: y7 x6 y3 y6 x3
c(α) : • • • • •
Games · MOVEP, June 2008 10 / 80
Plays
A play in G is an infinite sequence α = v0 v1 v2 · · · of vertices
such that (vi , vi+1 ) ∈ E for all i ≥ 0.
By c(α) we denote the corresponding sequence of colors
c(v0 )c(v1 )c(v2 ) · · ·
y1 x1 y2 x2
y3 x3 y4 x4 x5 y5
x6 y6 y7 x7
α: y7 x6 y3 y6 x3 y4 ···
c(α) : • • • • • • ···
Games · MOVEP, June 2008 10 / 80
Game
G = ( G, Win)
• G: game graph
• Win ⊆ C ω : winning condition
y1 x1
y2 x2
y2 ∈ Inf(α) ⇔ { x1 , x2 } ⊆ Inf(α)
y1 x1
y2 x2
y2 ∈ Inf(α) ⇔ { x1 , x2 } ⊆ Inf(α)
y1 x1
y2 x2
y2 ∈ Inf(α) ⇔ { x1 , x2 } ⊆ Inf(α)
α: y1
y1 x1
y2 x2
y2 ∈ Inf(α) ⇔ { x1 , x2 } ⊆ Inf(α)
α: y1 x1
y1 x1
y2 x2
y2 ∈ Inf(α) ⇔ { x1 , x2 } ⊆ Inf(α)
α: y1 x1 y1
y1 x1
y2 x2
y2 ∈ Inf(α) ⇔ { x1 , x2 } ⊆ Inf(α)
α: y1 x1 y1 x1
y1 x1
y2 x2
y2 ∈ Inf(α) ⇔ { x1 , x2 } ⊆ Inf(α)
α: y1 x1 y1 x1 y1
y1 x1
y2 x2
y2 ∈ Inf(α) ⇔ { x1 , x2 } ⊆ Inf(α)
α: y1 x1 y1 x1 y1 x2
y1 x1
y2 x2
y2 ∈ Inf(α) ⇔ { x1 , x2 } ⊆ Inf(α)
α: y1 x1 y1 x1 y1 x2 y1
y1 x1
y2 x2
y2 ∈ Inf(α) ⇔ { x1 , x2 } ⊆ Inf(α)
α: y1 x1 y1 x1 y1 x2 y1 x1
y1 x1
y2 x2
y2 ∈ Inf(α) ⇔ { x1 , x2 } ⊆ Inf(α)
α: y1 x1 y1 x1 y1 x2 y1 x1 y2
y1 x1
y2 x2
y2 ∈ Inf(α) ⇔ { x1 , x2 } ⊆ Inf(α)
α: y1 x1 y1 x1 y1 x2 y1 x1 y2 x1
y1 x1
y2 x2
y2 ∈ Inf(α) ⇔ { x1 , x2 } ⊆ Inf(α)
α: y1 x1 y1 x1 y1 x2 y1 x1 y2 x1 y1 ···
f : V ∗ V∃ → V
f : V ∗ V∃ → V
∀i : vi ∈ V∃ → f (v0 · · · vi ) = vi+1
f : V ∗ V∃ → V
∀i : vi ∈ V∃ → f (v0 · · · vi ) = vi+1
y1 x1
y2 x2
y2 ∈ Inf(α) ⇔ { x1 , x2 } ⊆ Inf(α)
y1 x1
y2 x2
y2 ∈ Inf(α) ⇔ { x1 , x2 } ⊆ Inf(α)
W∃ ∪ W∀ = V
W∃ ∪ W∀ = V
∀ f ∃ ∃ f ∀ ( f ∀ wins against f ∃ )
W∃ ∪ W∀ = V
∀ f ∃ ∃ f ∀ ( f ∀ wins against f ∃ )
By determinacy:
∃ f ∀ ∀ f ∃ ( f ∀ wins against f ∃ )
A difficult game:
x4 y4
x3 y3
x2 y2
x1 y1
3 Büchi Games
5 Parity Games
Positional Determinacy
Algorithms for Parity Games
Reducing Muller Games to Parity Games
6 Applications
F F
F F
F F
F F
F F
F F
F F
F F
• Attr0∃ ( F ) = F
• Attri∃+1 ( F ) = Attri∃ ( F ) ∪ Pre∃ (Attri∃ ( F ))
F F
• Attr0∃ ( F ) = F
• Attri∃+1 ( F ) = Attri∃ ( F ) ∪ Pre∃ (Attri∃ ( F ))
1 1
1 F F
• Attr0∃ ( F ) = F
• Attri∃+1 ( F ) = Attri∃ ( F ) ∪ Pre∃ (Attri∃ ( F ))
2 1 1
1 F F 2
2 1
• Attr0∃ ( F ) = F
• Attri∃+1 ( F ) = Attri∃ ( F ) ∪ Pre∃ (Attri∃ ( F ))
2 1 1
1 F 3 F 2
2 1
2 1 1
1 F 3 F 2
2 1
2 1 1
1 F 3 F 2
2 1
f : V∃ → V
Theorem
Reachability games G = ( G, F ) are positionally determined
with W∃ = Attr ∃ ( F ).
Theorem
Reachability games G = ( G, F ) are positionally determined
with W∃ = Attr ∃ ( F ).
F ···
F ···
• A trap defines a subgame (each vertex has at least one
edge staying inside the trap). This is important when
inductively solving games.
F ···
• A trap defines a subgame (each vertex has at least one
edge staying inside the trap). This is important when
inductively solving games.
• The dual condition of avoiding a set of vertices is called
safety condition. A reachability condition is a safety
condition for the opponent.
Games · MOVEP, June 2008 27 / 80
Summary
• Reachability games: goal of Eva is to reach a set F of
vertices
• Attractor Attr ∃ ( F ) (based on Pre∃ )
• Complement of an attractor is a trap for the other player
• Attractor and trap strategies are positional
• Reachability games are positionally determined
Challenge: Show that one of the players (the one who starts or
the other) has a winning strategy for every size of the board.
The proof is very short and uses positional determinacy of
reachability games. But it does not provide the strategy...
Games · MOVEP, June 2008 29 / 80
1 Basics
3 Büchi Games
5 Parity Games
Positional Determinacy
Algorithms for Parity Games
Reducing Muller Games to Parity Games
6 Applications
F F
F0 F0
• F0 = F
• W∀0 = Adam can avoid F0
F0 F0
• F0 = F
• W∀0 = Adam can avoid F0
• F1 = F0 \ Pre∀ (W∀0 )
F0 F1
• F0 = F
• W∀0 = Adam can avoid F0
• F1 = F0 \ Pre∀ (W∀0 )
F0 F1
• F0 = F
• W∀0 = Adam can avoid F0
• F1 = F0 \ Pre∀ (W∀0 )
• W∀1 = Adam can avoid F1
F0 F1
• F0 = F
• W∀0 = Adam can avoid F0
• F1 = F0 \ Pre∀ (W∀0 )
• W∀1 = Adam can avoid F1
• F2 = F1 \ Pre∀ (W∀1 ) = F1
Games · MOVEP, June 2008 32 / 80
Solving Büchi Games – Finite Graphs
Start with F0 := F . In Iteration i:
F0 ⊇ F1 ⊇ F2 ⊇ · · ·
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
W∀0 F0
W∀1 F1
W∀
.. ..
. .
W∀i
W∃ Attr ∃ ( Fi ) Fi
F F F ···
···
Fj = ∅
\
Fω =
j<ω
Theorem
Büchi games are positionally determined.
Complexity:
3 Büchi Games
5 Parity Games
Positional Determinacy
Algorithms for Parity Games
Reducing Muller Games to Parity Games
6 Applications
y1 x1
y2 x2
f : M × V∃ → V
y1 x1
F = {{ x1 , y1 }, { x2 , y1 }, { x1 , x2 , y1 , y2 }}
y2 x2
x1 , y1 , y2 x2 , y1 , y2
x2
f (m0 , x1 ) = y1
m0 m1
x1 f (m1 , x1 ) = y2
y1 x1
F = {{ x1 , y1 }, { x2 , y1 }, { x1 , x2 , y1 , y2 }}
y2 x2
y1
m0
x1 , y1 , y2 x2 , y1 , y2
x2
f (m0 , x1 ) = y1
m0 m1
x1 f (m1 , x1 ) = y2
y1 x1
F = {{ x1 , y1 }, { x2 , y1 }, { x1 , x2 , y1 , y2 }}
y2 x2
y1 x1
m0 m0
x1 , y1 , y2 x2 , y1 , y2
x2
f (m0 , x1 ) = y1
m0 m1
x1 f (m1 , x1 ) = y2
y1 x1
F = {{ x1 , y1 }, { x2 , y1 }, { x1 , x2 , y1 , y2 }}
y2 x2
y1 x1 y1
m0 m0 m0
x1 , y1 , y2 x2 , y1 , y2
x2
f (m0 , x1 ) = y1
m0 m1
x1 f (m1 , x1 ) = y2
y1 x1
F = {{ x1 , y1 }, { x2 , y1 }, { x1 , x2 , y1 , y2 }}
y2 x2
y1 x1 y1 x1
m0 m0 m0 m0
x1 , y1 , y2 x2 , y1 , y2
x2
f (m0 , x1 ) = y1
m0 m1
x1 f (m1 , x1 ) = y2
y1 x1
F = {{ x1 , y1 }, { x2 , y1 }, { x1 , x2 , y1 , y2 }}
y2 x2
y1 x1 y1 x1 y1
m0 m0 m0 m0 m0
x1 , y1 , y2 x2 , y1 , y2
x2
f (m0 , x1 ) = y1
m0 m1
x1 f (m1 , x1 ) = y2
y1 x1
F = {{ x1 , y1 }, { x2 , y1 }, { x1 , x2 , y1 , y2 }}
y2 x2
y1 x1 y1 x1 y1 x2
m0 m0 m0 m0 m0 m0
x1 , y1 , y2 x2 , y1 , y2
x2
f (m0 , x1 ) = y1
m0 m1
x1 f (m1 , x1 ) = y2
y1 x1
F = {{ x1 , y1 }, { x2 , y1 }, { x1 , x2 , y1 , y2 }}
y2 x2
y1 x1 y1 x1 y1 x2 y1
m0 m0 m0 m0 m0 m0 m1
x1 , y1 , y2 x2 , y1 , y2
x2
f (m0 , x1 ) = y1
m0 m1
x1 f (m1 , x1 ) = y2
y1 x1
F = {{ x1 , y1 }, { x2 , y1 }, { x1 , x2 , y1 , y2 }}
y2 x2
y1 x1 y1 x1 y1 x2 y1 x1
m0 m0 m0 m0 m0 m0 m1 m1
x1 , y1 , y2 x2 , y1 , y2
x2
f (m0 , x1 ) = y1
m0 m1
x1 f (m1 , x1 ) = y2
y1 x1
F = {{ x1 , y1 }, { x2 , y1 }, { x1 , x2 , y1 , y2 }}
y2 x2
y1 x1 y1 x1 y1 x2 y1 x1 y2
m0 m0 m0 m0 m0 m0 m1 m1 m0
x1 , y1 , y2 x2 , y1 , y2
x2
f (m0 , x1 ) = y1
m0 m1
x1 f (m1 , x1 ) = y2
y1 x1
F = {{ x1 , y1 }, { x2 , y1 }, { x1 , x2 , y1 , y2 }}
y2 x2
y1 x1 y1 x1 y1 x2 y1 x1 y2 x1
m0 m0 m0 m0 m0 m0 m1 m1 m0 m0
x1 , y1 , y2 x2 , y1 , y2
x2
f (m0 , x1 ) = y1
m0 m1
x1 f (m1 , x1 ) = y2
y1 x1
F = {{ x1 , y1 }, { x2 , y1 }, { x1 , x2 , y1 , y2 }}
y2 x2
y1 x1 y1 x1 y1 x2 y1 x1 y2 x1 y1
m0 m0 m0 m0 m0 m0 m1 m1 m0 m0 m0
x1 , y1 , y2 x2 , y1 , y2
x2
f (m0 , x1 ) = y1
m0 m1
x1 f (m1 , x1 ) = y2
m0 , x m1 , x
m0 , x m1 , x
3 Büchi Games
5 Parity Games
Positional Determinacy
Algorithms for Parity Games
Reducing Muller Games to Parity Games
6 Applications
3 2 2 3
2 0 4 1
3 2 2 3
2 0 4 1
3 2 2 3
2 0 4 1
3 2 2 3
2 0 4 1
3 2 2 3
2 0 4 1
3 2 2 3
2 0 4 1
3 2 2 3
2 0 4 1
Theorem
Parity games are positionally determined with uniform
positional winning strategies for both players on their winning
areas.
Theorem
Parity games are positionally determined with uniform
positional winning strategies for both players on their winning
areas.
A non-constructive proof:
U ···
U ···
U ···
U ··· ···
Attr ∃ (k)
W∃0
k
W∃0
k
W∃0
k
Attr ∃ (k)
W∃0
k
Attr ∃ (k)
W∃0
k
Attr ∃ (k)
W∃0
k
Attr ∃ (k)
W∃0
k
Attr ∃ (k)
W∃0
k
Attr ∃ (k)
W∃0
k
Attr ∃ (k)
W∃0
k
Attr ∃ (k)
Theorem
The decision problem “Given a parity game G and an initial
vertex v0 , does Eva have a winning strategy from v0 ?” is in
NP ∩ co-NP.
Theorem
The decision problem “Given a parity game G and an initial
vertex v0 , does Eva have a winning strategy from v0 ?” is in
NP ∩ co-NP.
Proof
Membership in NP:
Fk0
Attr ∃ ( Fk0 )
W∀0
W∃0
Attr ∃ ( Fk0 )
Fk1
Fk1
Attr ∃ ( Fk1 )
W1 ∀
solve subgame with
less priorities
Fk1
W∃1
Attr ∃ ( Fk1 )
..
.
Fki
Attr ∃ ( Fki )
{ O(nk )
Open problem:
Can parity games be solved in polynomial time?
• Memory update:
with c(v) = di
• This defines a parity game equivalent to the Muller game
as required for a game reduction.
Theorem
Muller games are determined and both players have uniform
strategies with memory of size at most |C |! on their winning
areas, where |C | is the number of colors of the Muller game.
Büchi
positional, time O(n2 )
reachability
positional, time O(n)
3 Büchi Games
5 Parity Games
Positional Determinacy
Algorithms for Parity Games
Reducing Muller Games to Parity Games
6 Applications
ϕ(α, β)
ϕ(α, β)
µX (• ∨ X ∨ (• ∧ ^X ))
Theorem
Model checking for modal µ-calculus is polynomial time
equivalent to the problem of solving parity games.
Büchi
positional, time O(n2 )
reachability
positional, time O(n)
Challenge: Show that one of the players (the one who starts or
the other) has a winning strategy for every size of the board.
The proof is very short and uses positional determinacy of
reachability games. But it does not provide the strategy...