Energy and Meanpayoff Games Laurent Doyen LSV, ENS Cachan & - - PowerPoint PPT Presentation

energy and mean payoff games
SMART_READER_LITE
LIVE PREVIEW

Energy and Meanpayoff Games Laurent Doyen LSV, ENS Cachan & - - PowerPoint PPT Presentation

Energy and Meanpayoff Games Laurent Doyen LSV, ENS Cachan & CNRS joint work with Aldric Degorre, Raffaella Gentilini, JeanFranois Raskin, Szymon Torunczyk ACTS 2010, Chennai Synthesis problem Specification avoid failure,


slide-1
SLIDE 1

Energy and Meanpayoff Games

Laurent Doyen LSV, ENS Cachan & CNRS joint work with Aldric Degorre, Raffaella Gentilini, JeanFrançois Raskin, Szymon Torunczyk ACTS 2010, Chennai

slide-2
SLIDE 2

Synthesis problem

Correctness relation

Specification

avoid failure, ensure progress, etc.

slide-3
SLIDE 3

Synthesis problem

Solved as a game – system vs. environment solution = winning strategy This talk: quantitative games (resource-constrained systems)

Correctness relation

System - Model Specification

avoid failure, ensure progress, etc.

slide-4
SLIDE 4

Energy games

(staying alive)

slide-5
SLIDE 5

play: (1,4) (4,1) (1,4) (4,1) … weights: 1 +2 1 +2 … energy level: 0 2 1 3 2 4 3 …

Energy games (CdAHS03,BFLM08)

Maximizer Minimizer positive weight = reward

slide-6
SLIDE 6
  • Energy games (CdAHS03,BFL+08)

Maximizer Minimizer positive weight = reward play: (1,4) (4,1) (1,4) (4,1) … weights: 1 +2 1 +2 … energy level: 0 2 1 3 2 4 3 … Initial credit

slide-7
SLIDE 7

Energy games

Strategies: Maximizer Minimizer play:

Infinite sequence of edges consistent with strategies and

  • utcome is winning if:

Energy level

slide-8
SLIDE 8

Energy games

Decision problem: Decide if there exist an initial credit c0 and a strategy of the maximizer to maintain the energy level always nonnegative.

slide-9
SLIDE 9

Energy games

Decision problem: Decide if there exist an initial credit c0 and a strategy of the maximizer to maintain the energy level always nonnegative. For energy games, memoryless strategies suffice.

slide-10
SLIDE 10

Energy games

c0=2 c0=2 c0=1 c0=0 A memoryless strategy is winning if all cycles are nonnegative when is fixed. Decision problem: Decide if there exist an initial credit c0 and a strategy of the maximizer to maintain the energy level always nonnegative. For energy games, memoryless strategies suffice.

slide-11
SLIDE 11

Energy games

c0=2 c0=2 c0=1 c0=0 A memoryless strategy is winning if all cycles are nonnegative when is fixed. Decision problem: Decide if there exist an initial credit c0 and a strategy of the maximizer to maintain the energy level always nonnegative. For energy games, memoryless strategies suffice.

slide-12
SLIDE 12

Algorithm

slide-13
SLIDE 13

Algorithm for energy games

Initial credit is useful to survive before a cycle is formed

Q: #states E: #edges W: maximal weight

Length(AcyclicPath) ≤ Q

slide-14
SLIDE 14

Algorithm for energy games

Initial credit is useful to survive before a cycle is formed Minimum initial credit is at most Q—W

Q: #states E: #edges W: maximal weight

Length(AcyclicPath) ≤ Q

slide-15
SLIDE 15

Algorithm for energy games

The minimum initial credit is such that: in Maximizer state q: in Minimizer state q: Compute successive underapproximations of the minimum initial credit.

slide-16
SLIDE 16

Algorithm for energy games

Fixpoint algorithm: start with

slide-17
SLIDE 17

Algorithm for energy games

Fixpoint algorithm: start with 0 1 0 1 0 0 0 2 iterate

at Maximizer states: at Minimizer states:

slide-18
SLIDE 18

Algorithm for energy games

0 1 2 0 1 1 0 0 0 0 2 2 Fixpoint algorithm: start with iterate

at Maximizer states: at Minimizer states:

slide-19
SLIDE 19

Algorithm for energy games

0 1 2 0 1 1 0 0 0 0 2 2 Fixpoint algorithm: start with iterate

at Maximizer states: at Minimizer states:

Termination argument: monotonic operators, and finite codomain Complexity: O(E—Q—W)

slide-20
SLIDE 20

Meanpayoff games

slide-21
SLIDE 21

Meanpayoff games (EM79)

Maximizer Minimizer positive weight = reward play: (1,4) (4,1) (1,4) (4,1) … weights: 1 +2 1 +2 … meanpayoff value:

