Documentation

EconCSLib.GameTheory.ExtensiveGame.Play

EconCSLib.GameTheory.ExtensiveGame.Play #

Playing a game: given strategies, compute the path and outcome.

Main definitions #

Design note #

Since Arena supports infinite games, play uses fuel (max steps) to ensure termination. For finite games, sufficient fuel always reaches a terminal state.

def Arena.play (A : Arena) (choose : (s : A.State) → A.Action s) (start : A.State) (fuel : ) :

Play the game for at most fuel steps, using choose to pick actions. Returns the sequence of states visited.

Equations
Instances For
    def Arena.finalState (A : Arena) (choose : (s : A.State) → A.Action s) (start : A.State) (fuel : ) :

    The final state after at most fuel steps.

    Equations
    Instances For
      theorem Arena.finalState_zero (A : Arena) (choose : (s : A.State) → A.Action s) (s : A.State) :
      A.finalState choose s 0 = s
      theorem Arena.finalState_succ (A : Arena) (choose : (s : A.State) → A.Action s) (s : A.State) (n : ) :
      A.finalState choose s (n + 1) = A.finalState choose (A.next s (choose s)) n
      def ExtensiveGame.play {N : Type u_1} {U : Type u_2} (G : ExtensiveGame N U) (choose : (s : G.State) → G.Action s) (fuel : ) :

      Play the game from init for at most fuel steps. Requires a default action chooser for all states (including chance).

      Equations
      Instances For
        def ExtensiveGame.finalState {N : Type u_1} {U : Type u_2} (G : ExtensiveGame N U) (choose : (s : G.State) → G.Action s) (fuel : ) :

        The final state reached from init after at most fuel steps.

        Equations
        Instances For
          def ExtensiveGame.finalPayoff {N : Type u_1} {U : Type u_2} (G : ExtensiveGame N U) (choose : (s : G.State) → G.Action s) (fuel : ) (i : N) :
          U

          Payoff at the final state for player i.

          Equations
          Instances For