forked from official-stockfish/Stockfish
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
4c9a684
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vondele Yes, this is a very tempting solution. But we already have this condition in step 14 of our main search. Why do we need the exact same condition once more?
Answer: because the committed patch broke the logic! It seems much more appropriate to simply revert the commit!
4c9a684
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverting is one option, but the fact that nobody (neither the author nor the reviewers) saw this issue (and it is not so easy to spot) also means the code is not obvious, nor clear. Basically, moveCountPruning should not be true if there is a mate threat.. this patch is one way how to do it. I'll also have a look at an alternative, but I think this patch is reasonable as well.
4c9a684
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vondele This is not exactly true. Jarrod (@DU-jdto) already pointed to some possible issues in the original PR. I don't blame anyone for not spotting this corner-case, of course! But can we be sure there are no further possible issues, even very rare ones?
It also seems to be more logical conceptually, to have one boolean control the LMP stuff, and another one for the move ordering stuff. But maybe that's just me. ;-)
4c9a684
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
certainly no blame intended (on the contrary, clearly good sense by @DU-jdto of what could go wrong).
Anyway, we need to fix this issue, one way or another, so let's see what the options are. Note that skipQuiets is pruning, not move ordering.