Reference · The Applied Higher-Order Functions catalogue
rainbow.algorithms.proofs.ahof.policy-visualization
AHoF V53 Policy Visualization: render a learned policy by displaying, at each state, the greedy action -- the one with the maximal action value. Between two actions the greedy choice keeps the higher value: greedy-action-zero? q0 q1 = decide (q1 <= q0) greedy-value q0 q1 = if (q1 <= q0) then q0 else q1 (the larger value) over exact rationals. Proved native and axiom-free (preference, max value, switch). Requires audit/decide-nnrat-at-most, logic/if-data (both in the D63 checkpoint). 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.policy-visualization` prints this classification.
policy-viz/greedy-action-zero?
policy-viz/greedy-action-zero? : (x₁ x₂ : ℚ≥0) → data/Bool
ℚ≥0 = nnrat/NonnegativeRational
policy-viz/greedy-value
policy-viz/greedy-value : (x₁ x₂ : ℚ≥0) → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
policy-viz/greedy-prefers-higher
policy-viz/greedy-prefers-higher : → bo/is-safe 3/4 1/2 = data/true
= = equality/Eq
policy-viz/greedy-value-is-maximum
policy-viz/greedy-value-is-maximum : → fsc/node-value 3/4 1/2 = 3/4
= = equality/Eq
policy-viz/greedy-switches
policy-viz/greedy-switches : → bo/is-safe 1/2 3/4 = data/false
= = equality/Eq