Strangeness in TWIC PGN files

General discussion about computer chess...
Post Reply
HumbleProgrammer
Posts: 40
Joined: Sat Jun 19, 2010 11:00 pm
Real Name: Lee Neuse

Strangeness in TWIC PGN files

Post by HumbleProgrammer » Sun Jul 06, 2014 12:48 pm

In the past couple of weeks, PGN downloads from http://www.theweekinchess.com have started giving my PGN parser fits. It seems that several files now contain games where a pair of hyphens ("--") appear in place of a move; twic1025.pgn has dozens of occurrences. Typically, these are at the end of the game (example #1) but once or twice they've appeared in the middle (example #2). Am I correct in assuming that this is invalid PGN?

--- example #1 ---
[Event "TCh-TUR 2014"]
[Site "Konya TUR"]
[Date "2014.06.26"]
[Round "5.7"]
[White "Adhiban,Baskaran"]
[Black "Kuljasevic,D"]
[Result "0-1"]
[WhiteTitle "GM"]
[BlackTitle "GM"]
[WhiteElo "2624"]
[BlackElo "2564"]
[ECO "C53"]
[Opening "Giuoco Piano"]
[WhiteTeam "Tasduvar Satranc Spor Kulubu"]
[BlackTeam "Alapli Aktif Genclik Spor Kulubu"]
[WhiteFideId "5018471"]
[BlackFideId "14506661"]
[EventDate "2014.06.23"]

1. e4 e5 2. Nf3 Nc6 3. Bc4 Bc5 4. c3 Nf6 5. d3 a6 6. Bb3 d6 7. Nbd2 Ba7 8. h3 h6
9. Nf1 Be6 10. Ng3 Qd7 11. O-O O-O 12. Be3 Bxb3 13. Qxb3 Ne7 14. d4 Ng6 15. -- 0-1
--- example #2 ---
[Event "Turkey Cup 2014"]
[Site "Kemer TUR"]
[Date "2014.02.02"]
[Round "2.71"]
[White "Subasi,Zeki"]
[Black "Yuvarlak,U"]
[Result "1/2-1/2"]
[WhiteElo "1714"]
[BlackElo "1850"]
[ECO "C45"]
[Opening "Scotch"]
[Variation "Schmidt variation"]
[WhiteFideId "6345433"]
[BlackFideId "6305598"]
[EventDate "2014.02.01"]

1. e4 e5 2. Nf3 Nc6 3. d4 exd4 4. Nxd4 Nf6 5. Nc3 Bb4 6. Nxc6 bxc6 7. Bd3 d5 8.
O-O Bxc3 9. bxc3 dxe4 10. Qe2 O-O 11. Bxe4 Re8 12. f3 Bf5 13. Bg5 -- 14. Rad1
Qe7 15. Bxf6 Qxf6 16. Qc4 Rad8 17. Bxc6 1/2-1/2
--- end ---

Cheers!
Humble Programmer
,,,^..^,,,

User923005
Posts: 616
Joined: Thu May 19, 2011 1:35 am

Re: Strangeness in TWIC PGN files

Post by User923005 » Mon Jul 07, 2014 7:48 pm

There is nothing in the PGN standard that would allow for that.
It looks to me like they are using "--" as nomenclature for a move that they are missing information for.
But the PGN standard has no such provision, and all following moves will be purely speculative anyway, since we won't know what the board looks like.

hyatt
Posts: 1242
Joined: Thu Jun 10, 2010 2:13 am
Real Name: Bob Hyatt (Robert M. Hyatt)
Location: University of Alabama at Birmingham
Contact:

Re: Strangeness in TWIC PGN files

Post by hyatt » Thu Jul 10, 2014 8:42 pm

I'd bet Ken Thompson's PGN reader would handle that. He talked about this problem in the early 80's. David Levy wrote one of his Sicilian books and had Ken typeset it for him using figurine notation. Ken decided to start building a big book, and when he ran through everything David had, he started scanning in other books, and ran into major issues, as chess opening books are not always printed using the highest quality typefaces, ink and paper (this was prior to the adoption of laser printers, for example). He wrote a PGN reader that could, given enough moves in the game, figure out what that -- meant, which was pretty damned slick back then. If you assume all moves given are legal, you can often narrow that missing move down to just one move that must be played at that point so that some later move is not either illegal or ambiguous...

Used to be some puzzles running around based on this theme, in fact, "what is the missing move". And later the retrograde analysis crowd and their "given this position, what was white's last move" or some such...

User923005
Posts: 616
Joined: Thu May 19, 2011 1:35 am

Re: Strangeness in TWIC PGN files

Post by User923005 » Fri Jul 11, 2014 7:42 pm

It reminds me of a woman I worked with from the University of Washington named Judy Zeh. We worked on some Biology papers on Bowhead Whales (Balaena mysticetus). She was always interested in everything being robust. Is the software robust? Is the mathematics robust? Is the analysis robust?

I remember thinking to myself that it was an excellent approach.

pgn4web
Posts: 97
Joined: Mon Jun 14, 2010 10:26 pm

Re: Strangeness in TWIC PGN files

Post by pgn4web » Fri Jul 25, 2014 9:39 pm

Within PGN, the -- token is sometimes used for nullmoves, i.e. when a player "passes" and the opponent makes two moves in a row.
http://www.enpassant.dk/chess/palview/m ... gncontnull
Many PGN reader interpret the -- token like that (and the moves sequence sort of makes sense in the examples).

Not sure about the meaning of a nullmove into a TWIC file, you can always try asking Mark Chrowther, his email is on the TWIC homepage.

Post Reply