]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Store node evaluation in SearchStack
[stockfish] / src / search.cpp
index 44bd9530d3e6a5f362de24fcb1ce438b5e86d24c..76db6d69217f4d53c3d007d808a0b1b952554111 100644 (file)
@@ -652,6 +652,7 @@ void SearchStack::init(int ply) {
   pv[ply] = pv[ply + 1] = MOVE_NONE;
   currentMove = threatMove = MOVE_NONE;
   reduction = Depth(0);
+  eval = VALUE_NONE;
 }
 
 void SearchStack::initKillers() {
@@ -1391,6 +1392,7 @@ namespace {
     const int FutilityValueMargin = 112 * bitScanReverse32(int(depth) * int(depth) / 2);
 
     // Enhance score accuracy with TT value if possible
+    ss[ply].eval = staticValue;
     futilityValue = staticValue + FutilityValueMargin;
     staticValue = refine_eval(tte, staticValue, ply);