From: Marco Costalba Date: Wed, 21 Apr 2010 19:42:34 +0000 (+0100) Subject: Simplify a bit futility marging formula X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=b2c1e15698d6c834fa6a9d975c6841e915a7a77b Simplify a bit futility marging formula Should be a very minor change, but there is a small functional change because futility_margin() is used in more places then in the pruning formula. After 999 games at 1+0 Mod vs Orig +167 =678 -154 +5 ELO Signed-off-by: Marco Costalba --- diff --git a/src/search.cpp b/src/search.cpp index 5cca911b..b2b2414a 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -560,7 +560,7 @@ void init_search() { for (int j = 0; j < 64; j++) // j == moveNumber { // FIXME: test using log instead of BSR - FutilityMarginsMatrix[i][j] = (i < 2 ? 0 : 112 * bitScanReverse32(i * i / 2)) - 8 * j; + FutilityMarginsMatrix[i][j] = (i < 2 ? 0 : 112 * bitScanReverse32(i * i / 2)) - 8 * j + 45; } // Init futility move count array @@ -1480,7 +1480,7 @@ namespace { // Value based pruning Depth predictedDepth = newDepth - nonpv_reduction(depth, moveCount); // We illogically ignore reduction condition depth >= 3*OnePly futilityValueScaled = ss[ply].eval + futility_margin(predictedDepth, moveCount) - + H.gain(pos.piece_on(move_from(move)), move_to(move)) + 45; + + H.gain(pos.piece_on(move_from(move)), move_to(move)); if (futilityValueScaled < beta) { @@ -1838,7 +1838,7 @@ namespace { // Value based pruning Depth predictedDepth = newDepth - nonpv_reduction(sp->depth, moveCount); futilityValueScaled = ss[sp->ply].eval + futility_margin(predictedDepth, moveCount) - + H.gain(pos.piece_on(move_from(move)), move_to(move)) + 45; + + H.gain(pos.piece_on(move_from(move)), move_to(move)); if (futilityValueScaled < sp->beta) {