From: Marco Costalba Date: Fri, 20 Aug 2010 07:49:13 +0000 (+0200) Subject: Use evaluation margins also in main search X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=b177e6dd91a176ca3b49c0a35a21d1cad8d17dfa Use evaluation margins also in main search For now keep FutilityMarginsMatrix[] unchanged, in future we are going to reduce to compensate for extra margin. At this moment it is enough we don't have regressions. After 9694 games on russian cluster Mod - Orig 1608 - 1578 - 6508 ELO +1 (+- 2.8) Signed-off-by: Marco Costalba --- diff --git a/src/search.cpp b/src/search.cpp index fac0444c..e07134c4 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -982,7 +982,7 @@ namespace { Move ttMove, move, excludedMove, threatMove; Depth ext, newDepth; Value bestValue, value, oldAlpha; - Value refinedValue, nullValue, futilityValueScaled; // Non-PV specific + Value refinedValue, nullValue, futilityBase, futilityValueScaled; // Non-PV specific bool isCheck, singleEvasion, singularExtensionNode, moveIsCheck, captureOrPromotion, dangerous; bool mateThreat = false; int moveCount = 0; @@ -1182,6 +1182,7 @@ namespace { CheckInfo ci(pos); ss->bestMove = MOVE_NONE; singleEvasion = isCheck && mp.number_of_evasions() == 1; + futilityBase = ss->eval + margins[pos.side_to_move()]; singularExtensionNode = depth >= SingularExtensionDepth[PvNode] && tte && tte->move() @@ -1253,7 +1254,7 @@ namespace { // We illogically ignore reduction condition depth >= 3*ONE_PLY for predicted depth, // but fixing this made program slightly weaker. Depth predictedDepth = newDepth - reduction(depth, moveCount); - futilityValueScaled = ss->eval + futility_margin(predictedDepth, moveCount) + futilityValueScaled = futilityBase + futility_margin(predictedDepth, moveCount) + H.gain(pos.piece_on(move_from(move)), move_to(move)); if (futilityValueScaled < beta)