Skip to content

Commit 59b2486

Browse files
marotearmcostalba
authored andcommitted
Simplify pvHit (#1953)
Removing unnecessary excludedMove condition (there is not excluded move for PvNodes) and re-ordering computation. Non functional change.
1 parent 691a287 commit 59b2486

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/search.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ namespace {
640640
ttValue = ttHit ? value_from_tt(tte->value(), ss->ply) : VALUE_NONE;
641641
ttMove = rootNode ? thisThread->rootMoves[thisThread->pvIdx].pv[0]
642642
: ttHit ? tte->move() : MOVE_NONE;
643-
pvHit = ttHit && tte->pv_hit();
643+
pvHit = (ttHit && tte->pv_hit()) || (PvNode && depth > 4 * ONE_PLY);
644644

645645
// At non-PV nodes we check for an early TT cutoff
646646
if ( !PvNode
@@ -674,11 +674,6 @@ namespace {
674674
return ttValue;
675675
}
676676

677-
if ( depth > 4 * ONE_PLY
678-
&& !excludedMove
679-
&& PvNode)
680-
pvHit = true;
681-
682677
// Step 5. Tablebases probe
683678
if (!rootNode && TB::Cardinality)
684679
{

0 commit comments

Comments
 (0)