Closed jojomi closed 2 years ago
Yep definitely seeing it as well
https://lichess.org/v1WPmjuC#70
https://go.dev/play/p/oKtaveXp8_F
The notation is right it should first distinguish by file, then by rank, then by file + rank. This only needs to disambiguate by rank.
Note that in r7/1R1nk3/2R1p3/p2n1p2/P5p1/4P3/1P2KPP1/8 b - - 1 35
, the move Nf6
is actually totally unambiguous because the knight on d7 is pinned.
I think that the key here is that it needs to be able to handle extraneous additional rank/file specifiers.
@sumnerevans good call, I missed the pin. Yes we do have a strict parser at the moment and I agree it should be able to ignore superfluous ranks and files.
@sumnerevans your PR looks good at first glance. I'll take some time to review and merge if tests hold and there is no other side effects. Thanks!
I am trying to parse this World Championship game
But it results in this:
I assume it might be a problem because of that slightly uncommon case where the 5 is required to distinguish the knights on the same file when both could jump to f6.
Another World Championship example that fails to parse: