Skip to content

Add guarded Null Move Pruning - #2

Merged
KnightStackSys merged 5 commits into
mainfrom
null-move-pruning
Oct 11, 2026
Merged

KnightStackSys merged 5 commits into
mainfrom
null-move-pruning

Conversation

@KnightStackSys

Copy link
Copy Markdown
Owner

Adds a conservative Null Move Pruning baseline to IronPhoenix search without changing the existing pruning stack.

Search

  • NMP only at non-PV nodes
  • disabled while in check
  • disabled in mate windows
  • minimum depth 4
  • dynamic reduction R = 2 + depth / 4
  • blocks consecutive null moves
  • requires non-pawn material for the current player to reduce zugzwang risk
  • synthetic null cutoffs never return manufactured mate scores

Position state

  • adds reversible makeNullMove / undoNullMove
  • preserves/restores Zobrist key, side-to-move, checkers, castling/alive state, and all 4PC en-passant markers
  • expires only the current player's en-passant marker when a null turn is consumed, matching the existing 4PC marker lifecycle

Tests

  • property test verifies null move advances one 4PC turn, recomputes the same Zobrist key, and restores the original position exactly on undo

This PR is intentionally isolated for Elo/SPRT testing before merge.

@KnightStackSys
KnightStackSys merged commit 9334bdd into main Oct 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant