homemaker-layout/src/homemaker_layout
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
..
__init__.py Rename package: homemaker → homemaker-layout 2026-06-14 08:18:06 +01:00
dom.py erc.3: explicit per-leaf multiplicity closes the leak; driver A/B wired (§13.3) 2026-06-24 18:16:17 +01:00
driver.py 9o5: type superposition + per-eval collapse (multi-use leaves) 2026-06-30 07:08:46 +01:00
evolve.py 9o5: type superposition + per-eval collapse (multi-use leaves) 2026-06-30 07:08:46 +01:00
fitness.py 9o5: type superposition + per-eval collapse (multi-use leaves) 2026-06-30 07:08:46 +01:00
fitness_cmd.py Add homemaker-fitness: native Python CLI to replace urb-fitness.pl 2026-06-14 17:15:33 +01:00
genome.py Phase 6 §11.5: structural niching + restarts — negative result (c4c.5) 2026-06-18 23:42:39 +01:00
geometry.py Rename package: homemaker → homemaker-layout 2026-06-14 08:18:06 +01:00
graph.py erc.3: explicit per-leaf multiplicity closes the leak; driver A/B wired (§13.3) 2026-06-24 18:16:17 +01:00
innerloop.py x3b/§13.10: productionise leaf-sharing — per-code share grain + CLI wiring 2026-06-28 22:04:35 +01:00
operators.py x3b/§13.10: productionise leaf-sharing — per-code share grain + CLI wiring 2026-06-28 22:04:35 +01:00
oracle.py Fix parity gap: oracle.py must run with URB_NO_OCCLUSION=1 2026-06-17 18:40:56 +01:00
programme.py 9o5: type superposition + per-eval collapse (multi-use leaves) 2026-06-30 07:08:46 +01:00
solver.py Rename package: homemaker → homemaker-layout 2026-06-14 08:18:06 +01:00