X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=403c9363abee5d95ea5589a4d524c92680ec324c;hb=b833c8247afcfd4a5404b0473f31ebddb23f57d6;hp=d659fab6a1654f6bce5b1ed4d26e120d3962cb3a;hpb=419c5b69caa2918f9cb74d6ec71d790bc276b424;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index d659fab6..403c9363 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -653,6 +653,7 @@ void SearchStack::init(int ply) { currentMove = threatMove = MOVE_NONE; reduction = Depth(0); eval = VALUE_NONE; + evalInfo = NULL; } void SearchStack::initKillers() { @@ -1375,14 +1376,15 @@ namespace { const int FutilityValueMargin = 112 * bitScanReverse32(int(depth) * int(depth) / 2); // Evaluate the position statically - if (isCheck) - ss[ply].eval = VALUE_NONE; - else + if (!isCheck) { if (tte && (tte->type() & VALUE_TYPE_EVAL)) staticValue = value_from_tt(tte->value(), ply); else + { staticValue = evaluate(pos, ei, threadID); + ss[ply].evalInfo = &ei; + } ss[ply].eval = staticValue; futilityValue = staticValue + FutilityValueMargin;