searcher: add see pruning - #197
Merged
Merged
Conversation
| break; | ||
| } | ||
|
|
||
| if (player == board.player) { |
Collaborator
There was a problem hiding this comment.
Is there some slicker syntax available here? This is branching with one-liners inside.
Owner
Author
There was a problem hiding this comment.
Optimizer should, hopefully, do this for us :)
|
|
||
| if constexpr (!isRoot) { | ||
| /* skip this branch if SEE determines the static exchange results in a significant material loss */ | ||
| const bool moveHasQuietFlag = move.getFlag() == movegen::MoveFlag::Quiet; |
Collaborator
There was a problem hiding this comment.
Don't we have isQuietMove for this?
Owner
Author
There was a problem hiding this comment.
isQuietMove is actually a bit misleading - it's just:
constexpr inline bool isQuietMove() const
{
return !isNoisyMove();
}
clarashepherd
approved these changes
Aug 7, 2025
clarashepherd
left a comment
Collaborator
There was a problem hiding this comment.
A few nitpicks, otherwise looking great :) Nice to see the SEE swap getting an upgrade!
hansbinderup
force-pushed
the
hans/add-see-pruning
branch
from
August 11, 2025 06:38
f5d2926 to
85ca720
Compare
SEE pruning is an attempt at pruning branches by evaluating the worst/best case scenario in a simplified way. If the SEE score is significantly low then we can assume that the given branch is not worth searching. This implementation is very similar to our capture score but here we just compute a balance - and quiet moves are also accepted. Bench 1209330
hansbinderup
force-pushed
the
hans/add-see-pruning
branch
from
September 6, 2025 14:48
85ca720 to
af5d325
Compare
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.
SEE pruning is an attempt at pruning branches by evaluating the worst/best case scenario in a simplified way.
If the SEE score is significantly low then we can assume that the given branch is not worth searching.
This implementation is very similar to our capture score but here we just compute a balance - and quiet moves are also accepted.
Bench 1209330