Try NMP only on non pv nodes

This commit is contained in:
stefiosif
2025-02-10 19:53:39 +02:00
parent a69c697892
commit 2b94b7af79

View File

@@ -54,7 +54,9 @@ pub fn negamax(
}
}
if plies != 0 && !in_check && depth >= 3 && do_nmp && game.board.non_pawn_materials() > 0 {
let non_pv = beta == alpha + 1;
if non_pv && plies != 0 && !in_check && depth >= 3 && do_nmp && game.board.non_pawn_materials() > 0 {
game.make_null_move();
let score = -negamax(
game,