Repository navigation
fix(search): Hold a line of check extensions to the ply rail - #253
Merged
Merged
Conversation
The in-check extension fires at two nodes, the root and every full width node under it, and the one under it holds a node's depth where it was. So a falling depth is not what ends a line of checks. What can end one is the repetition and fifty move rules, and neither is bound to fire first: a chain that captures keeps resetting the counter, and one that never repeats is never caught by the other. A line can therefore reach the ply a mate score stops being told from an eval by, a thousand, and the history ring a repetition is read out of, a thousand and twenty four less the fifty move window. The rail stops it instead. A node standing on the rail answers from the static eval, which is what quiescence has answered with at the same ply since it was given one, and it gives up the mate such a node may be in on the same terms. Nothing measured has ever crossed the rail, and the comments beside the extension said so and said that nothing proved it could not. Placed on the rail, a node searched 1840 nodes past it before this and searches none after. The bench, the tactical count and the strategic total are all unchanged, since nothing any of them searches comes within a hundred plies of the rail. Bench: 3868987 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
Speed against
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The in-check extension fires at two nodes, the root and every full width
node under it. The root's is held inside a byte already. The one under it
holds a node's depth where it was, so a falling depth is not what ends a
line of checks.
What can end one is the repetition and fifty move rules, and neither is
bound to fire first: a chain that captures keeps resetting the counter,
and one that never repeats is never caught by the other. So a line could
reach the ply a mate score stops being told from an eval by, a thousand,
and the history ring a repetition is read out of, a thousand and twenty
four less the fifty move window.
A node standing on the rail now answers from the static eval, which is
what quiescence has answered with at the same ply since it was given a
rail, and it gives up the mate such a node may be in on the same terms.
The rail sits after the repetition and fifty move tests, so no draw and no
mate on the hundredth half move is masked, and before the extension, so
nothing carries a line past.
Placed on the rail, a node searched 1840 nodes past it before this and
searches none after. Both new tests fail with the rail taken out again.
The bench, the tactical count and the strategic total are unchanged, since
nothing any of them searches comes within a hundred plies of the rail.
That says the change is not a play change at the depths anything here
measures; it is not an Elo claim, since the lines it touches are ones no
measurement visits.
One thing it deliberately does not claim:
has_legal_moveplays a moveabove the rail, so a node at the rail with an expired counter touches the
ply above it and puts it back. Nothing indexes by the line ply in there
and the ring is a thousand and twenty four, so nothing breaks, but the
bound is on what the search evaluates rather than on every move it makes.
🤖 Generated with Claude Code