Presentation is loading. Please wait.

Presentation is loading. Please wait.

Krishnendu Chatterjee and Laurent Doyen. Energy parity games are infinite two-player turn-based games played on weighted graphs. The objective of the game.

Similar presentations


Presentation on theme: "Krishnendu Chatterjee and Laurent Doyen. Energy parity games are infinite two-player turn-based games played on weighted graphs. The objective of the game."— Presentation transcript:

1 Krishnendu Chatterjee and Laurent Doyen

2 Energy parity games are infinite two-player turn-based games played on weighted graphs. The objective of the game combines a (qualitative) parity condition with the (quantitative) requirement that the sum of the weights (i.e., the level of energy in the game) must remain positive.

3  In the synthesis problem implementations are obtained from winning strategies in games with a qualitative objective.  Games with quantitative objective are natural models in economics, where players have to optimize a real-valued payoff.  There is considerable interest in the design of reactive systems that work in resource- constrained environments, such as embedded systems – that have both a quantitative component (specifying the resource constraint such as power consumption) and a qualitative component (specifying the functional requirement).

4  Two-player turn-based games  Played for infinitely many rounds  A weight is associated to each edge  A priority is associated to each state  In each round, the player owning the current state chooses an outgoing edge to a successor state.

5  A play satisfies the parity condition if the least priority occurring infinitely often in the play is even.  The quantitative specification requires that the sum of the weights along the play remains always positive.  The game goals are a-symmetric for player-1 and player-2.

6 Decide if there exists an initial credit (initial energy level) such that player-1 has a strategy to maintain the level of energy positive while satisfying the parity condition, and if the answer is yes, to compute the minimum such initial credit.

7  Exponential memory is su ffi cient and may be necessary for winning strategies in energy parity games.  The problem of deciding the winner in energy parity games can be solved in NP ∩ coNP.  An algorithm to solve energy parity by reduction to energy games (find minimal initial energy).

8 Game graphs: A game graph G = consists of a finite set Q of states partitioned into player-1 states Q1 and player-2 states Q2 (i.e., Q = Q1∪Q2), and a set E ⊆ Q×Q of edges such that for all q ∈ Q, there exists (at least one) q′∈ Q such that (q, q′) ∈ E. A player-1 game is a game graph where Q1=Q and Q2=∅.

9 The subgraph of G induced by S ⊆ Q is the graph (which is not a game graph in general); The subgraph induced by S is a game graph if for all s ∈ S there exist s′∈ S such that (s,s′)∈E.

10  Each player i chooses the next state iff the current state.  The game results in a play from q 0 - i.e. an infinite path ρ = q 0 q 1... such that (q i,q i+1 )∈E for all i ≥ 0.  The prefix of length n of ρ is denoted by ρ(n)=q 0...q n.  A strategy for player-1 is a function σ:Q ∗ Q 1 →Q such that (q, σ(ρ·q))∈E for all ρ∈Q ∗ and q∈Q 1.

11  An outcome of σ from q 0 is a play q 0 q 1... such that σ(q 0...q i ) = q i+1 for all i ≥ 0 such that q i ∈Q 1.

12 An objective for G is a set φ ⊆ Q ω. Let p:Q→N be a priority function and w:E→Z be a weight function. We denote by W the largest weight (in absolute value) according to w. The energy level of a prefix γ=q 0 q 1...q n of a play is, and the mean-payof of a play ρ = q 0 q 1... is MP(w, ρ) = lim inf n→∞ n 1 · EL(w, ρ(n)).  We denote by Inf(ρ) the set of states that occur infinitely often in ρ.

13  Parity objectives: The parity objective Parity G (p) = {π ∈ Plays(G) | min{p(q)|q∈Inf(π)} is even } requires that the minimum priority visited infinitely often be even. The special cases of Buchi and coBuchi objectives correspond to the case with two priorities, p : Q → {0, 1} and p : Q → {1, 2} respectively.

14  Energy objectives: Given an initial credit c 0 ∈N∪{∞}, the energy objective PosEnergy G (c 0 ) = {π ∈ Plays(G) | ∀n≥0 : c 0 +EL(π(n)) ≥ 0} requires that the energy level be always positive.  Mean-payof objectives: Given a threshold ν∈Q, the mean-payof objective MeanPayoff G (ν) = {π ∈ Plays(G) | MP(π) ≥ ν} requires that the mean-payoff value be at least ν.

