Documentation

CslibFrontier.GameTheory.Extensive.Basic

Extensive-form games with information sets and perfect recall #

An extensive-form game with imperfect information (ExtensiveTree ι H Act) is a finite rooted game tree over player set ι, information sets H i for each player i, and choice types Act i h at each information set h : H i ([vS07], Section 3.7). Every node belonging to h has the same choice type Act i h.

A pure strategy of player i (PureStrategy H Act i) assigns a choice Act i h to every information set h : H i. A behavior strategy (IsBehaviorStrategy) assigns a mixed strategy IsMixedStrategy (β h) independently at each h : H i. A mixed strategy is a probability distribution IsMixedStrategy μ over PureStrategy H Act i.

Each terminal path z : Terminal T induces a player-i sequence z.seq i : Seq H Act i of (information set, action) pairs. Under both mixed and behavior profiles, terminal-node probabilities factor as the product of the chance-node probability (z.chanceWeight) and player-wise sequence realization probabilities (terminalProbMixed_eq, terminalProbBehavior_eq). Two strategies of player i are realization-equivalent if they induce the same terminal-node distribution against every pure strategy profile of the other players (RealizationEquivMixed, RealizationEquivMixedBehavior), which implies identical distributions and expected payoffs against arbitrary mixed and behavior opponent profiles as well.

An extensive game satisfies perfect recall for player i (PerfectRecall T i, [vS07], Section 3.10, p. 70) if all decision nodes of player i in the same information set h are preceded by the same sequence of player-i choices. In particular, no root-to-leaf path visits any information set of player i more than once (PerfectRecall.noRepeatedInfoSet).

Main definitions #

Main results #

References #

inductive Cslib.GameTheory.Extensive.ExtensiveTree (ι : Type u) (H : ι → Type v) (Act : (i : ι) → H i → Type) :
Type (max u v 1)

A finite extensive-form game tree over player set ι, information sets H i, and choice types Act i h at each information set h : H i ([vS07], Section 3.7).

@[reducible, inline]
abbrev Cslib.GameTheory.Extensive.PureStrategy {ι : Type u} (H : ι → Type v) (Act : (i : ι) → H i → Type) (i : ι) :

A pure strategy of player i assigns an action at every information set h : H i.

@[reducible, inline]
abbrev Cslib.GameTheory.Extensive.Choice {ι : Type u} (H : ι → Type v) (Act : (i : ι) → H i → Type) (i : ι) :

A choice pair (h, a) of player i.

@[reducible, inline]
abbrev Cslib.GameTheory.Extensive.Seq {ι : Type u} (H : ι → Type v) (Act : (i : ι) → H i → Type) (i : ι) :

A sequence of choice pairs of player i.

def Cslib.GameTheory.Extensive.IsBehaviorStrategy {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} [(h : H i) → Fintype (Act i h)] (β : (h : H i) → Act i h → ℝ) :

A behavior strategy of player i assigns a mixed strategy independently at each information set h : H i.

def Cslib.GameTheory.Extensive.pureToBehavior {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} [(h : H i) → DecidableEq (Act i h)] (s : PureStrategy H Act i) (h : H i) :
Act i h → ℝ

View a pure strategy of player i as a deterministic behavior strategy.

@[simp]
theorem Cslib.GameTheory.Extensive.pureToBehavior_apply {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} [(h : H i) → DecidableEq (Act i h)] (s : PureStrategy H Act i) (h : H i) (a : Act i h) :
pureToBehavior s h a = Pi.single (s h) 1 a
theorem Cslib.GameTheory.Extensive.isBehaviorStrategy_pureToBehavior {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} [(h : H i) → Fintype (Act i h)] [(h : H i) → DecidableEq (Act i h)] (s : PureStrategy H Act i) :
def Cslib.GameTheory.Extensive.behaviorToMixed {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} [Fintype (H i)] (β : (h : H i) → Act i h → ℝ) (s : PureStrategy H Act i) :

The product mixed strategy induced by a behavior strategy β: independently sample s h from β h at each information set h : H i.

@[simp]
theorem Cslib.GameTheory.Extensive.behaviorToMixed_apply {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} [Fintype (H i)] (β : (h : H i) → Act i h → ℝ) (s : PureStrategy H Act i) :
behaviorToMixed β s = ∏ h : H i, β h (s h)
theorem Cslib.GameTheory.Extensive.isMixedStrategy_behaviorToMixed {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} [Fintype (H i)] [DecidableEq (H i)] [(h : H i) → Fintype (Act i h)] {β : (h : H i) → Act i h → ℝ} (hβ : IsBehaviorStrategy β) :
def Cslib.GameTheory.Extensive.MatchesSeq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} (s : PureStrategy H Act i) (σ : Seq H Act i) :

