1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 00:33:09 +00:00

PV-Nodes likely to fail low

Do not decrease reduction at pv-nodes which are likely to fail low.

The idea of this patch can be described as following: during the search, if a node
on the principal variation was re-searched in non-pv search and this re-search got
a value which was much lower than alpha, then we can assume that this pv-node is
likely to fail low again, and we can reduce more aggressively at this node.

Passed STC
https://tests.stockfishchess.org/tests/view/6023a5fa7f517a561bc49638
LLR: 2.95 (-2.94,2.94) {-0.25,1.25}
Total: 70288 W: 6443 L: 6223 D: 57622
Ptnml(0-2): 239, 5022, 24436, 5174, 273

Passed LTC
https://tests.stockfishchess.org/tests/view/6023f2617f517a561bc49661
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 105656 W: 4048 L: 3748 D: 97860
Ptnml(0-2): 67, 3312, 45761, 3630, 58

Closes https://github.com/official-stockfish/Stockfish/pull/3349

Bench: 3766422
This commit is contained in:
Vizvezdenec 2021-02-11 10:45:16 +03:00 committed by Stéphane Nicolet
parent 573f0e364f
commit 76daa88cf8

View file

@ -1025,6 +1025,14 @@ moves_loop: // When in check, search starts from here
movedPiece = pos.moved_piece(move);
givesCheck = pos.gives_check(move);
// Indicate PvNodes that will probably fail low if node was searched with non-PV search
// at depth equal or greater to current depth and result of this search was far below alpha
bool likelyFailLow = PvNode
&& ttMove
&& (tte->bound() & BOUND_UPPER)
&& ttValue < alpha + 200 + 100 * depth
&& tte->depth() >= depth;
// Calculate new depth for this move
newDepth = depth - 1;
@ -1172,8 +1180,9 @@ moves_loop: // When in check, search starts from here
if (th.marked())
r++;
// Decrease reduction if position is or has been on the PV (~10 Elo)
if (ss->ttPv)
// Decrease reduction if position is or has been on the PV
// and node is not likely to fail low (~10 Elo)
if (ss->ttPv && !likelyFailLow)
r -= 2;
// Increase reduction at root and non-PV nodes when the best move does not change frequently