Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for Chess960 and Double Chess960 #6

Merged
merged 5 commits into from
Oct 27, 2024
Merged

Conversation

dannyhammer
Copy link
Owner

Adds support for Chess960 by refactoring how Castling moves are encoded/computed.

Several utility functions are provided for converting to/from standard and 960 notation for FEN strings, castling rights, and castling moves.

The fischer.epd test suite is also included in the test cases, and passes up to depth 6. I should note that running this suite at depth 6 takes a long time, so I have cut it down to depth 5 by default.

movegen works, and you can toggle between displaying castling rights (and castle moves) in both standard and Chess960 notation with the alternate formatter (`#`)
@dannyhammer
Copy link
Owner Author

Right now there seems to be a bug. When I use this branch in toad, the bench changes.

Latest commit to main: bench 13225972

Using this version of Chessie: bench 17511825

@dannyhammer
Copy link
Owner Author

Right now there seems to be a bug. When I use this branch in toad, the bench changes.

Latest commit to main: bench 13225972

Using this version of Chessie: bench 17511825

Bug found. The change of castling moves to the KxR notation caused Toad's move ordering, as Castling moves were now being scored as KxR moves. Adding a conditional in the MVV-LVA scoring to ensure that the victim's color must be different fixed the issue.

We're good to merge this, now.

@dannyhammer dannyhammer merged commit 851a909 into main Oct 27, 2024
1 check passed
@dannyhammer dannyhammer deleted the frc branch October 27, 2024 21:11
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.

1 participant