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

Bug in disambiguation in PGN notation #177

Open
lucaferranti opened this issue Aug 8, 2024 · 2 comments
Open

Bug in disambiguation in PGN notation #177

lucaferranti opened this issue Aug 8, 2024 · 2 comments
Assignees
Labels
bug Something isn't working feature analysis board

Comments

@lucaferranti
Copy link

In the attached screenshot, the third move is

  1. Ri2

however, this is ambigous as both chariots could reach the i2 point and it needs to disambiguate, i.e. it should be

  1. Rii2

(if I'm not mistaken, PGN should disambiguate first by file and then by rank,hence Rii2 instead of R1i2)

image

@lucaferranti
Copy link
Author

lucaferranti commented Aug 8, 2024

for comparison / inspiration: here's my san parser for xiangqi. Cannot take much credit, I adapted the corresponding lichess library to xiangqi, although bugs are most likely my own ^.^

@benckx
Copy link
Owner

benckx commented Aug 9, 2024

Yes I'm aware of the issue. I made a desambiguation algo to the WXF parser but didn't apply it to other formats. I think I used the same trick as other parsers, i.e. keep all possible interpretations in memory and eliminate the ones that encounter a move that makes no sense or can not be played. With luck at the end there's only 1 valid sequence of moves.

The issue is known but it's possible there was no ticket yet, so I can keep this one.

@benckx benckx added bug Something isn't working feature analysis board labels Aug 9, 2024
@benckx benckx moved this to Backlog in elephantchess.io roadmap Aug 9, 2024
@benckx benckx self-assigned this Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature analysis board
Projects
Development

No branches or pull requests

2 participants