Commit Graph
11 Commits
Author SHA1 Message Date
Codex instance 74bde266d0 solver: select skyline candidate policy
Make candidate ordering an explicit deterministic policy and benchmark ascending, descending, and exact-width-first choices. Keep ascending as the default because it produces the best measured time to first solution despite best-fit's slightly smaller tree.

Retain the benchmark v1 interface and document why randomized and duplicate-work portfolio policies are deferred.

Tests: Release and Debug CTest (10 passed each)

Refs: #12
2026-07-30 18:07:29 +01:00
Codex instance d751d1b13e solver: replace cell DFS with skyline search
Represent partial placements as column heights and branch on the narrowest local valley. This removes the board-area cell state and makes first-solution search substantially smaller for feasible orders.

Expose direct-search and candidate-order benchmark controls so the skyline core can be measured independently of odd-order construction. Document the completeness argument and the 10/11 test-tier decision.

Tests: Release, Debug, ASan, and UBSan CTest (10 passed each)

Refs: #4
2026-07-30 17:55:21 +01:00
Codex instance 0a7ce1e49e bench: add optional CP-SAT reference
Provide a separately installed OR-Tools model to compare a generic constraint solver with the native first-solution path without adding a production or default-test dependency.

Use no-overlap, exact-fill, edge and equal-copy symmetry constraints, validate placements independently, and record model size, memory, worker count and timings for orders 8 and 9. Keep the tool only as a reference and defer DLX absent new evidence.

Tests: Release CTest (9 passed)

Tests: Python reference tests and compilation checks

Tests: independently validated CP-SAT orders 8 and 9

Refs: #5
2026-07-30 17:40:17 +01:00
Codex instance 3e667d6de0 solver: construct odd-order solutions
Avoid repeating the exponential search for odd orders at least nine. Search the even predecessor, translate its row-major placements to the enlarged board, and tile the new border.

Keep direct search and construction explicit so benchmarks can report their costs separately. Verify the routed order-9 result independently and require its search counters to match order 8.

Tests: Release, Debug, ASan and UBSan CTest (8 passed each)

Refs: #6
2026-07-30 17:24:06 +01:00
Codex instance ddf07e730a bench: record clean solver baseline
Record reproducible order-7 and order-8 measurements from the committed benchmark framework with a clean working tree. Include stable work counts, solve-time spread, validation and rendering cost, and interleaved instrumentation overhead.

Order 9 remains supported by the runner but retains its historical timing because each current run takes several minutes.

Benchmark: Apple arm64 Release, one warm-up, three repetitions

Refs: #8
2026-07-30 17:10:01 +01:00
Codex instance 598667b2f3 bench: add repeatable solver measurements
Add an opt-in benchmark probe and JSON runner that separate solve, construction, validation, and rendering time. Record stable search counters, environment metadata, warm-up and repetition policy, timeouts, errors, median spread, and instrumentation overhead.

Compile production solving without counters and interleave counted and plain trials when measuring overhead. Keep heavyweight cases outside the default correctness path while testing counter and report behavior cheaply.

Tests: Debug and Release CTest suites (7 passed each)

Refs: #8
2026-07-30 17:08:05 +01:00
Codex instance ce39d0a4d0 solver: check completion before probing square
next_pos() returns the grid end sentinel when a placement completes the board. Avoid passing that sentinel to largest_square(), which requires an in-range position and otherwise reads past the grid.

Tests: Debug, Release, ASan, and UBSan CTest suites

Refs: #14
2026-07-30 16:50:19 +01:00
Codex instance ccdcf03fa8 test: cover completed solver boards
Exercise both the trivial order-1 solution and the feasible order-8 solution through the independent placement validator.

With the existing completion ordering, the focused test reports a heap-buffer-overflow under AddressSanitizer before validation can run.

Refs: #14
2026-07-30 16:49:21 +01:00
Codex instance ebfc80546a results: fix Debug rendering assertion
Check the character in the output string instead of referring to a nonexistent grid_ member. This restores Debug compilation while preserving the intended invariant that rendering must not write an identical character twice.

Size labels intentionally replace interior spaces, so requiring an entirely unwritten destination would reject valid solutions. Update the testing notes now that Debug builds pass.

Tests: Debug and Release CTest suites (4 passed each)

Refs: #7
2026-07-30 16:46:36 +01:00
Codex instance 912d59fdd9 test: cover rendering a valid solution
Exercise Results::output() with the known order-8 fixture so Debug builds compile and run the rendering assertions. Check the output dimensions and ensure the valid tiling leaves no unrendered cells.

The test passes in Release and currently fails to compile in Debug because Results::set() refers to the nonexistent grid_ member.

Refs: #7
2026-07-30 16:43:29 +01:00
Codex instance 0b65501c73 test: add independent placement validation
Establish a CTest harness before changing solver behavior. Validate board dimensions, multiplicities, bounds, overlap and coverage against independent placement data, including known order-8 and constructed order-9 fixtures.

Document Debug and sanitizer workflows while keeping the defects tracked by #7 and #14 separate. Prepare a result adapter so the feasible solver regression can be enabled with the completion fix.

Tests: Release, ASan and UBSan CTest suites (3 passed each)

Refs: #1
2026-07-30 16:40:29 +01:00