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
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.
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 calledchessie
. 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:
movegen_debugger
tool accepts a user-provided script (details & README for this coming later) and tests the user-provided move generator against thechess
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.brogle_core
tochessie
. This comes with a lot of refactors internally, such as adding lots of lookup tables to thebuild.rs
file.chessie
. It now uses an iterator to generate legal moves one at a time. In the future, I would also like to have theget_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.