Skip to content
Permalink
Browse files

Simplify pvHit (official-stockfish#1953)

Removing unnecessary excludedMove condition (there is not excluded move for PvNodes) and re-ordering computation.

Non functional change.
  • Loading branch information...
marotear authored and mcostalba committed Jan 20, 2019
1 parent 691a287 commit 59b2486bc3d153b8946661c7a6a501f4410b4e66
Showing with 1 addition and 6 deletions.
  1. +1 −6 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)
{

0 comments on commit 59b2486

Please sign in to comment.
You can’t perform that action at this time.