mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Cleanup and optimize Position::has_mate_threat()
There is a functional change because we now skip more moves and because do_move() / undo_move() is well known to be not reversible we end up with a change in node count, although there is actually no change but a bit speed up. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -1168,7 +1168,7 @@ namespace {
|
||||
|
||||
// Expensive mate threat detection (only for PV nodes)
|
||||
if (PvNode)
|
||||
mateThreat = pos.has_mate_threat(opposite_color(pos.side_to_move()));
|
||||
mateThreat = pos.has_mate_threat();
|
||||
|
||||
// Initialize a MovePicker object for the current position
|
||||
MovePicker mp = MovePicker(pos, ttMove, depth, H, ss, (PvNode ? -VALUE_INFINITE : beta));
|
||||
|
||||
Reference in New Issue
Block a user