Page 1 of 5

PGN standard

Posted: Thu May 21, 2020 2:20 pm
by lucasart
What's the correct syntax for indicating black move ?

Code: Select all

1.. e5
1... e5
1. ... e5

Re: PGN standard

Posted: Thu May 21, 2020 2:54 pm
by Joerg Oster
lucasart wrote: Thu May 21, 2020 2:20 pm What's the correct syntax for indicating black move ?

Code: Select all

1.. e5
1... e5
1. ... e5
Wikipedia https://en.wikipedia.org/wiki/Algebraic ... on_(chess) uses the second format.

However, according to that link, a white move is replaced by an ellipsis (3 dots).
This would make

Code: Select all

1. ... e5
the correct one.

Re: PGN standard

Posted: Thu May 21, 2020 2:57 pm
by Ferdy
lucasart wrote: Thu May 21, 2020 2:20 pm What's the correct syntax for indicating black move ?

Code: Select all

1.. e5
1... e5
1. ... e5
This one, 1... e5

8.2.2.2: Export format move number indications
https://opensource.apple.com/source/Che ... andard.txt

Re: PGN standard

Posted: Thu May 21, 2020 3:16 pm
by Joerg Oster
Ferdy wrote: Thu May 21, 2020 2:57 pm
lucasart wrote: Thu May 21, 2020 2:20 pm What's the correct syntax for indicating black move ?

Code: Select all

1.. e5
1... e5
1. ... e5
This one, 1... e5

8.2.2.2: Export format move number indications
https://opensource.apple.com/source/Che ... andard.txt
No blanks after the move numbers?

Re: PGN standard

Posted: Thu May 21, 2020 3:31 pm
by Joerg Oster
Ferdy wrote: Thu May 21, 2020 2:57 pm
lucasart wrote: Thu May 21, 2020 2:20 pm What's the correct syntax for indicating black move ?

Code: Select all

1.. e5
1... e5
1. ... e5
This one, 1... e5

8.2.2.2: Export format move number indications
https://opensource.apple.com/source/Che ... andard.txt
Guess you're right.
2 examples from some of my test suites in pgn format.

Code: Select all

17. Rxe4 $3 {(Var)} Bh2+ 18. Kxh2 Qxe4 19. Re1 Qxc4 20. b3 Qc5 (20... Qb5 21.
Bh6 Rf5 22. Nb6 $18) (20... Qa6 21. Nxc7 $18) 21. Be7 $18 *

Code: Select all

{#} 1. Ke8 (1. c5+ Kc7 2. Be6 Bf3) 1... Bxc4 (1... Kc7 2. Be6 Kd6 3. Bf7 Kc7 4.
Ke7 {mit baldiger Entscheidung durch den d-Bauern.}) 2. Kd8 1-0

Re: PGN standard

Posted: Thu May 21, 2020 4:51 pm
by Ferdy
Joerg Oster wrote: Thu May 21, 2020 3:16 pm
Ferdy wrote: Thu May 21, 2020 2:57 pm
lucasart wrote: Thu May 21, 2020 2:20 pm What's the correct syntax for indicating black move ?

Code: Select all

1.. e5
1... e5
1. ... e5
This one, 1... e5

8.2.2.2: Export format move number indications
https://opensource.apple.com/source/Che ... andard.txt
No blanks after the move numbers?
See section 7 on tokens.
https://opensource.apple.com/source/Che ... andard.txt

One can put a space between tokens.

Re: PGN standard

Posted: Fri May 22, 2020 1:24 am
by lucasart
Ferdy wrote: Thu May 21, 2020 2:57 pm
lucasart wrote: Thu May 21, 2020 2:20 pm What's the correct syntax for indicating black move ?

Code: Select all

1.. e5
1... e5
1. ... e5
This one, 1... e5

8.2.2.2: Export format move number indications
https://opensource.apple.com/source/Che ... andard.txt
Thanks. I'll just use "1... e5" then.

What confused me is that the same standard document mentions "1. ... c5" in section 16.1.4. What can one do with a self-contradicting standard...

Re: PGN standard

Posted: Fri May 22, 2020 2:54 am
by Ferdy
lucasart wrote: Fri May 22, 2020 1:24 am What confused me is that the same standard document mentions "1. ... c5" in section 16.1.4. What can one do with a self-contradicting standard...
This one,

Code: Select all

And then after 1. ... c5:
is only a comment describing the fields of the FEN. That comment is not in movetext section.

Re: PGN standard

Posted: Fri May 22, 2020 3:18 am
by bob
Been discussed many times. I always used 1. ... e5. Tokenizes much better than having the "..." jammed against the move number (which commonly has a period after it. Which makes it somewhat ambiguous. I handle either. I output "1. ... e5" however. The PGN standard has been around a long time. And now there are multiple flavors dealing with formatting inside comments and such.

Probably won't happen, but it would be good to see a PGN 2.0 that cleans up some of the complaints and ambiguities.

Re: PGN standard

Posted: Fri May 22, 2020 3:25 am
by lucasart
bob wrote: Fri May 22, 2020 3:18 am Probably won't happen, but it would be good to see a PGN 2.0 that cleans up some of the complaints and ambiguities.
Agreed. We need a new PGN format, and we can still call it PGN: Parsable Game Notation :lol:

The current one is about as parsable as modern C++.