PGN standard & null moves (Steven?)

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
hgm
Posts: 24435
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: PGN standard & null moves (Steven?)

Post by hgm » Sat Jul 30, 2011 7:44 am

Herb Goodwin wrote:It seems to me that with ChessBase and SCID already supporting this convention in PGN notation, the chess world already has a standard for the null move in PGN notation.
Indeed, I agree. I did not know about ChessBase, but the purpose of this post was exactly to make such an inventarization. So I will also make WinBoard always use "--" for null move when saving games, then.

Another compatibilty issue: someone sent me a PGN file saved from SCID, and I noticed that it contained non-compliant notations like =+, -=, ~ in stead of the coresponding (compliant) annotation glyphs. Is this also a de-facto extension of the standard? The official PGN specs mention ?, !? and such asallowed annotations for the input format, but mention nothing about =+ ...

stevenaaus
Posts: 604
Joined: Wed Oct 13, 2010 7:44 am
Location: Australia
Contact:

Re: PGN standard & null moves (Steven?)

Post by stevenaaus » Sat Jul 30, 2011 8:37 am

hgm wrote:.... So I will also make WinBoard always use "--" for null move when saving games, then.
Cheers
hgm wrote:Another compatibilty issue: someone sent me a PGN file saved from SCID, and I noticed that it contained non-compliant notations like =+, -=, ~ in stead of the coresponding (compliant) annotation glyphs. Is this also a de-facto extension of the standard? The official PGN specs mention ?, !? and such asallowed annotations for the input format, but mention nothing about =+ ...
Hmmm... Scid's export has an option to disable these string formatted nags. Something ike "Symbollic annotation style: '+= ?' or '$2 $14'", but it defaults to the first choice. Perhaps this default is incorrect ?

User avatar
hgm
Posts: 24435
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: PGN standard & null moves (Steven?)

Post by hgm » Sat Jul 30, 2011 9:02 am

Well, I am no PGN expert, but I looked in the PGN specs I found at Tim Mann's website, and it did not seem to mention symbols like =+ at all.

How things are displayed is one thing (I agree that displaying things like $12 is absolutely awful!), but when saving on file, I would think obeying the standard should have overwhelming priority. I consider the mere existence of options to break compatability as very damaging,even if they would not do it by default...

stevenaaus
Posts: 604
Joined: Wed Oct 13, 2010 7:44 am
Location: Australia
Contact:

Re: PGN standard & null moves (Steven?)

Post by stevenaaus » Sat Jul 30, 2011 9:14 am

hgm wrote:Well, I am no PGN expert, but I looked in the PGN specs I found at Tim Mann's website, and it did not seem to mention symbols like =+ at all.

How things are displayed is one thing (I agree that displaying things like $12 is absolutely awful!), but when saving on file, I would think obeying the standard should have overwhelming priority. I consider the mere existence of options to break compatability as very damaging,even if they would not do it by default...
Well, i'll change the default, and document the issue with a warning.

And it appears '0000' (four zeros) *is* the UCI standard for null move... but in PGN i may still use '--'.

User avatar
slobo
Posts: 2331
Joined: Mon Apr 09, 2007 3:36 pm

Re: PGN standard & null moves (Steven?)

Post by slobo » Sat Jul 30, 2011 10:58 am

Michel wrote:I would prefer "pass" for games where passing is legal and "null" for
games where it is illegal.

EDIT: Of course I am sure that there are variants where passing is sometimes legal but not always....
Very clever distinction. I support it.
"Well, I´m just a soul whose intentions are good,
Oh Lord, please don´t let me be misunderstood."

User avatar
slobo
Posts: 2331
Joined: Mon Apr 09, 2007 3:36 pm

Re: PGN standard & null moves (Steven?)

Post by slobo » Sat Jul 30, 2011 11:09 am

hgm wrote:Well, I am no PGN expert, but I looked in the PGN specs I found at Tim Mann's website, and it did not seem to mention symbols like =+ at all.

How things are displayed is one thing (I agree that displaying things like $12 is absolutely awful!), but when saving on file, I would think obeying the standard should have overwhelming priority. I consider the mere existence of options to break compatability as very damaging,even if they would not do it by default...
I ´d like to contribute with a general reflections about standards.

1. Standards should reflect our common interests or necessities in one point of time..
2. Standards are not eternal like commands "You should not kill".
3. So, we may change them if they do not serve our interests or our necessities anymore.
"Well, I´m just a soul whose intentions are good,
Oh Lord, please don´t let me be misunderstood."

