Skip to content
Rainbow docs menu

Reference · The Applied Higher-Order Functions catalogue

rainbow.algorithms.proofs.ahof.rl-falsification

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

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?

DefinitionSource, line 41

rl-fal/prefers-action-zero? :
  (x₁ x₂ : ℚ≥0)
  → data/Bool

ℚ≥0 = nnrat/NonnegativeRational

rl-fal/best-q

DefinitionSource, line 46

rl-fal/best-q :
  (x₁ x₂ : ℚ≥0)
  → ℚ≥0

ℚ≥0 = nnrat/NonnegativeRational

rl-fal/prefers-higher

TheoremWorked exampleNo axiomsSource, line 56

rl-fal/prefers-higher :
  → bo/is-safe 3/4 1/2 = data/true

= = equality/Eq

rl-fal/value-is-maximum

TheoremWorked exampleNo axiomsSource, line 62

rl-fal/value-is-maximum :
  → rl-fal/best-q 3/4 1/2 = 3/4

= = equality/Eq

rl-fal/switches

TheoremWorked exampleNo axiomsSource, line 68

rl-fal/switches :
  → bo/is-safe 1/2 3/4 = data/false

= = equality/Eq