]> git.sesse.net Git - stockfish/commitdiff
Don't probe TT at RootNode
authorJoona Kiiski <joona.kiiski@gmail.com>
Thu, 28 Jul 2011 21:02:50 +0000 (00:02 +0300)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 29 Jul 2011 11:42:22 +0000 (12:42 +0100)
In that case we should also update RootMoveList to avoid
bogus output

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp

index 94613260cc99b4d7e5ce45b5608c38bc662d26a1..fce0409bf17023e89ad61665b4afcb5bc885df14 100644 (file)
@@ -770,9 +770,10 @@ namespace {
 
     // At PV nodes we check for exact scores, while at non-PV nodes we check for
     // a fail high/low. Biggest advantage at probing at PV nodes is to have a
-    // smooth experience in analysis mode.
-    if (tte && (PvNode ? tte->depth() >= depth && tte->type() == VALUE_TYPE_EXACT
-                       : ok_to_use_TT(tte, depth, beta, ss->ply)))
+    // smooth experience in analysis mode. We don't probe at Root nodes otherwise
+    // we should also update RootMoveList to avoid bogus output.
+    if (!RootNode && tte && (PvNode ? tte->depth() >= depth && tte->type() == VALUE_TYPE_EXACT
+                                    : ok_to_use_TT(tte, depth, beta, ss->ply)))
     {
         TT.refresh(tte);
         ss->bestMove = ttMove; // Can be MOVE_NONE