Reset DrawValue[] before new search
authorMarco Costalba <mcostalba@gmail.com>
Mon, 21 Apr 2014 12:30:27 +0000 (14:30 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 21 Apr 2014 12:30:27 +0000 (14:30 +0200)
Spotted by Ronald de Man

bench: 7384368

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);
 
   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;
 
   Contempt[0] =  Options["Contempt Factor"] * PawnValueEg / 100; // From centipawns
   Contempt[1] = (Options["Contempt Factor"] + 12) * PawnValueEg / 100;