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
This commit was merged in pull request #23.
This commit is contained in:
Codex instance
2026-07-30 17:55:21 +01:00
parent 0a7ce1e49e
commit d751d1b13e
7 changed files with 296 additions and 198 deletions
+8 -6
View File
@@ -13,9 +13,13 @@ The tests independently check board dimensions, square multiplicities, bounds,
overlap, and complete coverage. They cover small unsatisfiable solver inputs, a
known order-8 solution, invalid placement diagnostics, and construction of an
order-9 solution from the order-8 fixture. The routed order-9 solver test
checks that its search counters exactly match order 8. The rendering test also
formats the known order-8 solution and checks the resulting grid dimensions and
coverage.
checks that its search counters exactly match order 8. The skyline tests check
smallest-width valley selection and deterministic tie-breaking, validate an
order-8 result with descending candidates, and independently validate a direct
order-9 search with ascending candidates. That direct test is deliberately
separate from the public order-9 route, which uses even-predecessor
construction. The rendering test also formats the known order-8 solution and
checks the resulting grid dimensions and coverage.
When Python is available, `reference-support` also tests the dependency-free
placement JSON validator. If the optional OR-Tools package is present, it
@@ -45,6 +49,4 @@ ctest --test-dir build-ubsan --output-on-failure
```
The sanitizer flags shown are supported by Clang and GCC. Other compilers may
require different flags. A feasible solver run currently exposes the
pre-existing defect tracked by issue #14; the test additions deliberately do
not include its separate fix.
require different flags.