Skip to content

perf(search): assign remaining Snap terms when bounding deck payoff - #70

Merged
nichinichisou0609 merged 1 commit into
mainfrom
perf/deck-payoff-assignment
Oct 19, 2026
Merged

nichinichisou0609 merged 1 commit into
mainfrom
perf/deck-payoff-assignment

Conversation

@nichinichisou0609

Copy link
Copy Markdown
Contributor

Summary

  • The deck-payoff power bound of a member prefix gains an assignment bound: remaining member terms stay per character, while the Snap terms of the five slots are assigned to distinct columns (placed slots keep their own member's row). It is never above the existing column relaxation, so it only tightens the bound; it is used while the Snap pool has at most 128 columns.
  • A node whose payoff bound only ties the K-th payoff re-checks the K-th power with the assignment bound before pruning, so ties that no completion can win are cut on the canonical key.
  • A bounded payoff (score steps) hands over to the joint traversal on the first shortfall instead of re-ranking the domain in rounds; incumbents already evaluated are kept.

Tests

  • Unit test: the assignment bound covers the best exact power of every completion of each canonical member prefix and never exceeds the relaxation.
  • Saturated-tie and hand-over cases checked against exhaustive Top-K (tests/score_steps_bounds.rs, tests/skip_points_bounds.rs).
  • cargo clippy --workspace --all-targets -- -D warnings and cargo test -p ournotes-search pass.

🤖 Generated with Claude Code

The power bound of a member prefix took the smaller of a per-character and a per-column relaxation, so a single Snap column could serve several slots. Add an assignment bound that keeps the remaining member terms per character but assigns the Snap terms over the five slots on distinct columns, with placed slots keeping their own member's row. It is never above the column relaxation, so it only tightens the bound, and it is used only while the Snap pool is narrow enough for the matching work to pay off.

A payoff bound that only ties the K-th's payoff now re-checks the K-th's power with that assignment bound before pruning, so a tie no completion can reach falls to the canonical key.

A bounded payoff (score steps) no longer re-ranks the domain after a shortfall: the first shortfall makes the retained ranking optimistic, so the joint traversal takes over and re-ranks against the incumbents already evaluated. This removes the round limit and the per-layout shortfall map.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nichinichisou0609
nichinichisou0609 merged commit b46e780 into main Oct 19, 2026
6 checks passed
@nichinichisou0609
nichinichisou0609 deleted the perf/deck-payoff-assignment branch October 19, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant