Skip to content

feat: add staged legal movegen#270

Closed
ptsouchlos wants to merge 10 commits intomainfrom
feature/staged-legal-movegen
Closed

feat: add staged legal movegen#270
ptsouchlos wants to merge 10 commits intomainfrom
feature/staged-legal-movegen

Conversation

@ptsouchlos
Copy link
Owner

Changes

Refactor move_generation, legal_move_generation and submodules for staged legal movegen. This is a stepping stone for implementing a move picker (#41).

bench: 729284

Add a promotion filter for what promotions to consider when enumerating
moves.

bench: 729284
This will replace the function that returns a massive tuple of data for
legal move gen.

bench: 729284
Integrate submodule and updated enumerate moves function into main
movegen and legal movegen.

bench: 729284
@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2026

Codecov Report

❌ Patch coverage is 96.42857% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.57%. Comparing base (8084ecd) to head (d345340).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
chess/src/legal_move_generation.rs 95.29% 4 Missing ⚠️
chess/src/move_generation/metadata.rs 95.55% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #270      +/-   ##
==========================================
- Coverage   94.63%   94.57%   -0.06%     
==========================================
  Files          45       46       +1     
  Lines        7896     7927      +31     
==========================================
+ Hits         7472     7497      +25     
- Misses        424      430       +6     

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

The new approach had significantly worse performance (~13% worse) in
search bench. This simplifies our approach to just provide a move type
(all, capture, quiet) when generating moves and then the mobility
bitboards are just &'d with a mask. This makes the new move gen only ~3%
worse on average compared to main.

bench: 773383
We changed the function signature so we have to update all the call
sites.
bench: 773383
bench: 773383
bench: 773383
@ptsouchlos ptsouchlos force-pushed the feature/staged-legal-movegen branch from e7aa992 to d345340 Compare March 19, 2026 22:01
@ptsouchlos
Copy link
Owner Author

Closing in favor of #273

@ptsouchlos ptsouchlos closed this Mar 20, 2026
@ptsouchlos ptsouchlos deleted the feature/staged-legal-movegen branch March 20, 2026 02:43
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.

2 participants