solver: prune insufficient valley capacity #26

Merged
mcp merged 1 commits from codex/issue-10-valley-pruning into main 2026-07-31 08:12:07 +01:00
Collaborator

Summary

  • reject a selected valley when remaining squares no wider than it cannot fill the area below its lower rim
  • cover width-one and width-two gap capacity without redundant special cases
  • provide a compile-time-disabled benchmark comparison mode and dedicated counters
  • document the soundness proof and enabled/disabled measurements

Measurements

With ascending policy and D4 symmetry, five measured Release runs after one warm-up:

  • order 7 exhaustive: 1.110 s / 14,997,603 nodes disabled; 0.996 s / 13,833,048 nodes enabled
  • order 8 first solution: 0.228 s / 2,931,203 nodes disabled; 0.205 s / 2,724,096 nodes enabled

All results passed independent validation and counters were stable. The rule remains enabled by default.

Validation

  • Debug CTest: 12/12 passed
  • ASan+UBSan CTest: 12/12 passed
  • Release benchmark build and format checks passed
  • warning-enabled syntax check passed
  • issue-specific review completed; stale documentation corrected; no correctness findings remain

Closes #10

## Summary - reject a selected valley when remaining squares no wider than it cannot fill the area below its lower rim - cover width-one and width-two gap capacity without redundant special cases - provide a compile-time-disabled benchmark comparison mode and dedicated counters - document the soundness proof and enabled/disabled measurements ## Measurements With ascending policy and D4 symmetry, five measured Release runs after one warm-up: - order 7 exhaustive: 1.110 s / 14,997,603 nodes disabled; 0.996 s / 13,833,048 nodes enabled - order 8 first solution: 0.228 s / 2,931,203 nodes disabled; 0.205 s / 2,724,096 nodes enabled All results passed independent validation and counters were stable. The rule remains enabled by default. ## Validation - Debug CTest: 12/12 passed - ASan+UBSan CTest: 12/12 passed - Release benchmark build and format checks passed - warning-enabled syntax check passed - issue-specific review completed; stale documentation corrected; no correctness findings remain Closes #10
mcp added 1 commit 2026-07-31 08:11:54 +01:00
A selected valley cannot admit a square wider than itself until it reaches the lower neighbouring rim. Reject states whose remaining narrow-square area cannot fill that strip, including width-one and width-two gaps.

Keep an unpruned benchmark mode and dedicated counters so the rule remains independently measurable. Record the soundness argument and the measured default-on improvement.

Tests: Debug CTest (12 passed)

Tests: ASan+UBSan CTest (12 passed)

Refs: #10
mcp merged commit e27427d231 into main 2026-07-31 08:12:07 +01:00
mcp deleted branch codex/issue-10-valley-pruning 2026-07-31 08:12:08 +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#26