- commit
- ad5c952e941757ab4c0844a02a689ece013fb95a
- parent
- 789f1d6b3c5daf63b3376dae6cda83656ea04795
- author
- dami <gazey55@gmail.com>
| M | PLAN.md | 36 | ++++++++++++++++++++++++++++++ |
@@ -435,6 +435,42 @@ judged on the final marks).
435435 restate item 1's proof from that measurement (the target is set by the436436 product cadence: minutes for the daily, ~10 min for the hourly).437437 438+### Generator optimisation and the field numbers (2026-08-26, evening)439+440+Instrumented first (per-phase, per-tile timers; `MOSAIC_DEBUG=1` prints441+the table), then cut in evidence order. Idle machine, G=60 scatter seed442+a, 45 tiles, wall clock:443+444+| step | wall | what the table said |445+|------|-----:|----------------------|446+| baseline | 34.4 s | givens 33.3 s of it; 108k SAT calls, 168 s inside solve incl. lock wait; heaviest tile 12.2 s over 60 trials |447+| gophersat vendored with a per-solver learn buffer, mutex gone | 32.8 s | lock wait gone (solve 32.7 s) but wall unchanged: the removal loop is CPU-bound re-parsing the CNF per trial |448+| incremental SAT for the removal loop (one hot solver per tile, givens as assumptions, selector-guarded blocking clauses) | 3.04 s | SAT calls 108k -> 24k; heaviest tile 1.0 s; output byte-identical, fixtures reproduce |449+| retry the failing tile's wave, not the attempt | 3.07 s | no change on this seed (nothing failed); it matters for chunks that used to restart |450+451+Then the layout defect the first idle 9x9 run exposed: two odd chunks'452+seed tiles (placed touching nothing) never got a whole-line overlap, so453+"an alternative differs inside an overlap region" was unsatisfiable and454+each chunk burned 20 attempts x 3 re-packings (13 min, then failure).455+Fixed in the packer (a drop onto an unpinnable seed, a check after the456+fill pass, salted re-draws) and in gen (refuse such a layout before any457+search).458+459+Fields, idle, `--jobs 6`:460+461+| field | tiles | G | wall | chunks min / median / max | notes |462+|-------|------:|--:|-----:|---------------------------|-------|463+| 3x3 of G=60 | 252 | 148 | **9 s** | 0.4 / ~1 / 1.9 s | every chunk one attempt |464+| 9x9 of G=60 | 1915 | 412 | **293 s** | 0.3 / 3.3 / 46.7 s | one chunk re-packed (too many backjumps); 86 attempts over 81 chunks |465+466+So item 1's proof holds as written (9x9 under 10 min), and the daily's467+generation is under five minutes on the Mac. The remaining tail is a few468+chunks at 30-47 s whose first attempt fails on "too many backjumps" or469+"pinned tile falls to propagation alone" (policy, not repair): the next470+cut is to make those wave-level retries too, and `--jobs` closer to the471+core count now that a chunk process is mostly single-threaded again472+(the incremental loop serialises per tile; waves still run in parallel).473+438474 ### Status of the v2 items under this goal439475 440476 1 real packed run: done (v2 packings and v3 scatter fields played, logs