Buggy pgn output from a CEGT & CCRL gui

Discussion of computer chess matches and engine tournaments.

Moderators: hgm, Rebel, chrisw

Norm Pollock
Posts: 1056
Joined: Thu Mar 09, 2006 4:15 pm
Location: Long Island, NY, USA

Buggy pgn output from a CEGT & CCRL gui

Post by Norm Pollock »

Some gui(s) used by both CCRL and CEGT produces pgns that violate an important pgn principle. This gui assumes there is ALWAYS ambiguity when 2 of the same pieces can move to the same square. However, if one of these pieces cannot legally move to the square, then the gui does not notice that there is NO ambiguity. For example, if 2 white knights can move to e5, but 1 of the white knights is pinned to the white King by a black bishop, then there is no ambiguity.

This type of situation has occurred hundreds of times in the pgn downloads of CCRL and CEGT, and will keep on occurring unless corrected.

I am just interested in identifying the gui(s) that do this. I have software that can correct the situation, but I do want to know which gui is doing this so that perhaps they will correct their bug.

Here are 2 examples, the first from CEGT, and the second from CCRL. In the first, I removed the comments. These games are very recent.

I have put in a comment at the top of each game that notes the move whose notation I am questioning.

Code: Select all

{white move 9: Nge2 should be Ne2}
[Event "Rybka231g01"]
[Site "?"]
[Date "2007.04.10"]
[Round "12.3"]
[White "Shredder 10"]
[Black "Rybka 2.3.1 w32 1CPU"]
[Result "1/2-1/2"]
[ECO "E20"]
[WhiteElo "2812"]
[BlackElo "2950"]
[Annotator "0.58;0.06"]
[PlyCount "205"]
[EventDate "2007.04.07"]
[EventType "simul"]
[Source "Buczyna"]
[TimeControl "40/1080:40/1080:600+10"]

1. d4 Nf6 2. c4 e6 3. Nc3 Bb4 4. f3 c5 5. d5 b5 6. e4 bxc4 7. Bxc4 Ba6 
8. Bxa6 Nxa6 9. Nge2 c4 10. O-O Qb6+ 11. Kh1 O-O 12. Bg5 Rab8 13. Bxf6 gxf6 
14. Ng3 Be7 15. Na4 Qb5 16. f4 Kh8 17. f5 exd5 18. exd5 Bd6 19. Ne4 Be5 
20. Rb1 Nb4 21. Nac3 Qb6 22. Qd2 Qd4 23. Qe2 Rbc8 24. Rbd1 Qb6 25. Rf3 Rg8 
26. b3 Nd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kf2 Rb7 84. Nc3+ Ke6 85.
Kf1 Rc7 86. Ne2 Kd5 87. Ke1 Rb7 88. Kd2 Rb8 89. Kd3 Rb3+ 90. Nc3+ Ke6 91. Bg7
Rb7 92. Bf8 Rb8 93. Bc5 Rb2 94. Ne2 Kd5 95. Bd4 Rb4 96. Bc3 Rb1 97. Nd4 Rb4 98.
Kc2 Rc4 99. Nxf5 1-0

Uri Blass
Posts: 10268
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Buggy pgn output from a CEGT & CCRL gui

Post by Uri Blass »

<snipped>
Norm Pollock wrote:Some gui(s) used by both CCRL and CEGT produces pgns that violate an important pgn principle.
[/code]
I do not understand what is the importance of the principle that you give.
I see no big problem if irrelevant information is posted.

If the reason is size of the pgn then I think that it is better to change the pgn standard to make pgn even shorter.

Why to have 1.Nf3 when 1.Nf is enough to understand the move because moves that begins with 1.Nf can only be 1.Nf3?

Uri
Alessandro Scotti

Re: Buggy pgn output from a CEGT & CCRL gui

Post by Alessandro Scotti »

The PGN standard has a section (8.2.3.4) dedicated to this:

Code: Select all