Pure strategy s matches sequence σ if s h = a for every (h, a) in σ.

@[simp]
theorem Cslib.GameTheory.Extensive.matchesSeq_nil {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} (s : PureStrategy H Act i) :
@[simp]
theorem Cslib.GameTheory.Extensive.matchesSeq_cons {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} (s : PureStrategy H Act i) (p : Choice H Act i) (σ : Seq H Act i) :
MatchesSeq s (p :: σ) ↔ s p.fst = p.snd ∧ MatchesSeq s σ
theorem Cslib.GameTheory.Extensive.matchesSeq_append {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} (s : PureStrategy H Act i) (σ₁ σ₂ : Seq H Act i) :
MatchesSeq s (σ₁ ++ σ₂) ↔ MatchesSeq s σ₁ ∧ MatchesSeq s σ₂
noncomputable def Cslib.GameTheory.Extensive.realizationProbMixed {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} [Fintype (H i)] [DecidableEq (H i)] [(h : H i) → Fintype (Act i h)] (μ : PureStrategy H Act i → ℝ) (σ : Seq H Act i) :

The realization probability of sequence σ under mixed strategy μ: the total weight of pure strategies matching σ.

theorem Cslib.GameTheory.Extensive.realizationProbMixed_def {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} [Fintype (H i)] [DecidableEq (H i)] [(h : H i) → Fintype (Act i h)] (μ : PureStrategy H Act i → ℝ) (σ : Seq H Act i) :
realizationProbMixed μ σ = ∑ s : PureStrategy H Act i, if MatchesSeq s σ then μ s else 0

Unfolding equation for realizationProbMixed, whose body is not exposed.

def Cslib.GameTheory.Extensive.realizationProbBehavior {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} (β : (h : H i) → Act i h → ℝ) (σ : Seq H Act i) :

The realization probability of sequence σ under behavior strategy β: the product of β h a along (h, a) ∈ σ.

@[simp]
theorem Cslib.GameTheory.Extensive.realizationProbBehavior_nil {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} (β : (h : H i) → Act i h → ℝ) :
@[simp]
theorem Cslib.GameTheory.Extensive.realizationProbBehavior_cons {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} (β : (h : H i) → Act i h → ℝ) (p : Choice H Act i) (σ : Seq H Act i) :
theorem Cslib.GameTheory.Extensive.realizationProbBehavior_append {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} (β : (h : H i) → Act i h → ℝ) (σ₁ σ₂ : Seq H Act i) :
theorem Cslib.GameTheory.Extensive.realizationProbBehavior_nonneg {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} [(h : H i) → Fintype (Act i h)] {β : (h : H i) → Act i h → ℝ} (hβ : IsBehaviorStrategy β) (σ : Seq H Act i) :
theorem Cslib.GameTheory.Extensive.realizationProbMixed_nonneg {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} [Fintype (H i)] [DecidableEq (H i)] [(h : H i) → Fintype (Act i h)] {μ : PureStrategy H Act i → ℝ} (hμ : IsMixedStrategy μ) (σ : Seq H Act i) :
theorem Cslib.GameTheory.Extensive.realizationProbMixed_nil {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} [Fintype (H i)] [DecidableEq (H i)] [(h : H i) → Fintype (Act i h)] {μ : PureStrategy H Act i → ℝ} (hμ : IsMixedStrategy μ) :
theorem Cslib.GameTheory.Extensive.realizationProbBehavior_pureToBehavior_eq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} [(h : H i) → DecidableEq (Act i h)] (s : PureStrategy H Act i) (σ : Seq H Act i) :
theorem Cslib.GameTheory.Extensive.realizationProbMixed_single_eq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} [Fintype (H i)] [DecidableEq (H i)] [(h : H i) → Fintype (Act i h)] [(h : H i) → DecidableEq (Act i h)] (s : PureStrategy H Act i) (σ : Seq H Act i) :
theorem Cslib.GameTheory.Extensive.realizationProbMixed_behaviorToMixed {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} [Fintype (H i)] [DecidableEq (H i)] [(h : H i) → Fintype (Act i h)] {β : (h : H i) → Act i h → ℝ} (hβ : IsBehaviorStrategy β) {σ : Seq H Act i} (hnodup : (List.map Sigma.fst σ).Nodup) :

For a sequence σ that visits no information set twice, the product mixed strategy behaviorToMixed β assigns σ the exact same realization probability as β.

inductive Cslib.GameTheory.Extensive.Terminal {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} :
ExtensiveTree ι H Act → Type (max u v 1)

A root-to-leaf path in T.

Instances For
    instance Cslib.GameTheory.Extensive.Terminal.instNonempty {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [∀ (i : ι) (h : H i), Nonempty (Act i h)] (T : ExtensiveTree ι H Act) :
    @[instance_reducible]
    noncomputable instance Cslib.GameTheory.Extensive.Terminal.instFintype {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [(i : ι) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree ι H Act) :
    def Cslib.GameTheory.Extensive.Terminal.payoff {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {T : ExtensiveTree ι H Act} :
    Terminal T → ι → ℝ

    Payoff vector at terminal node z.

    @[simp]
    theorem Cslib.GameTheory.Extensive.Terminal.payoff_leaf {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (w : ι → ℝ) :
    @[simp]
    theorem Cslib.GameTheory.Extensive.Terminal.payoff_chance {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {C : Type} {instF : Fintype C} {prob : C → ℝ} {hprob : IsMixedStrategy prob} {next : C → ExtensiveTree ι H Act} (c : C) (sub : Terminal (next c)) :
    (chance c sub).payoff = sub.payoff
    @[simp]
    theorem Cslib.GameTheory.Extensive.Terminal.payoff_decision {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} {h : H i} {next : Act i h → ExtensiveTree ι H Act} (a : Act i h) (sub : Terminal (next a)) :
    (decision a sub).payoff = sub.payoff
    def Cslib.GameTheory.Extensive.Terminal.chanceWeight {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {T : ExtensiveTree ι H Act} :

    Product of chance-node probabilities along terminal path z.

    @[simp]
    theorem Cslib.GameTheory.Extensive.Terminal.chanceWeight_leaf {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (w : ι → ℝ) :
    @[simp]
    theorem Cslib.GameTheory.Extensive.Terminal.chanceWeight_chance {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {C : Type} {instF : Fintype C} {prob : C → ℝ} {hprob : IsMixedStrategy prob} {next : C → ExtensiveTree ι H Act} (c : C) (sub : Terminal (next c)) :
    (chance c sub).chanceWeight = prob c * sub.chanceWeight
    @[simp]
    theorem Cslib.GameTheory.Extensive.Terminal.chanceWeight_decision {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {i : ι} {h : H i} {next : Act i h → ExtensiveTree ι H Act} (a : Act i h) (sub : Terminal (next a)) :
    theorem Cslib.GameTheory.Extensive.Terminal.chanceWeight_nonneg {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {T : ExtensiveTree ι H Act} (z : Terminal T) :
    def Cslib.GameTheory.Extensive.Terminal.seq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (i : ι) {T : ExtensiveTree ι H Act} :
    Terminal T → Seq H Act i

    Ordered sequence of (information set, choice) pairs made by player i along terminal path z.

    @[simp]
    theorem Cslib.GameTheory.Extensive.Terminal.seq_leaf {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (i : ι) (w : ι → ℝ) :
    @[simp]
    theorem Cslib.GameTheory.Extensive.Terminal.seq_chance {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (i : ι) {C : Type} {instF : Fintype C} {prob : C → ℝ} {hprob : IsMixedStrategy prob} {next : C → ExtensiveTree ι H Act} (c : C) (sub : Terminal (next c)) :
    seq i (chance c sub) = seq i sub
    @[simp]
    theorem Cslib.GameTheory.Extensive.Terminal.seq_decision_self {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (i : ι) {h : H i} {next : Act i h → ExtensiveTree ι H Act} (a : Act i h) (sub : Terminal (next a)) :
    seq i (decision a sub) = ⟨h, a⟩ :: seq i sub
    @[simp]
    theorem Cslib.GameTheory.Extensive.Terminal.seq_decision_ne {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] {i j : ι} (hij : j ≠ i) {h : H j} {next : Act j h → ExtensiveTree ι H Act} (a : Act j h) (sub : Terminal (next a)) :
    seq i (decision a sub) = seq i sub
    def Cslib.GameTheory.Extensive.terminalProbPure {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [(i : ι) → (h : H i) → DecidableEq (Act i h)] (s : (i : ι) → PureStrategy H Act i) {T : ExtensiveTree ι H Act} :

    Probability of reaching terminal path z under pure strategy profile s.

    @[simp]
    theorem Cslib.GameTheory.Extensive.terminalProbPure_leaf {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [(i : ι) → (h : H i) → DecidableEq (Act i h)] (s : (i : ι) → PureStrategy H Act i) (w : ι → ℝ) :
    @[simp]
    theorem Cslib.GameTheory.Extensive.terminalProbPure_chance {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [(i : ι) → (h : H i) → DecidableEq (Act i h)] (s : (i : ι) → PureStrategy H Act i) {C : Type} {instF : Fintype C} {prob : C → ℝ} {hprob : IsMixedStrategy prob} {next : C → ExtensiveTree ι H Act} (c : C) (sub : Terminal (next c)) :
    @[simp]
    theorem Cslib.GameTheory.Extensive.terminalProbPure_decision {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [(i : ι) → (h : H i) → DecidableEq (Act i h)] (s : (i : ι) → PureStrategy H Act i) {i : ι} {h : H i} {next : Act i h → ExtensiveTree ι H Act} (a : Act i h) (sub : Terminal (next a)) :
    def Cslib.GameTheory.Extensive.terminalProbBehavior {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (β : (i : ι) → (h : H i) → Act i h → ℝ) {T : ExtensiveTree ι H Act} :

    Probability of reaching terminal path z under behavior strategy profile β.

    @[simp]
    theorem Cslib.GameTheory.Extensive.terminalProbBehavior_leaf {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (β : (i : ι) → (h : H i) → Act i h → ℝ) (w : ι → ℝ) :
    @[simp]
    theorem Cslib.GameTheory.Extensive.terminalProbBehavior_chance {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (β : (i : ι) → (h : H i) → Act i h → ℝ) {C : Type} {instF : Fintype C} {prob : C → ℝ} {hprob : IsMixedStrategy prob} {next : C → ExtensiveTree ι H Act} (c : C) (sub : Terminal (next c)) :
    @[simp]
    theorem Cslib.GameTheory.Extensive.terminalProbBehavior_decision {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (β : (i : ι) → (h : H i) → Act i h → ℝ) {i : ι} {h : H i} {next : Act i h → ExtensiveTree ι H Act} (a : Act i h) (sub : Terminal (next a)) :
    noncomputable def Cslib.GameTheory.Extensive.terminalProbMixed {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (H i)] [(i : ι) → DecidableEq (H i)] [(i : ι) → (h : H i) → Fintype (Act i h)] (μ : (i : ι) → PureStrategy H Act i → ℝ) {T : ExtensiveTree ι H Act} (z : Terminal T) :

    Probability of reaching terminal path z under mixed strategy profile μ.

    theorem Cslib.GameTheory.Extensive.terminalProbMixed_def {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (H i)] [(i : ι) → DecidableEq (H i)] [(i : ι) → (h : H i) → Fintype (Act i h)] (μ : (i : ι) → PureStrategy H Act i → ℝ) {T : ExtensiveTree ι H Act} (z : Terminal T) :
    terminalProbMixed μ z = ∑ s : (i : ι) → PureStrategy H Act i, (∏ i : ι, μ i (s i)) * terminalProbPure s z

    Unfolding equation for terminalProbMixed, whose body is not exposed.

    theorem Cslib.GameTheory.Extensive.terminalProbPure_eq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(i : ι) → (h : H i) → DecidableEq (Act i h)] (s : (i : ι) → PureStrategy H Act i) {T : ExtensiveTree ι H Act} (z : Terminal T) :
    terminalProbPure s z = z.chanceWeight * ∏ i : ι, if MatchesSeq (s i) (Terminal.seq i z) then 1 else 0

    Sequence-factor decomposition of terminalProbPure.

    theorem Cslib.GameTheory.Extensive.terminalProbBehavior_eq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] (β : (i : ι) → (h : H i) → Act i h → ℝ) {T : ExtensiveTree ι H Act} (z : Terminal T) :

    Sequence-factor decomposition of terminalProbBehavior.

    theorem Cslib.GameTheory.Extensive.terminalProbMixed_eq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (H i)] [(i : ι) → DecidableEq (H i)] [(i : ι) → (h : H i) → Fintype (Act i h)] (μ : (i : ι) → PureStrategy H Act i → ℝ) {T : ExtensiveTree ι H Act} (z : Terminal T) :

    Sequence-factor decomposition of terminalProbMixed.

    def Cslib.GameTheory.Extensive.ExtensiveTree.evalPure {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (s : (i : ι) → PureStrategy H Act i) :
    ExtensiveTree ι H Act → ι → ℝ

    Expected payoff vector of tree T under pure profile s.

    @[simp]
    theorem Cslib.GameTheory.Extensive.ExtensiveTree.evalPure_leaf {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (s : (i : ι) → PureStrategy H Act i) (w : ι → ℝ) :
    evalPure s (leaf w) = w
    @[simp]
    theorem Cslib.GameTheory.Extensive.ExtensiveTree.evalPure_chance {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (s : (i : ι) → PureStrategy H Act i) {C : Type} {instF : Fintype C} {prob : C → ℝ} {hprob : IsMixedStrategy prob} {next : C → ExtensiveTree ι H Act} (j : ι) :
    evalPure s (chance prob hprob next) j = ∑ c : C, prob c * evalPure s (next c) j
    @[simp]
    theorem Cslib.GameTheory.Extensive.ExtensiveTree.evalPure_decision {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (s : (i : ι) → PureStrategy H Act i) (i : ι) (h : H i) (next : Act i h → ExtensiveTree ι H Act) :
    evalPure s (decision i h next) = evalPure s (next (s i h))
    def Cslib.GameTheory.Extensive.ExtensiveTree.evalBehavior {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [(i : ι) → (h : H i) → Fintype (Act i h)] (β : (i : ι) → (h : H i) → Act i h → ℝ) :
    ExtensiveTree ι H Act → ι → ℝ

    Expected payoff vector of tree T under behavior profile β.

    @[simp]
    theorem Cslib.GameTheory.Extensive.ExtensiveTree.evalBehavior_leaf {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [(i : ι) → (h : H i) → Fintype (Act i h)] (β : (i : ι) → (h : H i) → Act i h → ℝ) (w : ι → ℝ) :
    @[simp]
    theorem Cslib.GameTheory.Extensive.ExtensiveTree.evalBehavior_chance {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [(i : ι) → (h : H i) → Fintype (Act i h)] (β : (i : ι) → (h : H i) → Act i h → ℝ) {C : Type} {instF : Fintype C} {prob : C → ℝ} {hprob : IsMixedStrategy prob} {next : C → ExtensiveTree ι H Act} (j : ι) :
    evalBehavior β (chance prob hprob next) j = ∑ c : C, prob c * evalBehavior β (next c) j
    @[simp]
    theorem Cslib.GameTheory.Extensive.ExtensiveTree.evalBehavior_decision {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [(i : ι) → (h : H i) → Fintype (Act i h)] (β : (i : ι) → (h : H i) → Act i h → ℝ) (i : ι) (h : H i) (next : Act i h → ExtensiveTree ι H Act) (j : ι) :
    evalBehavior β (decision i h next) j = ∑ a : Act i h, β i h a * evalBehavior β (next a) j
    noncomputable def Cslib.GameTheory.Extensive.ExtensiveTree.evalMixed {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (H i)] [(i : ι) → DecidableEq (H i)] [(i : ι) → (h : H i) → Fintype (Act i h)] (μ : (i : ι) → PureStrategy H Act i → ℝ) (T : ExtensiveTree ι H Act) (j : ι) :

    Expected payoff vector of tree T under mixed profile μ.

    theorem Cslib.GameTheory.Extensive.ExtensiveTree.evalMixed_def {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (H i)] [(i : ι) → DecidableEq (H i)] [(i : ι) → (h : H i) → Fintype (Act i h)] (μ : (i : ι) → PureStrategy H Act i → ℝ) (T : ExtensiveTree ι H Act) (j : ι) :
    evalMixed μ T j = ∑ s : (i : ι) → PureStrategy H Act i, (∏ i : ι, μ i (s i)) * evalPure s T j

    Unfolding equation for ExtensiveTree.evalMixed, whose body is not exposed.

    theorem Cslib.GameTheory.Extensive.ExtensiveTree.evalPure_eq_sum_terminal {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [(i : ι) → (h : H i) → Fintype (Act i h)] [(i : ι) → (h : H i) → DecidableEq (Act i h)] (s : (i : ι) → PureStrategy H Act i) (T : ExtensiveTree ι H Act) (j : ι) :
    evalPure s T j = ∑ z : Terminal T, terminalProbPure s z * z.payoff j
    theorem Cslib.GameTheory.Extensive.ExtensiveTree.evalBehavior_eq_sum_terminal {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [(i : ι) → (h : H i) → Fintype (Act i h)] (β : (i : ι) → (h : H i) → Act i h → ℝ) (T : ExtensiveTree ι H Act) (j : ι) :
    evalBehavior β T j = ∑ z : Terminal T, terminalProbBehavior β z * z.payoff j
    theorem Cslib.GameTheory.Extensive.ExtensiveTree.evalMixed_eq_sum_terminal {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (H i)] [(i : ι) → DecidableEq (H i)] [(i : ι) → (h : H i) → Fintype (Act i h)] (μ : (i : ι) → PureStrategy H Act i → ℝ) (T : ExtensiveTree ι H Act) (j : ι) :
    evalMixed μ T j = ∑ z : Terminal T, terminalProbMixed μ z * z.payoff j
    def Cslib.GameTheory.Extensive.ExtensiveTree.toCostGame {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (T : ExtensiveTree ι H Act) :
    CostGame ι fun (i : ι) => PureStrategy H Act i

    The strategic game in cost-minimization form induced by T.

    @[simp]
    theorem Cslib.GameTheory.Extensive.ExtensiveTree.toCostGame_cost {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (T : ExtensiveTree ι H Act) (i : ι) (s : (j : ι) → PureStrategy H Act j) :
    theorem Cslib.GameTheory.Extensive.ExtensiveTree.toCostGame_expectedCost {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(i : ι) → Fintype (H i)] [(i : ι) → DecidableEq (H i)] [(i : ι) → (h : H i) → Fintype (Act i h)] (T : ExtensiveTree ι H Act) (μ : (i : ι) → PureStrategy H Act i → ℝ) (j : ι) :

    Under the induced strategic game T.toCostGame, CostGame.expectedCost equals the negated extensive-form mixed payoff.

    noncomputable def Cslib.GameTheory.Extensive.terminalProbWithFactor {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] (i : ι) (r : Seq H Act i → ℝ) (s : (j : ι) → PureStrategy H Act j) {T : ExtensiveTree ι H Act} (z : Terminal T) :

    Terminal-node probability when player i uses a sequence-factor function r and all other players use pure strategies s.

    theorem Cslib.GameTheory.Extensive.terminalProbWithFactor_def {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] (i : ι) (r : Seq H Act i → ℝ) (s : (j : ι) → PureStrategy H Act j) {T : ExtensiveTree ι H Act} (z : Terminal T) :

    Unfolding equation for terminalProbWithFactor, whose body is not exposed.

    theorem Cslib.GameTheory.Extensive.terminalProbWithFactor_realizationProbMixed {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (H j)] [(j : ι) → DecidableEq (H j)] [(j : ι) → (h : H j) → Fintype (Act j h)] (i : ι) (μ : PureStrategy H Act i → ℝ) (s : (j : ι) → PureStrategy H Act j) {T : ExtensiveTree ι H Act} (z : Terminal T) :
    theorem Cslib.GameTheory.Extensive.terminalProbWithFactor_realizationProbBehavior {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(j : ι) → (h : H j) → DecidableEq (Act j h)] (i : ι) (β : (h : H i) → Act i h → ℝ) (s : (j : ι) → PureStrategy H Act j) {T : ExtensiveTree ι H Act} (z : Terminal T) :
    def Cslib.GameTheory.Extensive.ExtensiveTree.RealizationEquivFactor {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) (r₁ r₂ : Seq H Act i → ℝ) :

    Two sequence-factor functions r₁, r₂ of player i are realization-equivalent ([vS07], Section 3.10, p. 71) if they induce identical terminal-node probabilities against every pure strategy profile of the remaining players. Note that [vS07] (p. 71) phrases realization equivalence via node-reach probabilities, which coincides with equality of terminal-leaf reach probabilities on nonempty-action finite trees.

    def Cslib.GameTheory.Extensive.ExtensiveTree.RealizationEquivMixed {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (H j)] [(j : ι) → DecidableEq (H j)] [(j : ι) → (h : H j) → Fintype (Act j h)] (T : ExtensiveTree ι H Act) (i : ι) (μ₁ μ₂ : PureStrategy H Act i → ℝ) :

    Realization equivalence of two mixed strategies of player i.

    def Cslib.GameTheory.Extensive.ExtensiveTree.RealizationEquivMixedBehavior {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (H j)] [(j : ι) → DecidableEq (H j)] [(j : ι) → (h : H j) → Fintype (Act j h)] (T : ExtensiveTree ι H Act) (i : ι) (μ : PureStrategy H Act i → ℝ) (β : (h : H i) → Act i h → ℝ) :

    Realization equivalence between a mixed strategy and a behavior strategy of player i.

    theorem Cslib.GameTheory.Extensive.ExtensiveTree.RealizationEquivFactor.of_forall_terminal_eq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] {T : ExtensiveTree ι H Act} {i : ι} {r₁ r₂ : Seq H Act i → ℝ} (h : ∀ (z : Terminal T), r₁ (Terminal.seq i z) = r₂ (Terminal.seq i z)) :
    theorem Cslib.GameTheory.Extensive.ExtensiveTree.RealizationEquivFactor.terminalProbMixed_eq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (H j)] [(j : ι) → DecidableEq (H j)] [(j : ι) → (h : H j) → Fintype (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} [∀ (h : H i), Nonempty (Act i h)] {r₁ r₂ : Seq H Act i → ℝ} (heq : T.RealizationEquivFactor i r₁ r₂) (μ : (j : ι) → PureStrategy H Act j → ℝ) (z : Terminal T) :

    Realization equivalence implies identical terminal-node probabilities against arbitrary mixed opponent strategies.

    theorem Cslib.GameTheory.Extensive.ExtensiveTree.RealizationEquivMixed.evalMixed_eq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (H j)] [(j : ι) → DecidableEq (H j)] [(j : ι) → (h : H j) → Fintype (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} [∀ (h : H i), Nonempty (Act i h)] {μ₁ μ₂ : PureStrategy H Act i → ℝ} (heq : T.RealizationEquivMixed i μ₁ μ₂) (μ : (j : ι) → PureStrategy H Act j → ℝ) (k : ι) :
    evalMixed (Function.update μ i μ₁) T k = evalMixed (Function.update μ i μ₂) T k

    Realization equivalence of mixed strategies implies identical expected payoffs for all players under arbitrary opponent mixed strategies.

    theorem Cslib.GameTheory.Extensive.ExtensiveTree.RealizationEquivMixedBehavior.evalMixed_eq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (H j)] [(j : ι) → DecidableEq (H j)] [(j : ι) → (h : H j) → Fintype (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} [∀ (h : H i), Nonempty (Act i h)] {μ_i : PureStrategy H Act i → ℝ} {β_i : (h : H i) → Act i h → ℝ} (heq : T.RealizationEquivMixedBehavior i μ_i β_i) (μ : (j : ι) → PureStrategy H Act j → ℝ) (k : ι) :

    Realization equivalence of a mixed strategy and a behavior strategy implies identical expected payoffs against arbitrary opponent mixed strategies.

    inductive Cslib.GameTheory.Extensive.Node {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} :
    ExtensiveTree ι H Act → Type (max u v 1)

    A node in T, represented by the path from the root.

    def Cslib.GameTheory.Extensive.Node.playerSeq {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (i : ι) {T : ExtensiveTree ι H Act} :
    Node T → Seq H Act i

    Ordered sequence of (information set, choice) pairs made by player i strictly before node v.

    def Cslib.GameTheory.Extensive.Node.IsDecisionOf {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (i : ι) (h : H i) {T : ExtensiveTree ι H Act} :
    Node T → Prop

    v.IsDecisionOf i h holds when v is a decision node of player i at information set h.

    @[simp]
    theorem Cslib.GameTheory.Extensive.Node.isDecisionOf_leaf {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (i : ι) (h : H i) (w : ι → ℝ) :
    @[simp]
    theorem Cslib.GameTheory.Extensive.Node.isDecisionOf_chance_here {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (i : ι) (h : H i) {C : Type} {instF : Fintype C} {prob : C → ℝ} {hprob : IsMixedStrategy prob} {next : C → ExtensiveTree ι H Act} :
    @[simp]
    theorem Cslib.GameTheory.Extensive.Node.isDecisionOf_decision_here {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (i : ι) (h : H i) (j : ι) (h' : H j) (next : Act j h' → ExtensiveTree ι H Act) :
    @[simp]
    theorem Cslib.GameTheory.Extensive.Node.isDecisionOf_chance {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (i : ι) (h : H i) {C : Type} {instF : Fintype C} {prob : C → ℝ} {hprob : IsMixedStrategy prob} {next : C → ExtensiveTree ι H Act} (c : C) (sub : Node (next c)) :
    IsDecisionOf i h (chance c sub) ↔ IsDecisionOf i h sub
    @[simp]
    theorem Cslib.GameTheory.Extensive.Node.isDecisionOf_decision {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (i : ι) (h : H i) {j : ι} {h' : H j} {next : Act j h' → ExtensiveTree ι H Act} (a : Act j h') (sub : Node (next a)) :
    @[simp]
    theorem Cslib.GameTheory.Extensive.Node.playerSeq_here {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (i : ι) (T : ExtensiveTree ι H Act) :
    @[simp]
    theorem Cslib.GameTheory.Extensive.Node.playerSeq_chance {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (i : ι) {C : Type} {instF : Fintype C} {prob : C → ℝ} {hprob : IsMixedStrategy prob} {next : C → ExtensiveTree ι H Act} (c : C) (sub : Node (next c)) :
    playerSeq i (chance c sub) = playerSeq i sub
    @[simp]
    theorem Cslib.GameTheory.Extensive.Node.playerSeq_decision_self {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (i : ι) {h : H i} {next : Act i h → ExtensiveTree ι H Act} (a : Act i h) (sub : Node (next a)) :
    playerSeq i (decision a sub) = ⟨h, a⟩ :: playerSeq i sub
    @[simp]
    theorem Cslib.GameTheory.Extensive.Node.playerSeq_decision_ne {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] {i j : ι} (hij : j ≠ i) {h : H j} {next : Act j h → ExtensiveTree ι H Act} (a : Act j h) (sub : Node (next a)) :
    playerSeq i (decision a sub) = playerSeq i sub
    def Cslib.GameTheory.Extensive.ExtensiveTree.OccursInfoSet {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} (T : ExtensiveTree ι H Act) (i : ι) (h : H i) :

    Information set h : H i occurs at some decision node of player i in T.

    def Cslib.GameTheory.Extensive.ExtensiveTree.PerfectRecall {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) :

    Perfect recall for player i ([vS07], Section 3.10, p. 70): all decision nodes of player i in the same information set h : H i are preceded by the same sequence of player-i choices.

    def Cslib.GameTheory.Extensive.ExtensiveTree.NoRepeatedInfoSet {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] (T : ExtensiveTree ι H Act) (i : ι) :

    No root-to-leaf play visits any information set of player i more than once.

    theorem Cslib.GameTheory.Extensive.ExtensiveTree.NoRepeatedInfoSet.realizationEquivMixedBehavior_behaviorToMixed {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (H j)] [(j : ι) → DecidableEq (H j)] [(j : ι) → (h : H j) → Fintype (Act j h)] {T : ExtensiveTree ι H Act} {i : ι} (hnr : T.NoRepeatedInfoSet i) {β : (h : H i) → Act i h → ℝ} (hβ : IsBehaviorStrategy β) :

    If T has no repeated information sets for player i, then behaviorToMixed β is realization-equivalent to β (in fact, agrees on all behavior opponents as well).

    theorem Cslib.GameTheory.Extensive.ExtensiveTree.evalMixed_behaviorToMixed {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [Fintype ι] [DecidableEq ι] [(j : ι) → Fintype (H j)] [(j : ι) → DecidableEq (H j)] [(j : ι) → (h : H j) → Fintype (Act j h)] {T : ExtensiveTree ι H Act} (hnr : ∀ (j : ι), T.NoRepeatedInfoSet j) {β : (j : ι) → (h : H j) → Act j h → ℝ} (hβ : ∀ (j : ι), IsBehaviorStrategy (β j)) (k : ι) :
    evalMixed (fun (j : ι) => behaviorToMixed (β j)) T k = evalBehavior β T k

    When every player avoids visiting any information set twice, playing behaviorToMixed (β j) in mixed strategies induces the same expected payoff vector as playing β in behavior strategies.

    def Cslib.GameTheory.Extensive.ExtensiveTree.HasPositiveChance {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} :
    ExtensiveTree ι H Act → Prop

    Every chance node in T assigns positive probability to every outcome.

    theorem Cslib.GameTheory.Extensive.ExtensiveTree.HasPositiveChance.chanceWeight_pos {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} {T : ExtensiveTree ι H Act} :
    T.HasPositiveChance → ∀ (z : Terminal T), 0 < z.chanceWeight
    theorem Cslib.GameTheory.Extensive.ExtensiveTree.PerfectRecall.noRepeatedInfoSet {ι : Type u} {H : ι → Type v} {Act : (i : ι) → H i → Type} [DecidableEq ι] {T : ExtensiveTree ι H Act} {i : ι} :

    Perfect recall implies that no play visits any information set of player i twice.