(limit of weight average)

slide-22
SLIDE 22

Decision problem: Note: we can assume e.g. by shifting all weights by . Given a rational threshold , decide if there exists a strategy of the maximizer to ensure meanpayoff value at least . Meanpayoff value: either or

Meanpayoff games (EM79)

slide-23
SLIDE 23

Meanpayoff games

Decision problem: Assuming Given a rational threshold , decide if there exists a strategy of the maximizer to ensure meanpayoff value at least . Meanpayoff value: either or A memoryless strategy is winning if all cycles are nonnegative when is fixed.

slide-24
SLIDE 24

Meanpayoff games

Decision problem: Assuming Given a rational threshold , decide if there exists a strategy of the maximizer to ensure meanpayoff value at least . Meanpayoff value: either or A memoryless strategy is winning if all cycles are nonnegative when is fixed. logspace equivalent to energy games [BFL+08]

slide-25
SLIDE 25

Complexity

Energy games Meanpayoff games Decision problem

O(E—Q—W) O(E—Q—W) (this talk) O(E—Q2—W) [ZP96]

Deterministic Pseudopolynomial algorithms

slide-26
SLIDE 26

Outline

► Perfect information

  • Meanpayoff games
  • Energy games
  • Algorithms

► Imperfect information

  • Energy with fixed initial credit
  • Energy with unknown initial credit
  • Meanpayoff
slide-27
SLIDE 27

Imperfect information

(staying alive in the dark)

slide-28
SLIDE 28

Imperfect information – Why ?

  • Private variables/internal state
  • Noisy sensors

Strategies should not rely on hidden information

System - Model Specification

Correctness relation

avoid failure, ensure progress, etc.

slide-29
SLIDE 29

Imperfect information – How ?

  • Coloring of the state space
  • bservations = set of states with the same color
slide-30
SLIDE 30

Imperfect information – How ?

Maximizer states only

  • Playing the game:
  • 1. Maximizer chooses an action (a or b)
  • 2. Minimizer chooses successor state

(compatible with Maximizer’s action)

  • 3. The color of the next state is visible to Maximizer
slide-31
SLIDE 31
  • Actions

Observations

Imperfect information – How ?

slide-32
SLIDE 32

Observationbased strategies

  • Actions

Observations

Imperfect information – How ?

Goal: all outcomes have nonnegative energy level,

  • r nonnegative meanpayoff value
slide-33
SLIDE 33

Complexity

Energy games Meanpayoff games Perfect information

O(E—Q—W) O(E—Q—W) (this talk) O(E—Q2—W) [ZP96]

Imperfect information ? ?

slide-34
SLIDE 34

Two variants for Energy games: fixed initial credit unknown initial credit Observationbased strategies Goal: all outcomes have nonnegative energy level,

  • r nonnegative meanpayoff value

Imperfect information

slide-35
SLIDE 35

Fixed initial credit

Can you win with initial credit = 3 ? Actions Observations

slide-36
SLIDE 36

Fixed initial credit

Can you win with initial credit = 3 ? Keep track of which can be the current state, and what is the worstcase energy level Initially: (3,⊥,⊥)

slide-37
SLIDE 37

Example

(3,⊥,⊥) (⊥,2,2)

slide-38
SLIDE 38

Example

(3,⊥,⊥) (⊥,2,2) (3,⊥,⊥) (⊥,2,1) (⊥,1,3) (3,⊥,⊥)

slide-39
SLIDE 39

Example

(3,⊥,⊥) (⊥,2,2) (3,⊥,⊥) (⊥,2,1) (⊥,1,3) (3,⊥,⊥)

  • Stop search whenever

negative value, or comparable ancestor

slide-40
SLIDE 40

Example

(3,⊥,⊥) (⊥,2,2) (3,⊥,⊥) (⊥,2,1) (⊥,1,3) (3,⊥,⊥)

  • (4,⊥,⊥) (⊥,1,0)

(⊥,1,4) (2,⊥,⊥)

  • Stop search whenever:

negative value, or comparable ancestor

slide-41
SLIDE 41

Example

(3,⊥,⊥) (⊥,2,2) (3,⊥,⊥) (⊥,2,1) (⊥,1,3) (3,⊥,⊥)

  • (4,⊥,⊥) (⊥,1,0)

(⊥,1,4) (2,⊥,⊥)

  • Initial credit = 3 is not sufficient !
slide-42
SLIDE 42

Example

(3,⊥,⊥) (⊥,2,2) (3,⊥,⊥) (⊥,2,1) (⊥,1,3) (3,⊥,⊥)

  • (4,⊥,⊥) (⊥,1,0)

(⊥,1,4) (2,⊥,⊥)

  • Search will terminate because is

wellquasi ordered.

slide-43
SLIDE 43

Example

