PDN 3.0 Standard Review Request

Discussion about development of draughts in the time of computer and Internet.
Wieger Wesselink
Posts: 1157
Joined: Sat Jun 28, 2003 13:22
Location: Eindhoven, The Netherlands
Contact:

Re: PDN 3.0 Standard Review Request

Post by Wieger Wesselink »

TAILLE wrote:I agree we need to specify whether the game use or not the Plus draw rule. Does that mean we have to define another game type? The point is that the result 1-1 (or 1/2-1/2) does not give any hint on the use of this rule.
Perhaps we should define a tag that describes the point system, and a corresponding table that describes the possible results. This table could look like:

International: 1-1, 2-0, 0-2
Checkers: 1/2-1/2, 1-0, 0-1
Plus draw: 1-1, 2-0, 0-2, 1+-1-, 1--1+
Goes/Hiltex: 1-1, 2-0, 0-2, 1.01-0.99, 0,99-1.01, 1.02-0.98, 0.98-1.02, ...
Delfts: 1-1, , 2-0, 0-2, 1 1/2 - 1/2, 1/2 - 1 1/2
Wieger Wesselink
Posts: 1157
Joined: Sat Jun 28, 2003 13:22
Location: Eindhoven, The Netherlands
Contact:

Re: PDN 3.0 Standard Review Request

Post by Wieger Wesselink »

