]> git.sesse.net Git - stockfish/commitdiff
Simplify pvHit (#1953)
authormarotear <marotear00@gmail.com>
Sun, 20 Jan 2019 11:24:03 +0000 (03:24 -0800)
committerMarco Costalba <mcostalba@users.noreply.github.com>
Sun, 20 Jan 2019 11:24:03 +0000 (12:24 +0100)
Removing unnecessary excludedMove condition (there is not excluded move for PvNodes) and re-ordering computation.

Non functional change.

src/search.cpp

index 933cab87b447fae890a417e3f821f90eb738c462..4a1a352349f966ecf5efd224540dc894bd9821ff 100644 (file)
@@ -640,7 +640,7 @@ namespace {
     ttValue = ttHit ? value_from_tt(tte->value(), ss->ply) : VALUE_NONE;
     ttMove =  rootNode ? thisThread->rootMoves[thisThread->pvIdx].pv[0]
             : ttHit    ? tte->move() : MOVE_NONE;
-    pvHit = ttHit && tte->pv_hit();
+    pvHit = (ttHit && tte->pv_hit()) || (PvNode && depth > 4 * ONE_PLY);
 
     // At non-PV nodes we check for an early TT cutoff
     if (  !PvNode
@@ -674,11 +674,6 @@ namespace {
         return ttValue;
     }
 
-    if (   depth > 4 * ONE_PLY
-        && !excludedMove
-        && PvNode)
-        pvHit = true;
-
     // Step 5. Tablebases probe
     if (!rootNode && TB::Cardinality)
     {