1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00

Accurate pv: don't need to set/reset (ss+1)->pv

No functional change.
This commit is contained in:
Marco Costalba 2014-11-17 17:21:54 +01:00
parent 478f62f9e6
commit 792ae2c5a6

View file

@ -661,6 +661,12 @@ moves_loop: // When in check and at SpNode search starts from here
&& (tte->bound() & BOUND_LOWER) && (tte->bound() & BOUND_LOWER)
&& tte->depth() >= depth - 3 * ONE_PLY; && tte->depth() >= depth - 3 * ONE_PLY;
if (PvNode)
{
(ss+1)->pv = pv;
ss->pv[0] = MOVE_NONE;
}
// Step 11. Loop through moves // Step 11. Loop through moves
// Loop through all pseudo-legal moves until no moves remain or a beta cutoff occurs // Loop through all pseudo-legal moves until no moves remain or a beta cutoff occurs
while ((move = mp.next_move<SpNode>()) != MOVE_NONE) while ((move = mp.next_move<SpNode>()) != MOVE_NONE)
@ -698,9 +704,6 @@ moves_loop: // When in check and at SpNode search starts from here
<< " currmovenumber " << moveCount + PVIdx << sync_endl; << " currmovenumber " << moveCount + PVIdx << sync_endl;
} }
if (PvNode)
(ss+1)->pv = NULL;
ext = DEPTH_ZERO; ext = DEPTH_ZERO;
captureOrPromotion = pos.capture_or_promotion(move); captureOrPromotion = pos.capture_or_promotion(move);
@ -867,7 +870,6 @@ moves_loop: // When in check and at SpNode search starts from here
if (PvNode && (moveCount == 1 || (value > alpha && (RootNode || value < beta)))) if (PvNode && (moveCount == 1 || (value > alpha && (RootNode || value < beta))))
{ {
pv[0] = MOVE_NONE; pv[0] = MOVE_NONE;
(ss+1)->pv = pv;
value = newDepth < ONE_PLY ? value = newDepth < ONE_PLY ?
givesCheck ? -qsearch<PV, true>(pos, ss+1, -beta, -alpha, DEPTH_ZERO) givesCheck ? -qsearch<PV, true>(pos, ss+1, -beta, -alpha, DEPTH_ZERO)
: -qsearch<PV, false>(pos, ss+1, -beta, -alpha, DEPTH_ZERO) : -qsearch<PV, false>(pos, ss+1, -beta, -alpha, DEPTH_ZERO)