Skip to content
Permalink
Browse files

Fix issue 2019. Bench: 3275144

  • Loading branch information...
vondele committed Feb 26, 2019
1 parent badb2ac commit 4c9a684ec8430d711643646684699d3d46eb28a9
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/search.cpp
@@ -915,7 +915,8 @@ namespace {

// Skip quiet moves if movecount exceeds our FutilityMoveCount threshold
moveCountPruning = depth < 16 * ONE_PLY
&& moveCount >= FutilityMoveCounts[improving][depth / ONE_PLY];
&& moveCount >= FutilityMoveCounts[improving][depth / ONE_PLY]
&& bestValue > VALUE_MATED_IN_MAX_PLY;

// Step 13. Extensions (~70 Elo)

4 comments on commit 4c9a684

@joergoster

This comment has been minimized.

Copy link

joergoster replied Feb 26, 2019

@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!

@vondele

This comment has been minimized.

Copy link
Owner Author

vondele replied Feb 26, 2019

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.

@joergoster

This comment has been minimized.

Copy link

joergoster replied Feb 26, 2019

@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. ;-)

@vondele

This comment has been minimized.

Copy link
Owner Author

vondele replied Feb 26, 2019

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.

Please sign in to comment.
You can’t perform that action at this time.