]> git.sesse.net Git - stockfish/commitdiff
Remove 'update gains' hack
authorMarco Costalba <mcostalba@gmail.com>
Fri, 6 Jun 2014 09:10:40 +0000 (11:10 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 6 Jun 2014 09:10:40 +0000 (11:10 +0200)
Use (move != MOVE_NONE) condition to
filtering out updating gains at root.

bench: 8454456

src/search.cpp

index 529345e960f1159e53acb5c2c15ea9a7cc7042e6..1b11092aa3d527a5561245e45660cb66da7898ac 100644 (file)
@@ -270,7 +270,6 @@ namespace {
     Value bestValue, alpha, beta, delta;
 
     std::memset(ss-2, 0, 5 * sizeof(Stack));
-    (ss-1)->currentMove = MOVE_NULL; // Hack to skip update gains
 
     depth = 0;
     BestMoveChanges = 0;
@@ -553,6 +552,7 @@ namespace {
         &&  ss->staticEval != VALUE_NONE
         && (ss-1)->staticEval != VALUE_NONE
         && (move = (ss-1)->currentMove) != MOVE_NULL
+        &&  move != MOVE_NONE
         &&  type_of(move) == NORMAL)
     {
         Square to = to_sq(move);