![]() ![]() For example, if there are two knights that can move to e1, but one of them is pinned by an enemy piece (moving this knight would expose the king to a check and is thus an illegal move), PGN states that the move must be encoded as “Ne1”. However, for almost inexplicable reasons, it decided to NEVER use disambiguation files/ranks whenever possible. ![]() It uses SAN (Standard Algebraic Notation, or just “algebraic notation”) to encode chess moves in a game. Parsing PGN Requires a Legal Chess Move Generator It turns out that I really, really hate PGN. I was trying to write a toy program to parse chess PGN (Portable Game Notation) files, to automate chess analysis using the free chess engine Stockfish. ![]()
0 Comments
Leave a Reply. |