Skip to content
Rainbow docs menu

Reference · The Applied Higher-Order Functions catalogue

rainbow.algorithms.proofs.ahof.sarsa

The Applied Higher-Order Functions cataloguesrc/rainbow/algorithms/proofs/ahof/sarsa.clj6 definitions, 3 theorems

AHoF D62 worked SARSA on-policy update over signed rationals. With learning rate 1/2, reward 1, discount 1, an on-policy next action value 0, and a current action value 0, the TD error is (1 + 1*0) - 0 = 1, and the SARSA update raises the value to 0 + (1/2)*1 = 1/2. The updated value is proved by signed cross-product equivalence, and the update is shown to coincide with the shared Q-update on the same bootstrap value. Scope (measured by the kernel): this module has 3 worked instances (statements about specific values). None of its theorems is a guarantee about the algorithm for all inputs; `lein verify rainbow.algorithms.proofs.ahof.sarsa` prints this classification.

ahof-d62/rate

DefinitionSource, line 75

ahof-d62/rate :
  → ℚ≥0

ℚ≥0 = nnrat/NonnegativeRational

ahof-d62/reward

DefinitionSource, line 79

ahof-d62/reward :
  → ℚ

ℚ = signed/SignedRational

ahof-d62/discount

DefinitionSource, line 83

ahof-d62/discount :
  → ℚ≥0

ℚ≥0 = nnrat/NonnegativeRational

ahof-d62/next-value

DefinitionSource, line 87

ahof-d62/next-value :
  → ℚ

ℚ = signed/SignedRational

ahof-d62/current

DefinitionSource, line 91

ahof-d62/current :
  → ℚ

ℚ = signed/SignedRational

ahof-d62/updated

DefinitionSource, line 95

ahof-d62/updated :
  → ℚ

ℚ = signed/SignedRational

ahof-d62/updated-is-one-half

TheoremWorked exampleNo axiomsSource, line 107

ahof-d62/updated-is-one-half :
  → ahof-d62/updated = signed/from-nnrat 1/2

= = signed/equivalent: equality of rational values

ahof-d62/coincides-with-q-update

TheoremWorked exampleNo axiomsSource, line 115

ahof-d62/coincides-with-q-update :
  → update = update
  where update := learning/signed-q-update ahof-v40/lo ahof-d62/reward ahof-o20/beta ahof-d63/value ahof-d63/value

= = equality/Eq

ahof-d62/sarsa

TheoremWorked exampleNo axiomsSource, line 126

ahof-d62/sarsa :
  → proposition/conjunction (ahof-d62/updated = signed/from-nnrat 1/2) (update = update)
  where update := learning/signed-q-update ahof-v40/lo ahof-d62/reward ahof-o20/beta ahof-d63/value ahof-d63/value

= = equality/Eq