15  Combined objectives: The energy parity objective Parity G (p)∩PosEnergy G (c 0 ) and the mean-payof parity objective Parity G (p)∩MeanPayof G (ν) combine the requirements of parity and energy (resp., mean-payof) objectives.

16  A player-1 strategy σ is winning in a state q for an objective φ if ρ∈φ for all outcomes ρ of σ from q. For energy and energy parity objectives with unspecified initial credit, we also say that a strategy is winning if it is winning for some finite initial credit.

17  The initial credit problem asks, given an energy parity game and a state q, whether there exists a finite initial credit c 0 ∈N and a winning strategy for player-1 from q with initial credit c 0.  The minimum initial credit in a state q 0 ∈Q is the least value of initial credit for which there exists a winning strategy for player-1 in q 0.  A strategy for player-1 is optimal in a state q 0 if it is winning from q 0 with the minimum initial credit.

18  Memory of size 4 ・ n ・ d ・ W is sufficient for a winning strategy of player-1 (n states and d priorities).  For player-2, memoryless winning strategies exist.  If player-1 wins, then the minimum initial credit is at most (n−1) ・ W.

19 Let G be a player-1 energy parity game with n states. If player-1 wins in G from a state q 0, then player 1 has a winning strategy from q 0 with memory of size 2·(n−1)·W+1 and initial credit (n−1)·W.

20 We present a family of player-1 games where memory of size 2·(n−1)·W+1 and initial credit of (n−1)·W may be necessary.

21  Q 1 = Q (since it’s a player-1 game).  Player-1 is winning.  Consider an outcome ρ of an optimal strategy for player-1: ◦ Min priority of states in Inf(ρ) is even. ◦ Inf(ρ) is strongly connected. ◦ There exists a suffix ρ’ of ρ that only contains states in Inf(ρ).  Let {C i } be the cycle decomposition of ρ’.  We will construct a fitting winning strategy.

22  We consider two cases.  First: If EL(C i )>0 for some cycle C i, from the starting state q 0 reach the cycle C i and pump the cycle until the energy level reaches 2(n-1)W, then reach a state of Inf(ρ) with the minimal priority and go back to cycle C i.  Rinse and repeat forever.  Each ‘reach’ consumes at most (n-1)W energy, thus a starting energy of (n-1)W will sustain the energy>0 requirement.

23  Second: if EL(C i ) ≤0 for all cycles C i.  There must be a k≥1 such that EL(C j )=0 for all j≥k (or else we lose the energy condition).  Since the parity condition is satisfied in ρ the minimal priority of states in inf(ρ) is visited by some cycle C j.  Go to cycle C j from the starting state and pump it forever.  In both cases, player-1 wins with memory size 2·(n−1)·W+1 and initial credit (n−1)·W.

24  Let G be an energy parity game, and for each winning state q let v(q)∈N be the minimum initial credit in q. For all outcomes ρ of an optimal strategy σ in G from a winning state q 0, if the initial credit is v(q 0 )+c for c≥0, then the energy level at all positions of ρ where a state q occurs is at least v(q)+c.  i.e.: An optimal strategy behaves the same even if we give it extra initial energy.

25  For all outcomes ρ of σ, the energy level for all q in ρ must be at least v(q) (otherwise player-2 can win from q, and therefore wins in the original game in contradiction to σ being a winning strategy).  Since strategies are functions of sequence of states only (and not of their energy level), if we start with energy level v(q 0 )+c, then the energy level at all positions of an outcome of σ is greater by c than if we had started with energy level v(q 0 ).

26 For all energy parity games G, memoryless strategies are sufficient for player 2 (i.e., the minimum initial credit for player 1 does not change if player 2 is restricted to play memoryless).

27  we give upper bounds on the memory and initial credit necessary for player-1 in energy parity games.

28  A strategy σ for player 1 is good-for-energy in state q if for all outcomes ρ=q 0 q 1... of σ such that q 0 =q, for all cycles γ=q i...q i+k in ρ (where k>0 and q i =q i+k ), either EL(γ)>0, or EL(γ)=0 and γ is even (i.e., minimum priority in γ is even).

29  We will show that good-for-energy strategies that are memoryless exist.

