mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 15:37:47 +00:00
Fix an assert in SMP case
SMP case is very tricky and raises an assert in stage_moves(): assert(stage == KILLERS_S1 || stage == QUIETS_1_S1 || stage == QUIETS_2_S1) So rewrite the code to just return moves[] when we are sure we are in quiet moves stages. Also rename stage_moves to quiet_moves to reflect that. No functional change (but needs testing in SMP case)
This commit is contained in:
+2
-3
@@ -1075,9 +1075,8 @@ moves_loop: // When in check and at SpNode search starts from here
|
||||
Value bonus = Value(int(depth) * int(depth));
|
||||
History.update(pos.moved_piece(bestMove), to_sq(bestMove), bonus);
|
||||
|
||||
if (bestMove != ttMove)
|
||||
for (const ExtMove* em = mp.stage_moves(); em->move != bestMove; ++em)
|
||||
History.update(pos.moved_piece(em->move), to_sq(em->move), -bonus);
|
||||
for (const ExtMove* em = mp.quiet_moves(); em && em->move != bestMove; ++em)
|
||||
History.update(pos.moved_piece(em->move), to_sq(em->move), -bonus);
|
||||
|
||||
if (is_ok((ss-1)->currentMove))
|
||||
Countermoves.update(pos.piece_on(prevMoveSq), prevMoveSq, bestMove);
|
||||
|
||||
Reference in New Issue
Block a user