Note that the above disambiguation is needed only to distinguish among moves of the same piece type to the same square; it is not used to distinguish among attacks of the same piece type to the same square. An example of this would be a position with two white knights, one on square c3 and one on square g1 and a vacant square e2 with White to move. Both knights attack square e2, and if both could legally move there, then a file disambiguation is needed; the &#40;nonchecking&#41; knight moves would be "Nce2" and "Nge2". However, if the white king were at square e1 and a black bishop were at square b4 with a vacant square d2 &#40;thus an absolute pin of the white knight at square c3&#41;, then only one white knight &#40;the one at square g1&#41; could move to square e2&#58; "Ne2".
I agree it's not a terrible problem but it can possibly break some parsers so it should be implemented according to the suggested behavior.
Norm Pollock
Posts: 1056
Joined: Thu Mar 09, 2006 4:15 pm
Location: Long Island, NY, USA

Re: Buggy pgn output from a CEGT & CCRL gui

Post by Norm Pollock »

Uri Blass wrote:<snipped>
Norm Pollock wrote:Some gui(s) used by both CCRL and CEGT produces pgns that violate an important pgn principle.
[/code]
I do not understand what is the importance of the principle that you give.
I see no big problem if irrelevant information is posted.

If the reason is size of the pgn then I think that it is better to change the pgn standard to make pgn even shorter.

Why to have 1.Nf3 when 1.Nf is enough to understand the move because moves that begins with 1.Nf can only be 1.Nf3?

Uri
It's all about having "Standards" or "Specifications" and following them. Without standards, software that acts upon pgns wouldn't know what to expect as input. Here is a site with pgn standards:

http://www.very-best.de/pgn-spec.htm#9.9

Here are some other seemingly harmless illegal variations of pgn standards:

"1/2" instead of "1/2-1/2"

"2007.1.1" instead of "2007.01.01"

"[Eco" instead of "[ECO"

"++" instead of "#"

And if there wasn't a standard on capitalization, there would be confusion between "b" and "B".

Guis, databases and utilities accept a lot of variations from standards for practical reasons. But the more that standards are not followed, the more the chance the program will not work on that data.

In this particular case, mentioned in the 1st post here, it is really a small matter to fix the problem because the gui already knows all the possible legal moves. All it has to do is check the list of legal moves to see if there are 2 legal moves by the same type of piece to the same square before it uses "ambiguity" notation. The fix should be easy. All I am asking is that this bug be fixed.
Marc Lacrosse
Posts: 511
Joined: Wed Mar 08, 2006 10:05 pm

Re: Buggy pgn output from a CEGT & CCRL gui

Post by Marc Lacrosse »

A much more common "faulty" PGN interpretation is the lack of a white space between the dot after move number and the corresponding white move : "1.Nc3" (should be "1. Nc3").

Another common "fault" is incorrect writing of promotion moves.

Some major GUI's do not produce strictly correct PGN.

This is very annoying when using external command line utilities for PGN processing.

AFAIK, one of the best "PGN syntax correctors" is PGNextract by David Barnes. I apply it to any PGN produced by chessbase or SCID before further processing.

Marc
Norm Pollock
Posts: 1056
Joined: Thu Mar 09, 2006 4:15 pm
Location: Long Island, NY, USA

Re: Buggy pgn output from a CEGT & CCRL gui

Post by Norm Pollock »

Marc Lacrosse wrote:A much more common "faulty" PGN interpretation is the lack of a white space between the dot after move number and the corresponding white move : "1.Nc3" (should be "1. Nc3").

Another common "fault" is incorrect writing of promotion moves.

Some major GUI's do not produce strictly correct PGN.

This is very annoying when using external command line utilities for PGN processing.

AFAIK, one of the best "PGN syntax correctors" is PGNextract by David Barnes. I apply it to any PGN produced by chessbase or SCID before further processing.

Marc
The mystery gui, whose identity I am trying to find out, also has a problem with promotions and en passant.

It will use "f8Q" instead of "f8=Q"

It will use "exf3ep" instead of simply "exf3"

As for syntax correctors, besides the excellent "pgn-extract", I also use "Joined" by Andreas Stable and my own "trim". I use them in this order: trim, pgn-extract, joined