ildjarn wrote:- Why are leading zeroes explicitly disallowed in moves (01-07 is an illegal syntax) but allowed in FEN?
- How does one indicate there are no pieces of a certain colour? Should this be allowed? (It can be useful in diagrams to show a certain structure, but for games it's probably a bit useless)
- Last game doesn't need a game ending tag (*). Is this intended? It'd make adding games to a PDN file later slightly easier (you don't have to check if the last game is properly closed before pasting the new game)
Hi ildjarn, thanks for your comments.

- Leading zeroes should be explicitly disallowed in FEN tags to make it consistent with moves. I will add this as a restriction.

- The grammar for FEN allows to have only pieces of one colour. I think this should be allowed.

- The optional game ending tag after the last game is indeed intended. I think this is a matter of taste. It can be changed if people prefer to make it obligatory.
Rein Halbersma
Posts: 1722
Joined: Wed Apr 14, 2004 16:04
Contact:

Re: PDN 3.0 Standard Review Request

Post by Rein Halbersma »

Wieger Wesselink wrote:
Rein Halbersma wrote:
AFAIK, all PDN files in practice have an empty line in between games. Why not define a sequence of 2 or more "\n" tokens as a game separator? This should still allow text editors to use hard line wrapping (i.e. a single "\n") between moves. This way, one could simply ignore the *-separator or the end-of-game result altogether, so it would be backwards compatible as well. Of course, it would require to redefine the skip-all-whitespace grammar rule.

Rein
A small problem with this approach is that often there is an empty line between the tags and the moves of a game. It is then no longer clear when two "\n" tokens should be interpreted as a game separator.
A problem is indeed that a single game with a "\n\n" sequence in between the Tag and Move section, could be seen as two games: one with only a Tag section, and the other only a Move section.
Wieger Wesselink
Posts: 1157
Joined: Sat Jun 28, 2003 13:22
Location: Eindhoven, The Netherlands
Contact:

Re: PDN 3.0 Standard Review Request

Post by Wieger Wesselink »

Wieger Wesselink wrote:
sancoder wrote:A word about FEN notation.
In russian checkers fields are named as follows:
a1, c1, e1, g1, b2, d2, ...

I have tried to specify the field by such a name, but PDN checker rejects this.
I think, there is a problem here. Moves are specified as c3-d4 f6-g5, and this is ok.

Another problem is that PDN checker gives me warnings on this example.

Code: Select all

[White "WhiteTest"]
[Black "BlackTest"]
[Event "EventTest"]
[Result "*"]
[GameType "26"]
[FEN "W:W29,30,31,32,25,26,27,28,21,22,23,24:B9,10,11,12,5,6,7,8,1,2,3,4"]
1.c3-d4 f6-g5 2.d4-c5 b6:d4 3.e3:c5 d6:b4 4.a3:c5 g5-f4
Why?

Also, I vote for UTF-8 as the main encoding for files.
The problem I see is about compatibility. If the old program cannot parse the PDN file with a BOM, it will be not desired.
The alternative way is to base64-encode the name as in the e-mail programs.
Hi sancoder, thanks for noticing this! The PDN checker seems to have an error in the check for spaces in alpha-numeric moves. I will fix this next week (right now I don't have the opportunity to look at it). The grammar itself seems to be correct.
Hi, I have fixed the problem in the PDN Checker. It turned out that in alpha-numeric moves the separator was optional in some of the grammars (including the one used by the PDN checker). This caused an ambiguity, since c3-d4 f6-g5 could be parsed as one move. The explanation now reads: "In alpha-numeric moves the separator may not be omitted, so a3b4 is not allowed". The 'official' PDN grammars in the grammar section have been unchanged, since they already enforced this behavior.

I have also added a test set with PDN games to the implementation section.
Rein Halbersma
Posts: 1722
Joined: Wed Apr 14, 2004 16:04
Contact:

Re: PDN 3.0 Standard Review Request

Post by Rein Halbersma »

Wieger Wesselink wrote:
Hi, I have fixed the problem in the PDN Checker. It turned out that in alpha-numeric moves the separator was optional in some of the grammars (including the one used by the PDN checker). This caused an ambiguity, since c3-d4 f6-g5 could be parsed as one move. The explanation now reads: "In alpha-numeric moves the separator may not be omitted, so a3b4 is not allowed". The 'official' PDN grammars in the grammar section have been unchanged, since they already enforced this behavior.

I have also added a test set with PDN games to the implementation section.
Hi Wieger,

Where does the ambiguity come from if you have optional move separators? Won't pairs of move_squares be parsed into a move? Wouldn't an obligatory capture separator for capture disambiguation be sufficient? So a move is a pair of squares, optionally with a single move or capture separator, or it is a sequence of at least 3 squares with at least 2 capture separators.

Or does such freedom not get handled easily by LL(1) parsers?

Rein
Wieger Wesselink
Posts: 1157
Joined: Sat Jun 28, 2003 13:22
Location: Eindhoven, The Netherlands
Contact:

Re: PDN 3.0 Standard Review Request

Post by Wieger Wesselink »

Rein Halbersma wrote:
Wieger Wesselink wrote:
Hi, I have fixed the problem in the PDN Checker. It turned out that in alpha-numeric moves the separator was optional in some of the grammars (including the one used by the PDN checker). This caused an ambiguity, since c3-d4 f6-g5 could be parsed as one move. The explanation now reads: "In alpha-numeric moves the separator may not be omitted, so a3b4 is not allowed". The 'official' PDN grammars in the grammar section have been unchanged, since they already enforced this behavior.

I have also added a test set with PDN games to the implementation section.
Hi Wieger,

Where does the ambiguity come from if you have optional move separators? Won't pairs of move_squares be parsed into a move? Wouldn't an obligatory capture separator for capture disambiguation be sufficient? So a move is a pair of squares, optionally with a single move or capture separator, or it is a sequence of at least 3 squares with at least 2 capture separators.

Or does such freedom not get handled easily by LL(1) parsers?

Rein
Hi Rein,

Your suggestion seems to work for both the Grammatica parser and the TPG parser. I replaced the move token with

Code: Select all

token ALPHANUMERICMOVE '([a-h][1-8](\s*[x:]\s*[a-h][1-8])+)|([a-h][1-8]\s*[-]?\s*[a-h][1-8]);' 
So if desired alpha-numeric moves can have an optional move separator.

Wieger
Ed Gilbert
Posts: 860
Joined: Sat Apr 28, 2007 14:53
Real name: Ed Gilbert
Location: Morristown, NJ USA
Contact:

Re: PDN 3.0 Standard Review Request

Post by Ed Gilbert »

Ed Gilbert wrote:I think a forgiving reader should also accept any subset of these squares that unambiguously describes the move.
Ignore this comment. I must have been thinking about the GUI, which should permit you to click on the minimum number of squares to describe the move. For PDN, I think that when some intermediate squares are needed to unambiguously describe a capture, then a "lands on" square should be required in the move notation for each piece that is jumped.

-- Ed
TAILLE
Posts: 968
Joined: Thu Apr 26, 2007 18:51
Location: FRANCE

Re: PDN 3.0 Standard Review Request

Post by TAILLE »

Ed Gilbert wrote:
Ed Gilbert wrote:I think a forgiving reader should also accept any subset of these squares that unambiguously describes the move.
Ignore this comment. I must have been thinking about the GUI, which should permit you to click on the minimum number of squares to describe the move. For PDN, I think that when some intermediate squares are needed to unambiguously describe a capture, then a "lands on" square should be required in the move notation for each piece that is jumped.

-- Ed
Is it a good understanding to say:
1) For unambiguous moves both the short notation and the long notations are correct
2) For ambiguous moves only the long notations are correct

As an example, beginning a game, is the following notation considered correct:
1.32-28 18-23 2.31-27?? 23x32x21
Gérard
Ed Gilbert
Posts: 860
Joined: Sat Apr 28, 2007 14:53
Real name: Ed Gilbert
Location: Morristown, NJ USA
Contact:

Re: PDN 3.0 Standard Review Request

Post by Ed Gilbert »

TAILLE wrote:Is it a good understanding to say:
1) For unambiguous moves both the short notation and the long notations are correct
2) For ambiguous moves only the long notations are correct
The 3.0 description says that only the short notation should be written for unambiguous moves. I agree with that. For reading, I think either short or long notation should be accepted.

