Skip to content
Rainbow docs menu

Reference · The Applied Higher-Order Functions catalogue

rainbow.algorithms.proofs.ahof.genetic-programming

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

AHoF O70 Genetic Programming: evolve programs represented as expression trees under fitness selection; between two candidate programs it keeps the fitter (higher- fitness) one: prefers-fitter? f0 f1 = decide (f1 <= f0) best-fitness f0 f1 = if (f1 <= f0) then f0 else f1 (the higher fitness) 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.genetic-programming` prints this classification.

gp-tree/prefers-fitter?

DefinitionSource, line 41

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

ℚ≥0 = nnrat/NonnegativeRational

gp-tree/best-fitness

DefinitionSource, line 46

gp-tree/best-fitness :
  (x₁ x₂ : ℚ≥0)
  → ℚ≥0

ℚ≥0 = nnrat/NonnegativeRational

gp-tree/prefers-higher

TheoremWorked exampleNo axiomsSource, line 56

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

= = equality/Eq

gp-tree/value-is-maximum

TheoremWorked exampleNo axiomsSource, line 62

gp-tree/value-is-maximum :
  → fsc/node-value 3/4 1/2 = 3/4

= = equality/Eq

gp-tree/switches

TheoremWorked exampleNo axiomsSource, line 68

gp-tree/switches :
  → bo/is-safe 1/2 3/4 = data/false

= = equality/Eq