From 59b2486bc3d153b8946661c7a6a501f4410b4e66 Mon Sep 17 00:00:00 2001 From: marotear Date: Sun, 20 Jan 2019 03:24:03 -0800 Subject: [PATCH] Simplify pvHit (#1953) Removing unnecessary excludedMove condition (there is not excluded move for PvNodes) and re-ordering computation. Non functional change. --- src/search.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 933cab87..4a1a3523 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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) { -- 2.39.2