-- Ed
TAILLE
Posts: 968
Joined: Thu Apr 26, 2007 18:51
Location: FRANCE

Re: PDN 3.0 Standard Review Request

Post by TAILLE »

Ed Gilbert wrote:
TAILLE wrote:Is it a good understanding to say:
1) For unambiguous moves both the short notation and the long notations are correct
2) For ambiguous moves only the long notations are correct
The 3.0 description says that only the short notation should be written for unambiguous moves. I agree with that. For reading, I think either short or long notation should be accepted.

-- Ed
Yes Ed.

My view is that the short notation is a loss of information comparing to a long notation. If you wish that a PDN file could also be read easily by a human then you have to keep the information related to (very) difficult captures
Takes for example the following position
Image
white to move

The notation 1.3x38 is certainly correct but the long notation is, for a human, definitely far better isn't? I presented this position to a GMI and he took a quater of an hour to discover the unique legal move! In such case the long notation is really needed though there are no ambiguities.
Gérard
Rein Halbersma
Posts: 1722
Joined: Wed Apr 14, 2004 16:04
Contact:

Re: PDN 3.0 Standard Review Request

Post by Rein Halbersma »

Dear draughts programmers,

A happy 2012 to all of you!

This is a reminder that the review period for Wieger Wesselink's PDN 3.0 draft standard will end on January 31st, which is in 4 weeks from tomorrow. After the initial posting of the review request, there was a good number of questions and discussions. According to my bookkeeping, Wieger has addressed every question raised in this forum. However, there are still some open points (see summary below).

Changes/additions

Code: Select all

*) When writing PDN, leading zeroes should be disallowed in FEN tags. This is to make
it consistent with move notation.

*) In alpha-numeric moves the separator may not be omitted, so a3b4 is not allowed.
Questions

Code: Select all

*) How should a 'plus draw' be recorded in PDN?

*) Should there be a table of valid results for every game type? I.e. 1-1, 0-2, 2-0
for international draughts, 1/2-1/2, 0-1, 1-0 for English draughts, etc.

*) Several tournaments used experimental results. For example we have 1.01 - 0.99 in
Goes, we have 1 1/2 - 1/2 in the 'Delft' system, there have been tournaments with 3-0
instead of 2-0, the Sport Accord Mind Games used 12-0, etc. Should the PDN standard
deal with those results? If so, how?

*) Should we always use "" to denote an unknown value of a PDN tag? Currently there
are some exceptions defined in the standard where a "?" should be used instead.

*) Should the PDN standard prescribe a character set? For example UTF-8?

*) Should the long notation be accepted even for unambiguous moves? For example
33x24x25 instead of 33x25?

*) Should the move separator in alpha-numeric moves be optional (for example a3b4)?
It turns out this can be achieved even in LL parsers, at the cost of additional
complexity of the grammar.
I would invite all the posters from this thread -as well as other interested and knowledgeable readers- to submit their reviews and votes in the coming 4 weeks. As a reminder, I re-post the review instructions from the original request below, but if you feel there is little to write in your review, a simple vote of ACCEPT or REJECT is also adequate.
Reviews may answer the following questions:

* What is your evaluation of the documentation?
* What sections in the PDN 3.0 draft need to be improved? Please be as specific as possible.
* Are there any provisions in the grammar that prevent implementation in a popular parser generator (Bison/Flex, Boost.Spirit, ANTLR)?
* Are there any legacy PDN files that are not properly parsed by the proposed grammar specification?
* Did you try to use the grammar? With what compiler/parser generator/platform? Did you have any problems?
* How much effort did you put into your evaluation? A glance? A quick reading? In-depth study?

Of course, 'informal reviews' and discussion are also welcome.

And finally, every review should answer this question:

