]> git.sesse.net Git - stockfish/commitdiff
Tweak return value in futility pruning
authorlonfom169 <50217346+lonfom169@users.noreply.github.com>
Thu, 30 Nov 2023 04:12:19 +0000 (01:12 -0300)
committerDisservin <disservin.social@gmail.com>
Sat, 2 Dec 2023 10:46:44 +0000 (11:46 +0100)
In futility pruning, return the average between eval and beta.

Passed STC:
https://tests.stockfishchess.org/tests/view/65680bb6136acbc5735521d7
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 15200 W: 3926 L: 3642 D: 7632
Ptnml(0-2): 36, 1699, 3867, 1941, 57

Passed LTC:
https://tests.stockfishchess.org/tests/view/656817fc136acbc573552304
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 200376 W: 49700 L: 49036 D: 101640
Ptnml(0-2): 110, 22584, 54137, 23246, 111

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

Bench: 1403703

src/search.cpp

index 160031384838abdc9ba8b5c882dc754a04bb5cd0..ba5ea2e54f9e3d7f92553016dfd503b11fa2cf12 100644 (file)
@@ -780,7 +780,7 @@ Value search(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth, boo
              >= beta
         && eval >= beta && eval < 29462  // smaller than TB wins
         && (!ttMove || ttCapture))
-        return eval;
+        return (eval + beta) / 2;
 
     // Step 9. Null move search with verification search (~35 Elo)
     if (!PvNode && (ss - 1)->currentMove != MOVE_NULL && (ss - 1)->statScore < 17257 && eval >= beta