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

Do less depth reduction in null move pruning for complex positions

This patch makes us reduce less depth in null move pruning if complexity is high enough.
Thus, null move pruning now depends in two distinct ways on complexity,
while being the only search heuristic that exploits complexity so far.

passed STC
https://tests.stockfishchess.org/tests/view/61fde60fd508ec6a1c9f7754
LLR: 2.94 (-2.94,2.94) <0.00,2.50>
Total: 170000 W: 45555 L: 45027 D: 79418
Ptnml(0-2): 760, 19352, 44359, 19658, 871

passed LTC
https://tests.stockfishchess.org/tests/view/61fe91febf46cb834cbd5c90
LLR: 2.96 (-2.94,2.94) <0.50,3.00>
Total: 145272 W: 39182 L: 38651 D: 67439
Ptnml(0-2): 127, 14864, 42157, 15327, 161

closes https://github.com/official-stockfish/Stockfish/pull/3923

bench 4461945
This commit is contained in:
Michael Chaly 2022-02-07 13:32:21 +03:00 committed by Joost VandeVondele
parent 4d3950c6eb
commit 08ac4e9db5

View file

@ -776,7 +776,9 @@ namespace {
// Step 7. Razoring.
// If eval is really low check with qsearch if it can exceed alpha, if it can't,
// return a fail low.
if (!PvNode && depth <= 6 && eval < alpha - 400 - 300 * depth * depth)
if ( !PvNode
&& depth <= 6
&& eval < alpha - 400 - 300 * depth * depth)
{
value = qsearch<NonPV>(pos, ss, alpha - 1, alpha);
if (value < alpha)
@ -805,8 +807,8 @@ namespace {
{
assert(eval - beta >= 0);
// Null move dynamic reduction based on depth and value
Depth R = std::min(int(eval - beta) / 205, 3) + depth / 3 + 4;
// Null move dynamic reduction based on depth, eval and complexity of position
Depth R = std::min(int(eval - beta) / 205, 3) + depth / 3 + 4 - (complexity > 500);
ss->currentMove = MOVE_NULL;
ss->continuationHistory = &thisThread->continuationHistory[0][0][NO_PIECE][0];