(3,⊥,⊥) (⊥,2,2) (3,⊥,⊥) (⊥,2,1) (⊥,1,3) (3,⊥,⊥)

  • (4,⊥,⊥) (⊥,1,0)

(⊥,1,4) (2,⊥,⊥)

  • Search will terminate because is

wellquasi ordered. Upper bound: nonprimitive recursive Lower bound: EXPSPACEhard

Proof (not shown in this talk): reduction from the infinite execution problem of Petri Nets.

slide-44
SLIDE 44

Complexity

Energy games

(unknown initial credit)

Meanpayoff games Perfect information

O(E—Q—W) O(E—Q—W) (this talk) O(E—Q2—W) [ZP96]

Imperfect information

r.e. ?

slide-45
SLIDE 45

Memory requirement

Corollary: Finitememory strategies suffice in energy games With imperfect information:

slide-46
SLIDE 46

Memory requirement

Corollary: Finitememory strategies suffice in energy games In meanpayoff games:

  • memory may be required
  • limsup vs. liminf definition do coincide

With imperfect information:

slide-47
SLIDE 47

Memory requirement

Energy games Meanpayoff games Perfect information

memoryless memoryless

Imperfect information

finite memory infinite memory

slide-48
SLIDE 48

Unknown initial credit

The unknown initial credit problem for energy games is undecidable. Theorem Proof: Using a reduction from the halting problem

  • f 2counter machines.

(even for blind games)

slide-49
SLIDE 49

2counter machines

q1: inc c1 goto q2 q2: inc c1 goto q3 q3: if c1 == 0 goto q6 else dec c1 goto q4 q4: inc c2 goto q5 q5: inc c2 goto q3 q6: halt

  • 2 counters c1, c2
  • increment, decrement, zero test
slide-50
SLIDE 50

2counter machines

q1: inc c1 goto q2 q2: inc c1 goto q3 q3: if c1 == 0 goto q6 else dec c1 goto q4 q4: inc c2 goto q5 q5: inc c2 goto q3 q6: halt

  • 2 counters c1, c2
  • increment, decrement, zero test
slide-51
SLIDE 51

Reduction

q1: inc c1 goto q2 q2: inc c1 goto q3 q3: if c1 == 0 goto q6 else dec c1 goto q4 q4: inc c2 goto q5 q5: inc c2 goto q3 q6: halt

Reduction: Given M, construct GM such that M halts iff there exists a winning strategy in GM (with some initial credit).

!

  • Deterministic machine
  • Nonnegative counters

Given M and state qhalt, decide if qhalt is reachable (i.e., M halts). Halting problem:

slide-52
SLIDE 52

Reduction

