Skip to content

By 🦉 for the iChess.io#16

Open
sowson wants to merge 7 commits into
kz04px:masterfrom
sowson:master
Open

By 🦉 for the iChess.io#16
sowson wants to merge 7 commits into
kz04px:masterfrom
sowson:master

Conversation

@sowson

@sowson sowson commented Aug 17, 2024

Copy link
Copy Markdown

Hi @kz04px, I simplified my case, I would like to contribute if you agree? Thanks! ;-).

@kz04px

kz04px commented Aug 20, 2024

Copy link
Copy Markdown
Owner

The perft values should already be correct, but you've changed them. I don't think this can be right. Perhaps there's a misunderstanding in how castling works under chess 960?

Take this code when castling king side, for example:

-const auto king_path = (squares_between(ksq, squares::G1) | Bitboard(squares::G1)) & ~Bitboard(ksq);
+const auto king_path = (squares_between(ksq, castle_king_to[0]) | Bitboard(castle_king_to[0])) & ~Bitboard(ksq);

king_path is a mask of the squares the king travels through to get to its destination square of g1. This never changes no matter what the starting position is.

@sowson

sowson commented Aug 20, 2024

Copy link
Copy Markdown
Author

Can you please take a look at https://support.chess.com/en/articles/8614060-how-do-i-castle-in-chess960 ? It explains what I did.

@sowson

sowson commented Sep 11, 2025

Copy link
Copy Markdown
Author

Hi @kz04px, can you reconsider using this change? ;-).

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