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

UCI could be simplified wrt en-passant #19

Open
LionelCons opened this issue Apr 10, 2024 · 2 comments
Open

UCI could be simplified wrt en-passant #19

LionelCons opened this issue Apr 10, 2024 · 2 comments

Comments

@LionelCons
Copy link

I think that the en-passant indication (E) is not needed.

If a White Pawn unmoves from d6 to e5 (i.e. uci=d6e5) we know that this was a capture (diagonal move). Since the previously captured piece is not given, we can assume an en-passant capture (i.e. e5xd6 e.p.) to undo.

In contrast, if a White Pawn unmoves from d6 to e5 resurrecting a Pawn (i.e. uci=Pd6e5) we know that this was a normal capture (i.e. e5xd6) to undo.

The same is true for https://github.com/kraktus/retroboard-chess but it seems that the Python code is inactive...

@kraktus
Copy link
Owner

kraktus commented Apr 11, 2024

Hey,thanks for the feedback! Indeed it could be stripped, but that would make the rUCI position sensitive (cannot be parsed without a matching board), which was inconvenient to use.

The python code is indeed inactive but pretty much done 😄

@LionelCons
Copy link
Author

LionelCons commented Apr 12, 2024

Thanks for the reply.

I'm afraid I don't understand why the parsing would be board sensitive.

FWIW, I'm trying some ideas in Python to merge Move and UnMove as well as Board and RetrogradeBoard.

This seems to work fine and I don't need the E or even the U in the extended UCI.

In my test code, the move parsing is board independent. The board is only needed to check if the move is legal or not.

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