Skip to content
Rainbow docs menu

Reference · The Applied Higher-Order Functions catalogue

rainbow.algorithms.proofs.ahof.ga-policy

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

AHoF D41 GA for Policy Search: evolve policies under fitness selection, keeping the fitter individual: prefers-fitter? f0 f1 = decide (f1 <= f0) best-fitness f0 f1 = if (f1 <= f0) then f0 else f1 over exact rationals. Proved native and axiom-free: preference decision, 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.ga-policy` prints this classification.

ga-policy/prefers-fitter?

DefinitionSource, line 39

ga-policy/prefers-fitter? :
  (x₁ x₂ : ℚ≥0)
  → data/Bool

ℚ≥0 = nnrat/NonnegativeRational

ga-policy/best-fitness

DefinitionSource, line 44

ga-policy/best-fitness :
  (x₁ x₂ : ℚ≥0)
  → ℚ≥0

ℚ≥0 = nnrat/NonnegativeRational

ga-policy/prefers-higher

TheoremWorked exampleNo axiomsSource, line 54

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

= = equality/Eq

ga-policy/value-is-maximum

TheoremWorked exampleNo axiomsSource, line 60

ga-policy/value-is-maximum :
  → fsc/node-value 3/4 1/2 = 3/4

= = equality/Eq

ga-policy/switches

TheoremWorked exampleNo axiomsSource, line 66

ga-policy/switches :
  → bo/is-safe 1/2 3/4 = data/false

= = equality/Eq