* Do you think the PDN 3.0 draft standard should become an official FMJD standard? Be sure to say this explicitly so that your other comments don't obscure your overall opinion. A vote to accept the standard may be conditional.
Reviews and votes can be submitted on this thread viewtopic.php?f=53&t=3448

On behalf of World Draughts Federation FMJD,

Wieger Wesselink – pdn 3.0 Draft Submitter
Rein Halbersma – Review Manager
Marcel Kosters – Review Wizard
Frank Teer – FMJD Secretary General
Ed Gilbert
Posts: 860
Joined: Sat Apr 28, 2007 14:53
Real name: Ed Gilbert
Location: Morristown, NJ USA
Contact:

Re: PDN 3.0 Standard Review Request

Post by Ed Gilbert »

*) How should a 'plus draw' be recorded in PDN?

*) Should there be a table of valid results for every game type? I.e. 1-1, 0-2, 2-0
for international draughts, 1/2-1/2, 0-1, 1-0 for English draughts, etc.

*) Several tournaments used experimental results. For example we have 1.01 - 0.99 in
Goes, we have 1 1/2 - 1/2 in the 'Delft' system, there have been tournaments with 3-0
instead of 2-0, the Sport Accord Mind Games used 12-0, etc. Should the PDN standard
deal with those results? If so, how?
After reading the discussion about result tags, I think the value should be treated as cargo. In other words, accept any value on reading, and echo it back on writing. Do not try to impose any specific result values. The standard can note the common result values used in 8x8 and 10x10 draughts. Now that result tags have been removed as game terminators, their values have no affect on PDN parsing, except that parsers will still have to handle the most common values as terminators when parsing legacy PDN.
*) Should we always use "" to denote an unknown value of a PDN tag? Currently there
are some exceptions defined in the standard where a "?" should be used instead.
The section on PDN tags seems to have some conflicting statements. In one sentence, "... a tag is omitted if it has no value". In another, "To denote that a tag has an unknown value, in most cases a "?" value can be used." I think the difference between an unknown value and no value is too subtle. This section should be more specific.

Also, what about mandatory tags? If a mandatory tag is unknown, does it have to be included because it is mandatory, or can it be omitted because it is unknown? What is the usefullness of writing a mandatory tag with an unknown value? In my case with kingsrow I write a few tags as place holders, even if unknown values, perhaps making it slightly easier to add values later using a text editor. I question whether this is important enough to make 7 tags mandatory even when none of them have known values.


*) Should the PDN standard prescribe a character set? For example UTF-8?
My feeling is that character sets are beyond the scope of the standard. But I don't know much about this subject.
*) Should the long notation be accepted even for unambiguous moves? For example
33x24x25 instead of 33x25?
I think the question here is really "should the long notation always be used for writing PDN"? For reading, either form should be accepted when unambiguous. My feeling is that the long form should only be written when it is necessary because the short form would be ambiguous.
*) Should the move separator in alpha-numeric moves be optional (for example a3b4)?
I don't have any experience using this notation, so no preference.

Regarding the 3.0 standard, and primarily the things that are new:
- I haven't implemented embedded commands. My parser will treat them as comments.
- I have implemented setup commands within game moves. This seems like a useful addition and did not cause me any parsing difficulties.
- I think removing result codes as terminators is a good change.
- I am against extending FEN notation with ranges as this seems to offer very little benefit weighed against the problems it creates with existing programs.

My own parser is ad hoc, not using an automated parser generator, so I cannot comment or review with respect to parser generators. Also, the parser in kingsrow is designed to easily read PDN into the program, but kingsrow is not a full featured PDN database manager, so some features that are needed for writing complete PDN are not implemented. I expect that full featured games database programs like TurboDambase or Aurora are more affected by the changes in 3.0 than I am, and it would be nice to get feedback from their developers.

-- Ed
Piet Bouma
Posts: 3574
Joined: Sun Nov 02, 2003 13:05
Location: Harlingen

Re: PDN 3.0 Standard Review Request

Post by Piet Bouma »

With Wieger Wesselink I have had some e-mail discussion about EBS 2.0, PDN and the dambolite-applet.
Especially about the “Lehmann-Georgiev" tie break.
I think that we must consider the “Lehmann-Georgiev" tie break as one game/match because the timelimit is meant for more games (and it lookes really strange if at a ‘new’game for example White Time is six seconds and Black Time is thirty seconds).
There is already an embedded Set up command:
(1.31-26 17-21 /FEN "B:B1-16,18-21:W26,28,33-50"/ { White forgot to make a capture and played 32-28 instead }
which can be used for the start of a new game in a “Lehmann-Georgiev" tie break.

I suggested that we also make an embedded command for the players (because at a next game in a “Lehmann-Georgiev" tie break colours are changed).
That should be something like this:

/White “Alexander Georgiev”/
/Black “Guntis Valneris”/

together with the FEN command you then can use this for a following game in such a tie-break.
(And also I think that this would be useful at the electronic boards – EBS 3.0 (?) – when a name is not spelled correctly or a wrong name at first is inserted at the programmed game….).

New generation applet viewers (dambolite and Oerterp?) should be able to handle this in mine opinion. Together with the display of the time at every move (dambolite has already this feature) I think it is really interesting to replay a complete Lehmann-Georgiev" tie break from PDN 3.0 in stead of replaying for example ten separate games.

Wieger is not fond of the embedded commands of players in PDN 3.0, but what is your opinion?
https:toernooibase.kndb.nl More than 457.000 games on applet, more than 1.300.000 results, more than 23.000 games broadcasted (semi-)live, more than 13.600 inserted tournaments!
Rein Halbersma
Posts: 1722
Joined: Wed Apr 14, 2004 16:04
Contact:

Re: PDN 3.0 Standard Review Request

Post by Rein Halbersma »

Piet Bouma wrote:With Wieger Wesselink I have had some e-mail discussion about EBS 2.0, PDN and the dambolite-applet.
Especially about the “Lehmann-Georgiev" tie break.
I think that we must consider the “Lehmann-Georgiev" tie break as one game/match because the timelimit is meant for more games (and it lookes really strange if at a ‘new’game for example White Time is six seconds and Black Time is thirty seconds).
There is already an embedded Set up command:
(1.31-26 17-21 /FEN "B:B1-16,18-21:W26,28,33-50"/ { White forgot to make a capture and played 32-28 instead }
which can be used for the start of a new game in a “Lehmann-Georgiev" tie break.

I suggested that we also make an embedded command for the players (because at a next game in a “Lehmann-Georgiev" tie break colours are changed).
That should be something like this:

/White “Alexander Georgiev”/
/Black “Guntis Valneris”/

together with the FEN command you then can use this for a following game in such a tie-break.
(And also I think that this would be useful at the electronic boards – EBS 3.0 (?) – when a name is not spelled correctly or a wrong name at first is inserted at the programmed game….).

New generation applet viewers (dambolite and Oerterp?) should be able to handle this in mine opinion. Together with the display of the time at every move (dambolite has already this feature) I think it is really interesting to replay a complete Lehmann-Georgiev" tie break from PDN 3.0 in stead of replaying for example ten separate games.

Wieger is not fond of the embedded commands of players in PDN 3.0, but what is your opinion?
Hi Piet,

I think the Georgiev-style tie-breaks should be treated as separate games with asymmetric time controls. This is much easier to parse and does not require changes to the grammar. Asymmetric time controls may look strange, but remember that in chess they also have the asymmetric blitz tie-break with 6 minutes for white and 5 minutes for black, with a draw counting as a black win. And also in handicap games or clock simultan matches you also have weird timings.

Rein
Piet Bouma
Posts: 3574
Joined: Sun Nov 02, 2003 13:05
Location: Harlingen

Re: PDN 3.0 Standard Review Request

Post by Piet Bouma »

Rein Halbersma wrote:
Hi Piet,

I think the Georgiev-style tie-breaks should be treated as separate games with asymmetric time controls. This is much easier to parse and does not require changes to the grammar. Asymmetric time controls may look strange, but remember that in chess they also have the asymmetric blitz tie-break with 6 minutes for white and 5 minutes for black, with a draw counting as a black win. And also in handicap games or clock simultan matches you also have weird timings.

Rein
You have not convinced me yet Rein.
The chess tie-break is still one game with a result and also the other examples are one game (at a clock simultane different persons).

The Georgiev-tiebreak is unique. The result is from more games, where tactics with your usage of the time in the different games is really important.
I would like to see a Georgiev tiebreak as one game (really subjective I know).
And in practice (with efficient usage of Electronic boards and EBS, although that is way beyond this topic) and display of the Georgiev-tiebreak in applets it is (in mine opinion) to prefer it to see it as one game then as several "loosy" games.
But I know: practice is different from a scientific approach (sorry for my bad English). :D

PIet.
https:toernooibase.kndb.nl More than 457.000 games on applet, more than 1.300.000 results, more than 23.000 games broadcasted (semi-)live, more than 13.600 inserted tournaments!
Post Reply