30 Let Win be the set of winning states for player1 in an energy parity game. Then, there exists a memoryless strategy for player 1 which is good-for-energy in every state q∈Win.

31 The definition of good-for-energy strategy in a state q can be viewed as a winning strategy in a finite cycle-forming game from q where the game stops when a cycle C is formed.

32 By [Memoryless determinacy of parity and mean payoff games, 2004] we know both players have memoryless optimal strategies in this finite cycle-forming game.

33 Given a state q∈Win where player-1 wins, towards contradictions assume he has no good-for-energy strategy from q. Then he loses the cycle-forming game. Which means player-2 wins the cycle forming game with a memoryless-strategy.

34 Use player-2’s strategy in the original energy parity game and pump the cycles forever instead of stopping. Then all cycles in the outcome have either negative weight or zero weight and the least priority is odd. Which means player-1 loses the energy parity game in contradiction to q∈Win. Thus: player-1 has a memoryless good-for- energy strategy σ q from q.

35 The player-1 attractor of a given set S ⊆ Q is the set of states from which player 1 can force to reach a state in S.

36 Defined as the limit Attr 1 (S) of the sequence: A 0 = S A i+1 = A i ∪ {q ∈ Q 1 | ∃(q, q ′ )∈E : q ′ ∈ A i } ∪ {q ∈ Q 2 | ∀(q, q ′ )∈E : q ′ ∈A i } for all i ≥ 0.

37 The subgraph of G induced by Q\Attr i (S) is again a game graph (i.e., every state has an outgoing edge). Attractors can be computed in polynomial time.

38 For all energy parity games G with n states and d priorities, if player 1 wins from a state q 0, then player 1 has a winning strategy from q 0 with memory of size 4·n·d·W and initial credit (n−1)·W.

39 For all energy parity games, the following assertions hold: 1) Winning strategies with memory of size 4·n·d·W exist for player-1 (Lemma 5). 2) Memoryless winning strategies exist for player-2 (Lemma 3).

40 Strategy Complexity To Computational Complexity

41 We show that the initial credit problem for energy parity games is in NP ∩ coNP.

42 This is the upper-bound only, and might be lower since we already use exponential memory for player-1 winning strategies.

43 Let G be an energy parity game. The problem of deciding, given a state q 0 and a memoryless strategy σ, whether σ is good- for-energy in q 0, can be solved in polynomial time.

44 Look at the states in G reachable via the strategy σ. For each state q in this graph, an algorithm for the shortest path problem can be used to check in polynomial time that every cycle through q has nonnegative sum of weights. For the states with odd priority we check that the sum is strictly positive.

45  We first establish the NP membership of the initial credit problem for the case of energy parity games with two priorities.

46 Memoryless strategies are sufficient for player1 to win energy co-Buchi games (i.e., the minimum initial credit for player-1 does not change if player-1 is restricted to play memoryless).

47 The problem of deciding, given a state q in an energy Buchi (resp. coBuchi) game G, if there exists a finite initial credit such that player-1 wins in G from q is in NP.

48 For energy coBuchi games we guess all possible memoryless strategies for player-1 (Lemma 7) and check in polynomial time that he wins both the energy game and the coBuchi game (ensuring all cycles are positive and visit only priority-2 states).

49 For energy Buchi games we guess the winning set Win, a memoryless strategy σ b in G WIN for the Buchi game and σ gfe on Win (exists by Lemma 4). Check in polynomial time that σ b enforces a visit to a priority-0 state in Win, that σ gfe is good-for-energy (Lemma 6) and that q∈Win.

50 The problem of deciding, given a state q in an energy parity game G, if there exists an initial credit such that player 1 wins in G from q is in NP.

51 * Induction of number of priorities d, starting with d=2 (Lemma 8).

52 The problem of deciding the existence of a finite initial credit for energy parity games is in NP ∩ coNP.

53 NP: by Lemma 9. coNP: since memoryless strategies are sufficient for player-2 (by Lemma 3), we can guess a memoryless strategy for player-2 and check in polynomial time that all cycles in the graph induces by this strategy are either odd or negative.

54  Decide the winner in energy parity games.  Complexity exponential in the number of states (as for parity games), but linear in the largest weight (as for energy games).  The algorithm is based on a procedure to construct memoryless good-for-energy strategies.

