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

960 variants #24

Closed
gbtami opened this issue Aug 4, 2019 · 5 comments
Closed

960 variants #24

gbtami opened this issue Aug 4, 2019 · 5 comments
Labels
question Further information is requested

Comments

@gbtami
Copy link
Member

gbtami commented Aug 4, 2019

Can FairyStockfish play 960 (sub)variants of variants starting with standard chess initial FEN?
(Crazyhouse, Losers, Seirawan, etc.)

@ianfab
Copy link
Member

ianfab commented Aug 5, 2019

During the implementations I tried to maintain the "UCI_Chess960" option as a universal flag to switch between normal and 960-style shuffling variants, so I expect it to work also for variants like Crazyhouse, Losers, and S-Chess, as well as for large-board variants. So far I however did not really test this feature, except for caparandom/CRC, which is implemented as a separate variant (although under the hood it is just capablanca chess + 960 flag) to be compatible with GUIs.

However, for variants with castling of non-royal kings (giveaway, extinction, etc.) the 960 option will not work, because of the difficulty to identify the king-like castling piece when there can be more than one (would perhaps require an FEN extension, e.g., providing the king file in the castling field). Currently it just assumes the pseudo-king to be on the e-file, which of course does not work for 960 positions.

@gbtami
Copy link
Member Author

gbtami commented Aug 5, 2019

If I understand correctly I can use "UCI_Chess960" for pychess-variants seek creation dialog (as an optional 960 [x] checkbox) for Standard, Crazyhouse, Capablanca, and S-chess.
I'm not sure about adding this option to oriental variants (Makruk, Shogi, Xiangqi). Can it be interesting? Or is it meaningless?
Thx for the explanation anyhow!

@ianfab
Copy link
Member

ianfab commented Aug 5, 2019

The GUI is usually responsible for generating the starting position in shuffle variants, the engine only supports playing a given position, so just adding the option does not change anything apart from the protocol (castling move and FEN notation). Python-chess for example supports generation of chess960 FENs, but I do not know about any caparandom starting position generator. As a very simple approach one could just randomly shuffle the pieces on the back rank and repeat it until the king is between the rooks and the bishops are on different colors, which does not even require knowledge about the game (can be done just based on the FEN string).

The "UCI_Chess960" option only makes sense for variants that use castling, because otherwise the rules of the game do not depend on the starting position, so there is no need for the engine to distinguish. Shuffle variants of games without castling is basically nothing else then a kind of "start from position" feature.

@gbtami
Copy link
Member Author

gbtami commented Aug 5, 2019

Yes, I know that GUI is responsible for generating starting position. I added it to PyChess GUI years ago.
I completely forgot that oriental variants has no castling at all so this solved quickly :)

@gbtami gbtami closed this as completed Aug 5, 2019
@ianfab
Copy link
Member

ianfab commented Aug 5, 2019

Ah, I was not aware that you already have it, especially not for caparandom. In that case there should indeed not be much more to do than just setting the 960 option.

@ianfab ianfab added the question Further information is requested label Jan 5, 2020
ianfab pushed a commit that referenced this issue Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants