Synthesis of Optimal Strategies for Priced Timed Games Patricia Bouyer 1 , Franck Cassez 2 , Emmanuel Fleury 3 & Kim Guldstrand Larsen 3 1 LSV, ENS-Cachan, F 2 IRCCyN, Nantes, F . . 3 Comp. Science. Dept., Aalborg University, DK Université Libre de Bruxelles May 28, 2004 http://www.lsv.ens-cachan.fr/aci-cortos/ptga � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 1/24
Contents 1. Context & Related Work 2. Priced Timed Game Automata 3. Computing The Optimal Cost 4. Computing Optimal Strategies 5. Implementation using H Y T ECH � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 2/24
Context Timed Automata x ≤ 2 ; a 1 ℓ 2 x ≥ 2 ; a 4 a 2 y := 0 ℓ 0 ℓ 1 Goal a 3 [ y = 0] x ≥ 2 ; a 5 ℓ 3 � Timed Automata + Reachability [AD94] � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 3-a/24
Context Timed Game Automata x ≤ 2 ; c 1 ℓ 2 x ≥ 2 ; c 2 u y := 0 ℓ 0 ℓ 1 Goal u [ y = 0] x ≥ 2 ; c 2 ℓ 3 � Timed Automata + Reachability [AD94] � Timed Game Automata: Control [MPS95, AMPS98] � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 3-b/24
Context As soon As Possible in Timed Automata 1 ≤ x ≤ 2 ; a 1 ℓ 2 x ≥ 2 ; a 4 a 2 y := 0 ℓ 0 ℓ 1 Goal a 3 [ y = 0] x ≥ 2 ; a 5 ℓ 3 � Timed Automata + Reachability [AD94] � Timed Game Automata: Control [MPS95, AMPS98] � Time Optimal Reachability [AM99] � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 3-c/24
Context Reachability in Priced Timed Automata x ≥ 2 ; a 4 cost = 1 x ≤ 2 ; a 1 ℓ 2 a 2 y := 0 cost ( ℓ 2 ) = 10 ℓ 0 ℓ 1 Goal a 3 cost ( ℓ 0 ) = 5 [ y = 0] ℓ 3 x ≥ 2 ; a 5 cost = 7 cost ( ℓ 3 ) = 1 � Timed Automata + Reachability [AD94] � Timed Game Automata: Control [MPS95, AMPS98] � Time Optimal Reachability [AM99] � Priced (or Weighted) Timed Automata [LBB + 01, ALTP01] � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 3-d/24
Context Priced Timed Game Automata x ≥ 2 ; c 2 cost = 1 x ≤ 2 ; c 1 ℓ 2 u y := 0 cost ( ℓ 2 ) = 10 ℓ 0 ℓ 1 Goal u cost ( ℓ 0 ) = 5 [ y = 0] ℓ 3 x ≥ 2 ; c 2 cost = 7 cost ( ℓ 3 ) = 1 � Timed Automata + Reachability [AD94] � Timed Game Automata: Control [MPS95, AMPS98] � Time Optimal Reachability [AM99] � Priced (or Weighted) Timed Automata [LBB + 01, ALTP01] � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 3-e/24
An Example x ≥ 2 ; c 2 cost = 1 x ≤ 2 ; c 1 ℓ 2 u y := 0 cost ( ℓ 2 ) = 10 ℓ 0 ℓ 1 Goal u cost ( ℓ 0 ) = 5 [ y = 0] ℓ 3 x ≥ 2 ; c 2 cost = 7 cost ( ℓ 3 ) = 1 � Model = Game = Controller vs. Environment � What is the best cost whatever the environment does ? � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 4-a/24
An Example x ≥ 2 ; c 2 cost = 1 x ≤ 2 ; c 1 ℓ 2 u y := 0 cost ( ℓ 2 ) = 10 ℓ 0 ℓ 1 Goal u cost ( ℓ 0 ) = 5 [ y = 0] ℓ 3 x ≥ 2 ; c 2 cost = 7 cost ( ℓ 3 ) = 1 � What is the best cost whatever the environment does ? 0 ≤ t ≤ 2 max { 5 t + 10(2 − t ) + 1 , 5 t + (2 − t ) + 7 } inf � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 4-b/24
An Example x ≥ 2 ; c 2 cost = 1 x ≤ 2 ; c 1 ℓ 2 u y := 0 cost ( ℓ 2 ) = 10 ℓ 0 ℓ 1 Goal u cost ( ℓ 0 ) = 5 [ y = 0] ℓ 3 x ≥ 2 ; c 2 cost = 7 cost ( ℓ 3 ) = 1 � What is the best cost whatever the environment does ? 0 ≤ t ≤ 2 max { 5 t +10(2 − t )+1 , 5 t +(2 − t )+7 } at t = 4 3 inf = 141 inf 3 � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 4-c/24
An Example x ≥ 2 ; c 2 cost = 1 x ≤ 2 ; c 1 ℓ 2 u y := 0 cost ( ℓ 2 ) = 10 ℓ 0 ℓ 1 Goal u cost ( ℓ 0 ) = 5 [ y = 0] ℓ 3 x ≥ 2 ; c 2 cost = 7 cost ( ℓ 3 ) = 1 � What is the best cost whatever the environment does ? ⇒ 14 1 = 3 � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 4-d/24
An Example x ≥ 2 ; c 2 cost = 1 x ≤ 2 ; c 1 ℓ 2 u y := 0 cost ( ℓ 2 ) = 10 ℓ 0 ℓ 1 Goal u cost ( ℓ 0 ) = 5 [ y = 0] ℓ 3 x ≥ 2 ; c 2 cost = 7 cost ( ℓ 3 ) = 1 � What is the best cost whatever the environment does ? ⇒ 14 1 = 3 � Is there a strategy to achieve this optimal cost ? Yes because see later � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 4-e/24
An Example x ≥ 2 ; c 2 cost = 1 x ≤ 2 ; c 1 ℓ 2 u y := 0 cost ( ℓ 2 ) = 10 ℓ 0 ℓ 1 Goal u cost ( ℓ 0 ) = 5 [ y = 0] ℓ 3 x ≥ 2 ; c 2 cost = 7 cost ( ℓ 3 ) = 1 � What is the best cost whatever the environment does ? ⇒ 14 1 = 3 � Is there a strategy to achieve this optimal cost ? Yes because see later � Can we compute such a strategy ? Yes: in ℓ 0 , x < 4 3 wait then do c 1 ; in ℓ 2 , 3 do c 2 when x ≥ 2 � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 4-f/24
The Problems x ≥ 2 ; c 2 cost = 1 x ≤ 2 ; c 1 ℓ 2 u y := 0 cost ( ℓ 2 ) = 10 ℓ 0 ℓ 1 Goal u cost ( ℓ 0 ) = 5 [ y = 0] ℓ 3 x ≥ 2 ; c 2 cost = 7 cost ( ℓ 3 ) = 1 � Can we find an algorithm to solve these problems: 1. What is the best cost whatever the environment does? 2. Is there an optimal strategy? 3. Can we compute an optimal strategy (if ∃ )? � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 4-g/24
Related Work � La Torre et al. [LTMM02] • Acyclic Priced Timed Game Automata • Recursive definition of optimal cost [ = ⇒ La Torre et al. Def.] • Computation of the infimum of the optimal cost OptCost = 2 could be 2 or 2 + ε • No strategy synthesis � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 5-a/24
Related Work � La Torre et al. [LTMM02] • Acyclic Priced Timed Game Automata • Recursive definition of optimal cost [ = ⇒ La Torre et al. Def.] • Computation of the infimum of the optimal cost OptCost = 2 could be 2 or 2 + ε • No strategy synthesis � Our work: • Applies to Linear Hybrid Game (Automata) • Run-based definition of optimal cost • We can decide whether OptCost is reachable • We can synthetize an optimal strategy (if ∃ ) � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 5-b/24
Priced Timed Game Automata A Timed Game Automaton (PTGA) G is a tuple ( L, ℓ 0 , Act , X, E, inv , cost ) where: � L is a finite set of locations; � ℓ 0 ∈ L is the initial location; � Act = Act c ∪ Act u is the set of actions (partitioned into controllable and uncontrollable actions); � X is a finite set of real-valued clocks; � E ⊆ L × B ( X ) × Act × 2 X × L is a finite set of transitions; � inv : L − → B ( X ) associates to each location its invariant; � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 6-a/24
Priced Timed Game Automata A Priced Timed Game Automaton (PTGA) G is a tuple ( L, ℓ 0 , Act , X, E, inv , cost ) where: � L is a finite set of locations; � E ⊆ L × B ( X ) × Act × 2 X × L is a finite set of transitions; � Priced Version: cost : L ∪ E − → N associates to each location a cost rate and to each discrete transition a cost value. [ = ⇒ Example] � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 6-b/24
Priced Timed Game Automata A Priced Timed Game Automaton (PTGA) G is a tuple ( L, ℓ 0 , Act , X, E, inv , cost ) where: � L is a finite set of locations; � E ⊆ L × B ( X ) × Act × 2 X × L is a finite set of transitions; � Priced Version: cost : L ∪ E − → N associates to each location a cost rate and to each discrete transition a cost value. [ = ⇒ Example] � assume that PTGA are deterministic w.r.t. controllable actions � A reachability PTGA (RPTGA) = PTGA with distinguished Goal ⊆ L . � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 6-c/24
Configurations, Runs, Costs � configuration: ( ℓ, v ) in L × R X ≥ 0 � step: t i = ( ℓ i , v i ) α i − → ( ℓ i +1 , v i +1 ) � α i ∈ R > 0 = ⇒ ℓ i +1 = ℓ i ∧ v i +1 = v i + α i α i ∈ Act = ⇒ ∃ ( ℓ i , g, α i , Y, ℓ i +1 ) ∈ E ∧ v i | = g ∧ v i +1 = v i [ Y ] � run ρ = t 0 t 2 · · · t n − 1 · · · finite of infinite sequence of t i � cost of a transition: � Cost ( t i ) = α i . cost ( ℓ i ) if α i ∈ R > 0 Cost ( t i ) = cost (( ℓ i , g, α i , Y, ℓ i +1 )) if α i ∈ Act � if ρ finite Cost ( ρ ) = � 0 ≤ i ≤ n − 1 Cost ( t i ) � winning run if States ( ρ ) ∩ Goal � = ∅ � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 7/24
Strategies � strategy f over G = partial function from Runs ( G ) to Act c ∪ { λ } . � Outcome (( ℓ, v ) , f ) of f from configuration ( ℓ, v ) in G is a subset of Runs (( ℓ, v ) , G ) [ = ⇒ Formal Definition of Outcome] � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 8-a/24
Strategies x ≥ 2 ; c 2 cost = 1 x ≤ 2 ; c 1 ℓ 2 u y := 0 cost ( ℓ 2 ) = 10 ℓ 0 ℓ 1 Goal u cost ( ℓ 0 ) = 5 [ y = 0] ℓ 3 x ≥ 2 ; c 2 cost = 7 cost ( ℓ 3 ) = 1 f ( ℓ 0 , x < 4 f ( ℓ 0 , 4 3 ) = λ 3 ≤ x ≤ 2) = c 1 f ( ℓ 1 , − ) undefined Example: f ( ℓ 2 , x < 2) = λ f ( ℓ 2 , x ≥ 2) = c 2 f ( ℓ 3 , x ≥ 2) = c 2 f ( ℓ 3 , x < 2) = λ � IRCCyN/CNRS c Optimal Strategies for Priced Timed Game Automata page 8-b/24
Recommend
More recommend