Reset DrawValue[] before new search
[stockfish] / src / search.cpp
index 03af5d66d96bc393bb1106dd56694d32f560a48a..216964ab43d5434678695f1f9c88d076cb084243 100644 (file)
@@ -186,6 +186,7 @@ void Search::think() {
   RootColor = RootPos.side_to_move();
   TimeMgr.init(Limits, RootPos.game_ply(), RootColor);
 
+  DrawValue[0] = DrawValue[1] = VALUE_DRAW;
   Contempt[0] =  Options["Contempt Factor"] * PawnValueEg / 100; // From centipawns
   Contempt[1] = (Options["Contempt Factor"] + 12) * PawnValueEg / 100;