mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Move moveCount update near the SpNode case
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
c416133e2f
commit
2991ff0dc2
1 changed files with 8 additions and 11 deletions
|
@ -1194,16 +1194,17 @@ split_point_start: // At split points actual search starts from here
|
||||||
&& (move = mp.get_next_move()) != MOVE_NONE
|
&& (move = mp.get_next_move()) != MOVE_NONE
|
||||||
&& !ThreadsMgr.thread_should_stop(threadID))
|
&& !ThreadsMgr.thread_should_stop(threadID))
|
||||||
{
|
{
|
||||||
|
assert(move_is_ok(move));
|
||||||
|
|
||||||
if (SpNode)
|
if (SpNode)
|
||||||
{
|
{
|
||||||
moveCount = ++sp->moveCount;
|
moveCount = ++sp->moveCount;
|
||||||
lock_release(&(sp->lock));
|
lock_release(&(sp->lock));
|
||||||
}
|
}
|
||||||
|
else if (move == excludedMove)
|
||||||
assert(move_is_ok(move));
|
|
||||||
|
|
||||||
if (move == excludedMove)
|
|
||||||
continue;
|
continue;
|
||||||
|
else
|
||||||
|
movesSearched[moveCount++] = move;
|
||||||
|
|
||||||
moveIsCheck = pos.move_is_check(move, ci);
|
moveIsCheck = pos.move_is_check(move, ci);
|
||||||
captureOrPromotion = pos.move_is_capture_or_promotion(move);
|
captureOrPromotion = pos.move_is_capture_or_promotion(move);
|
||||||
|
@ -1235,13 +1236,9 @@ split_point_start: // At split points actual search starts from here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
newDepth = depth - ONE_PLY + ext;
|
|
||||||
|
|
||||||
// Update current move (this must be done after singular extension search)
|
// Update current move (this must be done after singular extension search)
|
||||||
movesSearched[moveCount] = ss->currentMove = move;
|
ss->currentMove = move;
|
||||||
|
newDepth = depth - ONE_PLY + ext;
|
||||||
if (!SpNode)
|
|
||||||
moveCount++;
|
|
||||||
|
|
||||||
// Step 12. Futility pruning (is omitted in PV nodes)
|
// Step 12. Futility pruning (is omitted in PV nodes)
|
||||||
if ( !PvNode
|
if ( !PvNode
|
||||||
|
@ -1399,7 +1396,7 @@ split_point_start: // At split points actual search starts from here
|
||||||
|
|
||||||
if (SpNode)
|
if (SpNode)
|
||||||
{
|
{
|
||||||
/* Here we have the lock still grabbed */
|
// Here we have the lock still grabbed
|
||||||
sp->slaves[threadID] = 0;
|
sp->slaves[threadID] = 0;
|
||||||
lock_release(&(sp->lock));
|
lock_release(&(sp->lock));
|
||||||
return bestValue;
|
return bestValue;
|
||||||
|
|
Loading…
Add table
Reference in a new issue