q1: inc c1 goto q2 q2: inc c1 goto q3 q3: if c1 == 0 goto q6 else dec c1 goto q4 q4: inc c2 goto q5 q5: inc c2 goto q3 q6: halt

  • Blind game (unique observation)
  • Initial nondeterministic jump to several gadgets
  • Winning strategy = (#AcceptingRun)ω
slide-53
SLIDE 53

Gadgets

Reminder: Winning strategy = #AcceptingRun#AcceptingRun#... Gadget 1: « First symbol is # »

slide-54
SLIDE 54

Gadgets

Reminder: Winning strategy = #AcceptingRun#AcceptingRun#... Gadget 2: « Every σ1 is followed by σ2 »

slide-55
SLIDE 55

Gadgets

Gadget 3: « Infinitely many # » Reminder: Winning strategy = #AcceptingRun#AcceptingRun#... Guess: this is the last #

(and a bit more…)

slide-56
SLIDE 56

Gadgets

Gadget 4: « Counter correctness » Check zero tests on c

slide-57
SLIDE 57

Gadgets

Gadget 4: « Counter correctness » Check zero tests on c

slide-58
SLIDE 58

Gadgets

Gadget 4: « Counter correctness » Check zero tests on c Check nonzero test

  • n c
slide-59
SLIDE 59

Correctness

q1: inc c1 goto q2 q2: inc c1 goto q3 q3: if c1 == 0 goto q6 else dec c1 goto q4 q4: inc c2 goto q5 q5: inc c2 goto q3 q6: halt

  • If M halts, then (#AcceptingRun)ω is a winning strategy with

initial credit Length(AcceptingRun).

  • If there exists a winning strategy with finite initial credit,

then # occurs infinitely often, and finitely many cheats occur. Hence, M has an accepting run.

slide-60
SLIDE 60

Meanpayoff games

Theorem Proof: Using a reduction from the halting problem

  • f 2counter machines.

(even blind games) Nota: the proof works for both limsup and liminf, but only for strict meanpayoff objective (i.e., MP > )

Meanpayoff games are undecidable (not cor.e.).

slide-61
SLIDE 61

Reduction: Given M, construct GM such that M halts iff there exists a strategy to ensure strictly positive meanpayoff value.

Meanpayoff games

Meanpayoff games are undecidable (not cor.e.). Theorem Proof: Using a reduction from the halting problem

  • f 2counter machines.

(even blind games)

slide-62
SLIDE 62

Gadgets

Reminder: Winning strategy = #AcceptingRun#AcceptingRun#... Gadget 1: « First symbol is # »

slide-63
SLIDE 63

Gadgets

Reminder: Winning strategy = #AcceptingRun#AcceptingRun#... Gadget 2: « Every σ1 is followed by σ2 »

slide-64
SLIDE 64

Gadgets

Gadget 3: « Infinitely many # » Reminder: Winning strategy = #AcceptingRun#AcceptingRun#... Guess: this is the last #

(and a bit more…)

slide-65
SLIDE 65

Gadgets

Gadget 4: « Counter correctness » Check zero tests on c Check nonzero test

  • n c
slide-66
SLIDE 66

Complexity

Energy games

(unknown initial credit)

Meanpayoff games Perfect information

O(E—Q—W) O(E—Q—W) (this talk) O(E—Q2—W) [ZP96]

Imperfect information

r.e. not cor.e. ? not cor.e.

slide-67
SLIDE 67

Meanpayoff games

Meanpayoff games are undecidable (not r.e.). Theorem Proof: Using a reduction from the nonhalting problem of 2counter machines.

(for games with at least 2 observations) Nota: the proof works only for limsup and nonstrict meanpayoff

  • bjective (i.e., MP ≥

)

slide-68
SLIDE 68

Reduction: Given M, construct GM such that M iff there exists a strategy to ensure strictly nonnegative meanpayoff value.

Meanpayoff games

Meanpayoff games are undecidable (not r.e.). Theorem Proof: Using a reduction from the nonhalting problem of 2counter machines.

(for games with at least 2 observations)

slide-69
SLIDE 69

Reduction

  • 2observation game
  • Initial nondeterministic jump to several gadgets

. (+ backedges)

  • Winning strategy = NonterminatingRun
slide-70
SLIDE 70

Gadgets

Gadget 3: « avoid halting state » Reminder: Winning strategy = NonterminatingRun

slide-71
SLIDE 71

Gadgets

Gadget 5 and 6: « Counter correctness » Check nonzero test on c

slide-72
SLIDE 72

Gadgets

Gadget 5 and 6: « Counter correctness » Check zero tests on c

slide-73
SLIDE 73

Correctness

  • If M does not halt, then NonterminatingRun is a winning

strategy.

  • If M halts, then Maximizer has to cheat within L steps where

L = Size(AcceptingRun), or reaches halting state, thus he ensures meanpayoff at most 1/L.

slide-74
SLIDE 74

Complexity

Energy games

(unknown initial credit)

Meanpayoff games Perfect information

O(E—Q—W) O(E—Q—W) (this talk) O(E—Q2—W) [ZP96]

Imperfect information

r.e. not cor.e. not r.e. not cor.e.

Nota: whether there exists a finitememory winning strategy in meanpayoff games is also undecidable.

slide-75
SLIDE 75

Decidability result

Energy and meanpayoff games with are decidable (EXPTIMEcomplete). Weights are if implies Weighted subset construction is finite

slide-76
SLIDE 76

Complexity

not r.e. not cor.e. r.e. not cor.e.

Imperfect information

EXPTIME-complete EXPTIME-complete

Visible weights Energy games

(unknown initial credit)

Meanpayoff games Perfect information

O(E—Q—W) O(E—Q—W) (this talk) O(E—Q2—W) [ZP96]

slide-77
SLIDE 77
  • Quantitative games with imperfect information
  • Undecidable in general
  • Energy with fixed initial credit decidable
  • Visible weights decidable
  • Open questions
  • Strict vs. nonstrict meanpayoff
  • Liminf vs. Limsup
  • Blind meanpayoff games
  • Related work
  • Incorporate liveness conditions (e.g. parity)

Conclusion

slide-78
SLIDE 78

Thank you ! Questions ?

The end

slide-79
SLIDE 79

References

  • P. Bouyer, U. Fahrenberg, K.G. Larsen, N. Markey, and J.

Srba, , Proc. of FORMATS: Formal Modeling and Analysis of Timed Systems, LNCS 5215, Springer, pp. 33 47, 2008 [BFL+08]

  • A. Ehrenfeucht, and J. Mycielski,

!, International Journal of Game Theory, vol. 8, pp. 109113, 1979 [EM79] A.Chakrabarti, L. de Alfaro, T.A. Henzinger, and M. Stoelinga. "", Proc. of EMSOFT: Embedded Software, LNCS 2855, Springer, pp.117133, 2003 [CdAHS03]