Skip to content

Comments

fix: incorrect detection of EP moves when making moves#211

Open
ptsouchlos wants to merge 21 commits intomainfrom
fix/pv-move-crashes
Open

fix: incorrect detection of EP moves when making moves#211
ptsouchlos wants to merge 21 commits intomainfrom
fix/pv-move-crashes

Conversation

@ptsouchlos
Copy link
Owner

Changes

bench: 1084774

Added failing unit test for the case where an en passant square is
currently incorrectly recognized.
Implement a "line bitboard" function imitating what is done in
stockfish. This is used as part of the fix for properly detecting legal
EP squares when move making.
This largely follows the same logic as the fix/patch in stockfish,
including the latest changes and simplification (see
official-stockfish/Stockfish@2321cf2)

bench: 1084774
@codecov-commenter
Copy link

codecov-commenter commented Feb 8, 2026

Codecov Report

❌ Patch coverage is 99.47368% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.65%. Comparing base (23483df) to head (a77e221).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
chess/src/rays.rs 96.55% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #211      +/-   ##
==========================================
+ Coverage   91.04%   91.65%   +0.60%     
==========================================
  Files          40       40              
  Lines        7136     7321     +185     
==========================================
+ Hits         6497     6710     +213     
+ Misses        639      611      -28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Cleaned up code that fixes the PV bug and tried to add better comments
for my future self since I have a smooth brain.

bench: 1084774
bench: 1084774
bench: 1084774
We'll add this back in a follow up PR where we'll factor it out of the
move generator. For now, it's not needed (or used) in this branch.

bench: 1084774
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.

[BUG] Potential bug in PV generation when there is a 3-fold repetition

2 participants