Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

feat: separated core into it's own standalone crate, chessie #18

Merged
merged 6 commits into from
Sep 20, 2024

Conversation

dannyhammer
Copy link
Owner

This is a huge PR. Normally, I wouldn't make a PR this massive, let alone attempt to merge it in. I'm making this PR as a way to clearly document what's going on here.

In short, these commits change the brogle_core crate into it's own standalone crate called chessie. There are a lot of refactors and adjustments, many of which improved the move generation. Some things broke and had to be fixed. That's okay. Right now, this is all still just my own personal pet project. I'm taking steps towards separating things out into independent repositories, and planning to publish some of these crates/tools.

The major changes of this PR are:

  • Added a movegen_debugger tool accepts a user-provided script (details & README for this coming later) and tests the user-provided move generator against the chess library. If a perft fails, it recursively detects exactly which position is causing the failure (well, the first position to cause failure) and displays what the user-supplied move generator is doing wrong, whether that's generating illegal moves, failing to generate legal ones, etc.
  • Changed brogle_core to chessie. This comes with a lot of refactors internally, such as adding lots of lookup tables to the build.rs file.
  • Massively overhauled move generation in chessie. It now uses an iterator to generate legal moves one at a time. In the future, I would also like to have the get_legal_moves() function compute all legal moves in bulk, rather than one-at-a-time, to speed things up. But that's an optimization for later.

@dannyhammer dannyhammer merged commit 24a8d20 into main Sep 20, 2024
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant