Skip to content

[GGGP M3] Operator coverage — one-point crossover + mutation policy #4

Description

@mnemonik-dev

Summary

Milestone M3: broaden operator coverage for the GE engine. MVP (M1) reuses evoforge's Uniform
crossover; GE classically benefits from one-point crossover (better "ripple" locality on codon
strings) plus configurable per-gene mutation. Add these with golden tests so default behavior can't
drift.

Spec: https://github.com/mnemonik-dev/genetic_algorithms/blob/main/docs/technical-reference/gggp-implementation-spec.md (§4, decision D2)

Scope

  • Add one-point crossover for codon genomes (either via evoforge operator-coverage or a local op
    in evoforge-grammar; the gggp repo's one_point_crossover is a reference implementation).
  • Make crossover selectable in GrammarConfig (Uniform | OnePoint), default OnePoint for GE.
  • Add a per-gene mutation policy hook (e.g. reset vs gaussian per codon).
  • Operator-level golden tests pinning deterministic output for the default operator set.

Acceptance criteria

  • cargo test -p evoforge-grammar0 failed.
  • One-point crossover unit test: known parents + fixed cut → exact expected children.
  • Determinism golden fixtures updated/added for the default (OnePoint) operator set; identical
    seed ⇒ identical snapshot.
  • A benchmark or test demonstrating one-point ≥ Uniform on a fixed GE locality task (or a
    documented note if parity) — no regression in the M1/M2 convergence tests.
  • cargo fmt --check + cargo clippy -- -D warnings clean.

Anti-goals

  • Do not add NSGA-II / multi-objective (D5 → v2).
  • Do not add Python/PyO3 (D7). Do not modify evoforge core unless adding the shared
    operator there is the chosen path (coordinate; keep core changes minimal + tested).

Notes

Depends on M1 (#2) (and M2 (#3) for the convergence regression checks). Part of the GGGP build
chain M0 (#1) → M1 (#2) → M2 (#3) → M3 → M4.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions