solver: construct odd-order solutions #21

Merged
mcp merged 1 commits from codex/issue-6-odd-construction into main 2026-07-30 17:26:37 +01:00
Collaborator

Summary

  • route odd orders N >= 9 through the N-1 direct solver
  • preserve predecessor coordinates on the enlarged board and tile the new border
  • separate search and construction timing and document the order-9 comparison
  • validate exact coordinates, full coverage, route boundaries, and search counters

Review

The row-major stride translation hazard was found during review and corrected before commit. Final review found no outstanding issues.

Testing

  • Release CTest: 8/8 passed
  • Debug CTest: 8/8 passed
  • AddressSanitizer CTest: 8/8 passed
  • UndefinedBehaviorSanitizer CTest: 8/8 passed
  • git diff --check

Benchmark

Order 9 counter-free median: 1.778 s predecessor search plus 0.458 us construction, compared with the recorded 158.69 s direct search (about 89x faster). Counted order-9 search nodes exactly match order 8 at 60,485,176.

Closes #6

## Summary - route odd orders `N >= 9` through the `N-1` direct solver - preserve predecessor coordinates on the enlarged board and tile the new border - separate search and construction timing and document the order-9 comparison - validate exact coordinates, full coverage, route boundaries, and search counters ## Review The row-major stride translation hazard was found during review and corrected before commit. Final review found no outstanding issues. ## Testing - Release CTest: 8/8 passed - Debug CTest: 8/8 passed - AddressSanitizer CTest: 8/8 passed - UndefinedBehaviorSanitizer CTest: 8/8 passed - `git diff --check` ## Benchmark Order 9 counter-free median: 1.778 s predecessor search plus 0.458 us construction, compared with the recorded 158.69 s direct search (about 89x faster). Counted order-9 search nodes exactly match order 8 at 60,485,176. Closes #6
mcp added 1 commit 2026-07-30 17:24:31 +01:00
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
mcp merged commit 3e667d6de0 into main 2026-07-30 17:26:37 +01:00
mcp deleted branch codex/issue-6-odd-construction 2026-07-30 17:26:37 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mgrettondann/partridge-cpp#21