homemaker-layout/tests
Bruno Postle c3635634e8 9o5: type superposition + per-eval collapse (multi-use leaves)
Interchangeable codes (similar size/width/proportion, compatible level/stack,
no adjacency edge) form equivalence classes derived from the programme. With
--superpose (default off), each fitness eval COLLAPSES every superposed leaf to
its best in-class usage via an optimal supply->demand assignment (brute force
<=C! within cap C=4, scipy Hungarian beyond), then scores the condensed types.
Because collapse re-types on the unmerged tree before all checks, counts /
adjacency / quality are unchanged downstream -- no Node field, no graph/operator
changes -- and default OFF is bit-identical.

- programme.py: derive_interchange_classes + interchangeable (S1-S4, locked
  thresholds R_SIZE=1.5/R_WIDTH=1.3/R_PROP=1.5, CLASS_CAP=4)
- fitness.py: collapse_superposition, _best_assignment, _usage_quality;
  superpose/superpose_class_cap conf knobs; collapse hooked into _evaluate_full
- driver.py/evolve.py: superpose flag plumbed beside leaf_sharing; --superpose
- tests/test_superposition.py: 17 tests (derivation, assignment, end-to-end)

Closes homemaker-py-9o5 (build); validation A/B is homemaker-py-xi7.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 07:08:46 +01:00
..
test_dom_corpus.py Rename package: homemaker → homemaker-layout 2026-06-14 08:18:06 +01:00
test_driver.py Fix parallel search nondeterminism; re-diagnose homemaker-py-xcy 2026-06-22 23:25:50 +01:00
test_evolve_cli.py x3b/§13.10: productionise leaf-sharing — per-code share grain + CLI wiring 2026-06-28 22:04:35 +01:00
test_fitness.py x3b/§13.10: productionise leaf-sharing — per-code share grain + CLI wiring 2026-06-28 22:04:35 +01:00
test_genome.py Phase 6 §11.5: structural niching + restarts — negative result (c4c.5) 2026-06-18 23:42:39 +01:00
test_geometry.py Rename package: homemaker → homemaker-layout 2026-06-14 08:18:06 +01:00
test_graph.py Rename package: homemaker → homemaker-layout 2026-06-14 08:18:06 +01:00
test_innerloop.py Swap inner loop default from CMA-ES to Nelder-Mead (homemaker-py-d6d) 2026-06-14 08:51:22 +01:00
test_operators.py x3b/§13.10: productionise leaf-sharing — per-code share grain + CLI wiring 2026-06-28 22:04:35 +01:00
test_oracle.py Rename package: homemaker → homemaker-layout 2026-06-14 08:18:06 +01:00
test_staging.py Phase 6 §11.3: staged per-floor search (c4c.3) 2026-06-18 06:05:53 +01:00
test_superposition.py 9o5: type superposition + per-eval collapse (multi-use leaves) 2026-06-30 07:08:46 +01:00