LeanMachineLearning exposition

Learning.sumRewards🔗

Minimal Lean file

sumRewards🔗

DefinitionLearning.sumRewards

Sum of rewards obtained when pulling action a up to time t (exclusive).

🔗def
Learning.sumRewards.{u_1, u_3} {𝓐 : Type u_1} {Ω : Type u_3} [DecidableEq 𝓐] (A : Ω 𝓐) (R' : Ω ) (a : 𝓐) (t : ) (ω : Ω) :
Learning.sumRewards.{u_1, u_3} {𝓐 : Type u_1} {Ω : Type u_3} [DecidableEq 𝓐] (A : Ω 𝓐) (R' : Ω ) (a : 𝓐) (t : ) (ω : Ω) :

Code

def sumRewards (A : ℕ → Ω → 𝓐) (R' : ℕ → Ω → ℝ) (a : 𝓐) (t : ℕ) (ω : Ω) : ℝ :=
  ∑ s ∈ range t, if A s ω = a then R' s ω else 0
Used by (44)

Actions: Source · Open Issue