User avatar
marcelk
Posts: 348
Joined: Fri Feb 26, 2010 11:21 pm
Contact:

Re: PGN standard & null moves (Steven?)

Post by marcelk » Sat Jul 30, 2011 8:15 pm

First of all, I feel that "null" is using the wrong jargon. It is more a term from the engineering domain than of the board game domain. "pass" has an intuitively clear meaning also in other games.
Michel wrote:I would prefer "pass" for games where passing is legal and "null" for
games where it is illegal.

EDIT: Of course I am sure that there are variants where passing is sometimes legal but not always....
Because of the latter I strongly prefer "pass" for both cases and leave the legality question out of the notation.

Michel
Posts: 2087
Joined: Sun Sep 28, 2008 11:50 pm

Re: PGN standard & null moves (Steven?)

Post by Michel » Sun Jul 31, 2011 2:59 am

Because of the latter I strongly prefer "pass" for both cases and leave the legality question out of the notation.
Dunno. It seems to me that if you allow a PGN to contain illegal moves
then this should be clearly indicated in some way. Hence my distinction
between "null" and "pass".

In reversi a pass move is sometimes legal and sometimes not
(it is legal if it is forced). Including a "pass" move in the PGN at places
where it is illegal would be quite confusing I think. So from my
point of view a reversi PGN could contain both pass and null moves.

I kind of like "null" for another reason. In an annotation a null move
can basically be read as "a legal but insignificant move". This is conceptually
different from a pass move, which would be illegal in regular chess.

User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 2:27 pm

Re: PGN standard & null moves (Steven?)

Post by Don » Sat Aug 06, 2011 10:00 pm

hgm wrote:The current PGN standard does not support null moves. While the latter can be very useful in variations, to indicate a threat. E.g.

1. e2 e4 2. Nf3 Nc6 (2... pass 3. Nxe5 Qe7!) 3. Bc4

So there is a lot of software that supports null moves, but for lack of a standard, there is a Babylonic confusion in the notations they use for it. Not writing them at all is not really an option, as the next move would be mistaken for a move of the wrong side, and SAN in general does not make that obvious (e.g. Ng5 could be possible for Knights of both sides). So I think it is pretty important to adopt an official standard for it, and add it to the authoritive document describing the PGN standard.

So my question is: who decides about the PGN standard, and how can we approach them?

As as small (and probably incomplete) overview of what is currently in use, I made the following:

SCID uses "--", but has the option to save it as a comment ("{--}"?). It also understands "Z0" on input.
According to SCID docs there is other software that uses "Z0".
WinBoard uses "pass", but also understands "null" and "@@@@" on input.
WB protocol uses "@@@@".
UCI uses "0000".

I don't like the "--" much, because of low visibility, and possible confusion with other (non-compliant) notations +=, -= etc. I don't like the "Z0" much because a leading capital suggests a piece name (some variants use a piece called Zebra), which makes parsing more difficult / less efficient, and because it is notvery intuitive, but I think it is better than "--".

Any comments / suggestions are welcome.
PGN was designed for recording legal games, so it doesn't make sense to make provision for moves that are illegal in the chess sense. Putting a null move in a PGN file implies one of the players played a "pass" move and the game continued from there - not a very sensible thing.

There is a kind of standard way seen in chess literature that is similar to pass, you will see it in problems and it's the token, "any" - but that is not a non-move, it's represents a wild card, or ANY legal move.

There is another notation that can be used and it's the ~ or tllda character which means "followed by" which implies the same side to move is going to play a certain way no matter regardless of what the opponent plays, but not necessarily on the next move - so that is pretty imprecise.

What are you looking to do with this? Do you have a specific application? Is it a way to document threats in comments?

The person to contact to make a provision for this would be Steven Edwards, who standardized PGN and may have even invented it.

If we were to gain such a token I would suggest the token "pass" as it's used in GO also and has intuitive meaning. But if you simply want to include it in comments you could just say, "the threat is" and then display the PV starting with the next move for the side who played the threat. Like this:

7. e5 (the threat is 8. exf6 gxf6 ...)

Of course the null move has a very precise meaning so I can understand why it might be appealing.

User avatar
hgm
Posts: 24435
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: PGN standard & null moves (Steven?)

Post by hgm » Sun Aug 07, 2011 6:18 am

People use null move in analysis (for the same reason, I guess, as engines use them in search), and want to be able to store their analysis. Like engine PVs do not contain null moves, main lines of games will not contain null moves, but their variations might.

I initially settled on "pass" as well, but it seems the de-facto standard is "--".

Post Reply