Merge branch 'nmp'

This commit is contained in:
stefiosif
2025-02-13 20:40:36 +02:00

View File

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