Reference · The Applied Higher-Order Functions catalogue
rainbow.algorithms.proofs.ahof.rl-falsification
AHoF V20 RL for Falsification: train an agent by reinforcement learning to drive the system toward a specification violation, acting greedily on the learned Q-values by keeping the higher-Q action: prefers-action-zero? q0 q1 = decide (q1 <= q0) best-q q0 q1 = if (q1 <= q0) then q0 else q1 (the larger Q) over exact rationals. Proved native and axiom-free: the preference decision, the max value, and the switch when the second candidate is larger. 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.rl-falsification` prints this classification.
rl-fal/prefers-action-zero?
rl-fal/prefers-action-zero? : (x₁ x₂ : ℚ≥0) → data/Bool
ℚ≥0 = nnrat/NonnegativeRational
rl-fal/best-q
rl-fal/best-q : (x₁ x₂ : ℚ≥0) → ℚ≥0
ℚ≥0 = nnrat/NonnegativeRational
rl-fal/prefers-higher
rl-fal/prefers-higher : → bo/is-safe 3/4 1/2 = data/true
= = equality/Eq
rl-fal/value-is-maximum
rl-fal/value-is-maximum : → rl-fal/best-q 3/4 1/2 = 3/4
= = equality/Eq
rl-fal/switches
rl-fal/switches : → bo/is-safe 1/2 3/4 = data/false
= = equality/Eq