Skip to content

feat: implement PEXT bitboards for sliding piece move gen - #112

Merged
ptsouchlos merged 11 commits into
mainfrom
feature/pext
Sep 7, 2025
Merged

feat: implement PEXT bitboards for sliding piece move gen#112
ptsouchlos merged 11 commits into
mainfrom
feature/pext

Conversation

@ptsouchlos

@ptsouchlos ptsouchlos commented Sep 6, 2025

Copy link
Copy Markdown
Owner

Implemented PEXT bitboards for sliding piece move gen as an alternative to the existing "magic" number based sliding piece move gen.

Fixes #109

bench: 2517656

ptsouchlos added 11 commits July 9, 2025 21:49
Also added placeholder notes for where we could introduce the PEXT instructions for move generation
Trying to abstract getting sliding piece attacks so we can easily switch between implementations depending on the platform the code is running on.
Created a new sliding piece attack struct that will handle only sliding piece attacks. This way we can abstract the backend method used to generate these attack tables and look them up.
bench: 2517656
Fixed sliding piece move gen when using PEXT tables
Moved more tests around and fixed up some code.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.12346% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.89%. Comparing base (9b56d98) to head (9095b50).

Files with missing lines Patch % Lines
engine/src/engine.rs 0.00% 13 Missing ⚠️
chess/src/sliding_piece_attacks.rs 94.55% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #112      +/-   ##
==========================================
+ Coverage   83.66%   83.89%   +0.22%     
==========================================
  Files          49       51       +2     
  Lines        7182     7346     +164     
==========================================
+ Hits         6009     6163     +154     
- Misses       1173     1183      +10     

☔ 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.

@ptsouchlos

Copy link
Copy Markdown
Owner Author
Elo   | 0.11 +- 2.25 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=16MB
LLR   | 2.95 (-2.94, 2.94) [-5.00, 0.00]
Games | N: 26428 W: 4392 L: 4384 D: 17652
Penta | [266, 2738, 7210, 2722, 278]
https://pyronomy.pythonanywhere.com/test/3221/

@ptsouchlos
ptsouchlos merged commit 792df22 into main Sep 7, 2025
9 checks passed
@ptsouchlos
ptsouchlos deleted the feature/pext branch September 7, 2025 16:54
ptsouchlos pushed a commit that referenced this pull request Nov 5, 2025
Elo   | 0.11 +- 2.25 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=16MB
LLR   | 2.95 (-2.94, 2.94) [-5.00, 0.00]
Games | N: 26428 W: 4392 L: 4384 D: 17652
Penta | [266, 2738, 7210, 2722, 278]
https://pyronomy.pythonanywhere.com/test/3221/

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

[FEATURE] Implement PEXT Based Move Generation

2 participants