-
Notifications
You must be signed in to change notification settings - Fork 4
[3/6] Add MVV-LVA capture ordering and killer moves heuristic #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
luccabb
wants to merge
9
commits into
feature/transposition-table-bounds
Choose a base branch
from
feature/mvv-lva-killer-moves
base: feature/transposition-table-bounds
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[3/6] Add MVV-LVA capture ordering and killer moves heuristic #35
luccabb
wants to merge
9
commits into
feature/transposition-table-bounds
from
feature/mvv-lva-killer-moves
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e8b9ff6 to
df8a32b
Compare
0b53062 to
944a0e0
Compare
df8a32b to
bfb11c1
Compare
944a0e0 to
f1001bf
Compare
4f7fad5 to
1c7b8d9
Compare
Enhances quiescence search with better handling of special positions: **Draw Detection:** - Check fifty-move rule and insufficient material - Detect repetitions when making moves (return 0 for draws) **Check Handling:** - When in check, search ALL legal moves (evasions), not just captures - Can't use stand-pat for pruning when in check (position is unstable) - Separate best_score tracking for in-check vs normal positions **Tactical Move Detection:** - Add `is_tactical_move()` helper function - Tactical moves: captures, promotions, and checks - Previously included quiet pawn pushes (is_zeroing), now more precise **Move Ordering:** - Update `organize_moves_quiescence()` to use is_tactical_move - Sort tactical moves by MVV-LVA Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Improves move ordering for better pruning: **MVV-LVA (Most Valuable Victim - Least Valuable Attacker):** - Sort captures by MVV-LVA score in `organize_moves()` - Best captures (e.g., pawn takes queen) searched first - Increases beta cutoff rate for better pruning **Killer Moves Heuristic:** - Track quiet moves that cause beta cutoffs (2 per ply) - Add `killers` parameter to `organize_moves()` and `negamax()` - Killer moves searched after captures, before other quiet moves - Killers stored in a table indexed by ply depth **Move Ordering Priority:** 1. Captures (sorted by MVV-LVA) 2. Killer moves (quiet moves that caused cutoffs at this ply) 3. Other quiet moves (shuffled for variety) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
f1001bf to
98ee9e1
Compare
🔬 Stockfish Benchmark Resultsvs Stockfish Skill Level 3
Non-checkmate endings:
vs Stockfish Skill Level 4
Non-checkmate endings:
vs Stockfish Skill Level 5
Non-checkmate endings:
Configuration
|
🔬 Stockfish Benchmark Resultsvs Stockfish Skill Level 3
Non-checkmate endings:
vs Stockfish Skill Level 4
Non-checkmate endings:
vs Stockfish Skill Level 5
Non-checkmate endings:
Configuration
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Details
MVV-LVA Capture Ordering
Captures are now sorted by MVV-LVA score, putting the best captures first:
Killer Moves Heuristic
Quiet moves that caused beta cutoffs are remembered:
Move Ordering Priority
Test plan
🤖 Generated with Claude Code