PGN standard

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
lucasart
Posts: 3109
Joined: Mon May 31, 2010 11:29 am
Full name: lucasart
Contact:

PGN standard

Post by lucasart » Thu May 21, 2020 12:20 pm

What's the correct syntax for indicating black move ?

Code: Select all

1.. e5
1... e5
1. ... e5
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.

Joerg Oster
Posts: 760
Joined: Fri Mar 10, 2006 3:29 pm
Location: Germany

Re: PGN standard

Post by Joerg Oster » Thu May 21, 2020 12:54 pm

lucasart wrote:
Thu May 21, 2020 12: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.
Last edited by Joerg Oster on Thu May 21, 2020 1:14 pm, edited 1 time in total.
Jörg Oster

Ferdy
Posts: 4270
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: PGN standard

Post by Ferdy » Thu May 21, 2020 12:57 pm

lucasart wrote:
Thu May 21, 2020 12: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

Joerg Oster
Posts: 760
Joined: Fri Mar 10, 2006 3:29 pm
Location: Germany

Re: PGN standard

Post by Joerg Oster » Thu May 21, 2020 1:16 pm

Ferdy wrote:
Thu May 21, 2020 12:57 pm
lucasart wrote:
Thu May 21, 2020 12: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?
Jörg Oster

Joerg Oster
Posts: 760
Joined: Fri Mar 10, 2006 3:29 pm
Location: Germany

Re: PGN standard

Post by Joerg Oster » Thu May 21, 2020 1:31 pm

Ferdy wrote:
Thu May 21, 2020 12:57 pm
lucasart wrote:
Thu May 21, 2020 12: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
Jörg Oster

Ferdy
Posts: 4270
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: PGN standard

Post by Ferdy » Thu May 21, 2020 2:51 pm

Joerg Oster wrote:
Thu May 21, 2020 1:16 pm
Ferdy wrote:
Thu May 21, 2020 12:57 pm
lucasart wrote:
Thu May 21, 2020 12: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.

User avatar
lucasart
Posts: 3109
Joined: Mon May 31, 2010 11:29 am
Full name: lucasart
Contact:

Re: PGN standard

Post by lucasart » Thu May 21, 2020 11:24 pm

Ferdy wrote:
Thu May 21, 2020 12:57 pm
lucasart wrote:
Thu May 21, 2020 12: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...
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.

Ferdy
Posts: 4270
Joined: Sun Aug 10, 2008 1:15 pm
Location: Philippines

Re: PGN standard

Post by Ferdy » Fri May 22, 2020 12:54 am

lucasart wrote:
Thu May 21, 2020 11:24 pm
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.

bob
Posts: 20916
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: PGN standard

Post by bob » Fri May 22, 2020 1:18 am

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.

User avatar
lucasart
Posts: 3109
Joined: Mon May 31, 2010 11:29 am
Full name: lucasart
Contact:

Re: PGN standard

Post by lucasart » Fri May 22, 2020 1:25 am

bob wrote:
Fri May 22, 2020 1: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++.
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.

Post Reply