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:
parent
478f62f9e6
commit
792ae2c5a6
1 changed files with 6 additions and 4 deletions
|
@ -661,6 +661,12 @@ moves_loop: // When in check and at SpNode search starts from here
|
|||
&& (tte->bound() & BOUND_LOWER)
|
||||
&& tte->depth() >= depth - 3 * ONE_PLY;
|
||||
|
||||
if (PvNode)
|
||||
{
|
||||
(ss+1)->pv = pv;
|
||||
ss->pv[0] = MOVE_NONE;
|
||||
}
|
||||
|
||||
// Step 11. Loop through moves
|
||||
// Loop through all pseudo-legal moves until no moves remain or a beta cutoff occurs
|
||||
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;
|
||||
}
|
||||
|
||||
if (PvNode)
|
||||
(ss+1)->pv = NULL;
|
||||
|
||||
ext = DEPTH_ZERO;
|
||||
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))))
|
||||
{
|
||||
pv[0] = MOVE_NONE;
|
||||
(ss+1)->pv = pv;
|
||||
value = newDepth < ONE_PLY ?
|
||||
givesCheck ? -qsearch<PV, true>(pos, ss+1, -beta, -alpha, DEPTH_ZERO)
|
||||
: -qsearch<PV, false>(pos, ss+1, -beta, -alpha, DEPTH_ZERO)
|
||||
|
|
Loading…
Add table
Reference in a new issue