7 ms·
As a chess player ( around 1700 FIDE ) and developer of a retired ( and moderatly successfull ) android chess application I cannot disagree more. Back in 1995
by register 4y ago
As a chess player ( around 1700 FIDE ) and developer of a retired ( and moderatly successfull ) android chess application I cannot disagree more.
Back in 1995 there was no free Chessbase reader, no Scid but there was TWIC and the Exter Chess Club website. I was studying most of the games with a Notepad and a physical chessboard. PGN has contributed in a significant way to the growth of digital chess.
At the same time PGN is extremely easy to parse and I can tell by having implemented such a parser myself. The main trick is to segment the games start and finish on newlines and tags. Once the start and finish of a game are identified tokenization of the moves and other symbols is trivial. To increase robustness most of the PGN readers also check that moves are legal with a move generator.
- fasterik 4y agoI wasn't making a claim about the historical importance of PGN. My issue is that it's become the de facto standard for distributing large collections of games, which is inefficient and no longer necessary given the ubiquity of free chess programs. I agree that tokenizing isn't difficult. My pet peeve is about using SAN as a standardized format for feeding games to the computer. A naive encoding would use 6 bits for source square + 6 bits for destination square + 4 bits for promotion and other move flags. This fits a move in 2 bytes and is unambiguous. Compare that to SAN, which uses up to 7 bytes per move; requires knowledge of the board state and iteration over every legal source square; is potentially ambiguous if source rank/file isn't disambiguated properly; and adds extraneous information about captures and checks.