55 The problem of deciding the existence of a memoryless good-for-energy strategy in energy parity games can be solved in time O(|E|·|Q| d+2 ·W).

56 Given an energy parity game, we construct a new weight function w’ such that player-1 has a memoryless GFE strategy in iff player-1 wins the energy game.

57  We modify the weights in the game so that every simple cycle with (original) sum of weight 0 gets a strictly positive weight if it is even, and a strictly negative weight if it is odd.  Originally positive/negative cycles remain with the same sign.

58 Fomally: w’(q,q’) = w(q,q’) + d(q) Where: d(q) = k=p(q), n=|Q|

59 w’(q,q’) = w(q,q’) + Note: |d(q)| <, and in particular |d(q)|< Therefore: n|d(q)| 0 then EL’(γ)>0. Moreever, if the least priority in γ in k:

60 Therefore, a (memoryless) winning strategy in the energy game can be used as a good-for-energy strategy in (and vice-versa). The energy game can be solved in O(|E||Q|W’) [faster algorithm for mean-payoff games, 2009]. To get integer weights back we multiple w’ by n d+1, thus W’=Wn d+1 and we get the complexity GFE(d)=O(|E|·|Q| d+2 ·W).

61  Generalization of McNaughton and Zielonka algorithm for solving parity games.  Assume without loss of generality that the least priority in the input game graph is either 0 or 1.  The algorithm considers two cases: ◦ (a) when the minimum priority is 0. ◦ (b) when the minimum priority is 1.

62  Least priority is 0 ◦ A 0,A 1,... Decreasing set of possible player-1 winning states. ◦ A’ i ⊆A i contains the states having GFE strategies (which is necessary to win by Lemma 4). ◦ X i ⊆A’ i is the set of states from which player-1 can force a visit to priority-0 states. ◦ Z i ⊆A’ i \X i are the Player-2 winning states in A’ i \X i.

63

64 G When minimal priority = 0

65 G AiAi

66 G AiAi Ai’Ai’

67 G AiAi Ai’Ai’ XiXi

68 G AiAi Ai’Ai’ XiXi ZiZi

69 G Ai’Ai’ ZiZi AiAi A i+1

70  Note that A’ i \X i has less priorities than A’ i.  Z i are the Player-2 winning states in A’ i \X i which are also Player-2 winning states in G.  We remove Z i and Player-2 attractor to Z i in A i+1.  When A i =A i−1 Player-1 wins by playing a winning strategy in A’ i \X i (which no longer contain any Z i ‘s) and when ever the game enters X i Player-1 can force a visit to a priority-0 state and use GFE strategy to recover enough energy to proceed.

71  The problem of deciding the existence of a finite initial credit for energy parity games can be solved in time O(|E|·d·|Q| d+3 ·W ).

72  By lemma 10 we know that computing GFE strategies takes: GFE(d)=O(|E|·|Q| d+2 ·W ).  Let T(d) be the complexity of Algorithm 1.  Attractors can be computed in O(|E|).  Every recursive call removes at least one state from A i (or B i ) so there are at most |Q| recursive call.  The number of priorities decreases every recursive call.

73  Thus:T(d) ≤ |Q|·(GFE(d)+T(d−1))  Since:|Q|·GFE(d) = GFE(d+1)  We get:T(d) ≤ GFE(d+1)+|Q|·T(d−1)  And:T(0) = O(1)  Finally:T(d) ≤ d·GFE(d+1)+|Q| d  T(d) = O(|E|·d·|Q| d+3 ·W +|Q| d )  T(d) = O(|E|·d·|Q| d+3 ·W )

74 The procedure SolveEnergyGame() also computes v(q) in each winning state of the energy game which is the minimum initial credit in the original game after rounding to an integer. Thus computing the minimum initial credit for Energy Parity Games can be done in O(|E|·d·|Q| d+3 ·W).

75 In the case of energy coBuchi games, the smallest priority is 1 and there is only one other priority, thus the recursion will solve the simple energy game in O(|E|·|Q|·W) and solve the energy coBuchi game in O(|E|·|Q| 2 ·W). A similar analysis gives O(|E|·|Q| 5 ·W) for energy Buchi games.

76 Thank You !


Download ppt "Krishnendu Chatterjee and Laurent Doyen. Energy parity games are infinite two-player turn-based games played on weighted graphs. The objective of the game."

Similar presentations


Ads by Google