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

How to get necessary game rule information of a variant (like used piece id)? #27

Open
yjf2002ghty opened this issue Jul 1, 2023 · 1 comment

Comments

@yjf2002ghty
Copy link
Contributor

I'm considering adding a "Board setup" part which allows user to set up the board graphically instead of using FEN, which might be useful for those non-expert users. However, I've looked at the export interfaces of ffish.js library, there is no function that can provide detailed information on the game rule such as used piece id characters (q, r, n, b, etc.) and the promotion relationship between pieces. There is also no function that can provide information such as castling, n-fold repetition (the half move clock value needs this), valid gating area (used in seirawan gating) and other necessary information for setup.

Is there any method to gather these information other than simply using trial-and-error method by changing the FEN and validate it or reading the content of variants.ini and process the game rule entries in it?

@ianfab
Copy link
Owner

ianfab commented Jul 4, 2023

Ideally I think the whole ruleset, i.e., basically the Variant struct, should be exposed to the library in a structured way, especially if one considers maybe even the possibility of doing variant configuration via a GUI, but I am not an expert on how to do this in the cleanest way when interfacing between the languages.

So far in most projects using pyffish or ffishjs I think the set of allowed pieces was just inferred from the start FEN, or hardcoded. Due to potential pawn promotion to pieces not present in the starting position this is not always correct though, so a more direct way would be preferable.

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

No branches or pull requests

2 participants