Skip to content

bench: outer mutation loop for the evolve harness (genome evolutionary search) - #520

Merged
wladerer merged 2 commits into
mainfrom
research/evolve-mutation-loop
Sep 25, 2026
Merged

wladerer merged 2 commits into
mainfrom
research/evolve-mutation-loop

Conversation

@wladerer

Copy link
Copy Markdown
Owner

What

The generation half of the AlphaEvolve-style loop that #519 lacked. A candidate is a genome of independent kernel-design choices; a builder renders it to a runnable callable; the #519 evaluator scores it under its correctness oracle. Mutation perturbs one gene, crossover mixes two parents, elitist selection breeds from the fastest admissible genomes. An invalid or physics-breaking genome is culled by the oracle, so the search explores with no corpse risk.

Benchmarks-only; runs in-process (launch on asus).

  • benchmarks/evolve/mutate.py — HAPPLY_GENES/RR_GENES + builders, genetic operators (mutate/crossover/dedup), evolve() with a genome cache, elitism, and convergence patience.
  • benchmarks/evolve_run.py — gwq entrypoint; per-generation trace + full leaderboard; best on the last line.

This is the autonomous backend (no external model). The file-per-candidate path in driver.py remains the hook for LLM/agent-authored candidates.

Validated on asus (gwq --here, 8 threads, min-of-N)

H-apply (24-genome space, evolution sampled 16/24 — guided, not exhaustive):

genome admiss max_err speedup
c64 · toeplitz · fold_becp · einsum yes 5.9e-8 7.84x
c128 · toeplitz · three_tensor · matmul yes 1.1e-17 4.13x
c64 · fft · three_tensor · einsum yes 5.9e-8 1.99x
c128 · fft · three_tensor · matmul (baseline) yes 0 1.00x

The loop improved across generations by recombination (gen 0: 6.5x c64·toeplitz; gen 2: 7.84x by adding fold_becp), discovering that the Toeplitz small-cell win and fp32 stack multiplicatively. Honest caveat: both are known size-gated/expansion-only wins at Si-primitive size, so this recombines known ingredients rather than inventing a new algorithm — but the stacking is a real, useful observation and the loop found it unattended.

RR (8-genome space): converged to baseline 1.0x and stopped early via patience — correctly reporting the kernel is mined.

🤖 Generated with Claude Code

wladerer and others added 2 commits September 25, 2026 11:01
…tionary search)

Adds the generation half of the AlphaEvolve-style loop that #519 lacked. A
candidate is a genome (independent kernel-design choices); a builder renders it
to a runnable callable; the #519 evaluator scores it under its correctness
oracle. Mutation perturbs one gene, crossover mixes two parents, elitist
selection breeds the next generation from the fastest ADMISSIBLE genomes -- an
invalid or physics-breaking genome is culled by the oracle, so the search
explores freely with no corpse risk.

- benchmarks/evolve/mutate.py: HAPPLY_GENES/RR_GENES + builders (build_apply,
  build_rr), genetic operators (mutate/crossover/dedup), and evolve() with a
  genome cache, elitism, and convergence patience. Runs in-process (on asus).
- benchmarks/evolve_run.py: gwq entrypoint; per-generation trace + final
  leaderboard over every genome evaluated; best on the last line.

This is the autonomous backend (no external model). The file-per-candidate path
in driver.py remains the hook for LLM/agent-authored candidates.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…utator backend)

Demonstrates the file-per-candidate (LLM/agent-authored) mutator backend that
complements the genome loop. cached_nl_fold.py is an OFF-GENOME candidate: it
memoises the dij@p projector fold across the many applies of a fixed H (exact,
~1e-13) -- a projector-heavy/large-cell lever, not reachable by the genome axes.
Authored by a mutator agent given the kernel + champions + oracle; the oracle
gates it, so a wrong candidate is culled not shipped. README documents both
backends and the honest scope.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@wladerer
wladerer merged commit 743481f into main Sep 25, 2026
6 checks passed
@wladerer
wladerer deleted the research/evolve-mutation-loop branch September 25, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant