PDN standard

Discussion about development of draughts in the time of computer and Internet.
Piet Bouma
Posts: 3574
Joined: Sun Nov 02, 2003 13:05
Location: Harlingen

Post by Piet Bouma » Mon May 25, 2009 14:36

Wieger Wesselink wrote:I have added an overview of the most common tags to the PDN description on http://10x10.org/pdn. Most of them are borrowed from chess, and a few extra ones were added. Today I have extended the PDN checker http://10x10.org/pdn/test accordingly.

I consider this work on the PDN standard as finished now, unless I receive feedback.
Maybe a "Showposition tag"(SP in Damweb-applet and "index" I believe in the Dambolite-applet) must be considered.

For example:

Alexander Schwarzman - Allan Silva:

<APPLET CODEBASE = "http://www.damweb.nl/" CODE = "webdam.Viewer.class" NAME = "webdam" ARCHIVE ="Viewer.jar" WIDTH = 390 HEIGHT = 260 HSPACE = 0 VSPACE = 0 ALIGN = middle>
<br />
<PARAM NAME="options" VALUE="bgcolor: FDEDD5">
<br />
<PARAM NAME="notation" VALUE="3329192439331419443919235044131932282332372818232918123238270712413710143328010746410813423805103833172137321218413702083429202529201524403407124440101543380410484321264944142047420914272218273122121832271823SP373123213329264836312442221813224338423339264830350211173127162127161722262122282117283216113238110738420701253002354248">
</applet>

Jump in the game to the decisive position.

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

Post by Wieger Wesselink » Tue May 26, 2009 00:31

steenslag wrote:
Wieger Wesselink wrote:I have added an overview of the most common tags to the PDN description on http://10x10.org/pdn. Most of them are borrowed from chess, and a few extra ones were added. Today I have extended the PDN checker http://10x10.org/pdn/test accordingly.

I consider this work on the PDN standard as finished now, unless I receive feedback.
Regarding the "Setup Commands", would it be a good idea to replace the current proposal by a valid .pdn formatted string or a reference to one? PDN going recursive!
It's just an idea; it could be too hard to implement or a feature nobody will ever use. At this time (just thought of it) I think it would be cool.
Probably this can be implemented. But I have a hard time imagining what this feature can be used for.

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

Post by Wieger Wesselink » Tue May 26, 2009 00:42

FeikeBoomstra wrote:Wieger,

thanks for all the standardization effort. I remember vaguely that you had a parser written in python. I am interested in it, but I can't find the clue anymore.

kind regards,

Feike Boomstra
I have added the python source of the permissive parser to http://10x10.org/pdn/test. It uses tpg, that can be downloaded from http://christophe.delord.free.fr/tpg/. It's enough to have tpg.py in the current directory or reachable via the python path. If you want to experiment with the grammar I can also recommend the Grammatica parser http://grammatica.percederberg.net/. It has a command-line option to parse files with a given grammar.

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

Post by Wieger Wesselink » Tue May 26, 2009 00:56

Piet Bouma wrote:
Wieger Wesselink wrote:I have added an overview of the most common tags to the PDN description on http://10x10.org/pdn. Most of them are borrowed from chess, and a few extra ones were added. Today I have extended the PDN checker http://10x10.org/pdn/test accordingly.

I consider this work on the PDN standard as finished now, unless I receive feedback.
Maybe a "Showposition tag"(SP in Damweb-applet and "index" I believe in the Dambolite-applet) must be considered.

For example:

Alexander Schwarzman - Allan Silva:

<APPLET CODEBASE = "http://www.damweb.nl/" CODE = "webdam.Viewer.class" NAME = "webdam" ARCHIVE ="Viewer.jar" WIDTH = 390 HEIGHT = 260 HSPACE = 0 VSPACE = 0 ALIGN = middle>
<br />
<PARAM NAME="options" VALUE="bgcolor: FDEDD5">
<br />
<PARAM NAME="notation" VALUE="3329192439331419443919235044131932282332372818232918123238270712413710143328010746410813423805103833172137321218413702083429202529201524403407124440101543380410484321264944142047420914272218273122121832271823SP373123213329264836312442221813224338423339264830350211173127162127161722262122282117283216113238110738420701253002354248">
</applet>

Jump in the game to the decisive position.
At first sight it seems like a useful tag to me, although I'm not entirely sure that it should be part of the PDN definition. Perhaps it could also be named "MoveIndex" or "GameIndex". And since we have variations, it can be extended to a sequence of numbers separated by dots. For example, 3.1.2 could mean the position after two moves in the first variation of the third variation in the analysis.

ildjarn
Posts: 1537
Joined: Tue Aug 22, 2006 15:38
Real name: Joost de Heer

Post by ildjarn » Tue May 26, 2009 12:03

Piet Bouma wrote:Maybe a "Showposition tag"(SP in Damweb-applet and "index" I believe in the Dambolite-applet) must be considered.
IMO this shouldn't be in the PDN standard, this is a viewer option.

Should there be a StartMove tag for incomplete games? Or should this be part of the FEN setup string?
Lasst die Maschinen verhungern, Ihr Narren...
Lasst sie verrecken!
Schlagt sie tot -- die Maschinen!

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

Post by Piet Bouma » Tue May 26, 2009 14:16

ildjarn wrote:
Piet Bouma wrote:Maybe a "Showposition tag"(SP in Damweb-applet and "index" I believe in the Dambolite-applet) must be considered.
IMO this shouldn't be in the PDN standard, this is a viewer option.
IMO: If we do it the right way, a viewer has fully being controlled bij the .pdn file.
When this function is useful (and I think it is, damweb-applets are often used in this way), then you must make a tag for it.

An index-tag (also for the sub-variants), as Wieger suggests, might be the solution. (Indexes are used by Turbodambase when there is display on the internet and Wieger uses it also in his analysis-variants on www.10x10.org)

Otherwise, programmers have to make another tool to make use of this function of a viewer.
I think it would be also useful in the 64-games with predefined openings (the starting position of the game).

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

Post by Wieger Wesselink » Wed May 27, 2009 11:08

As it can not be me who decides what is in the PDN standard and what not, I have made a section called 'Additional tags' in http://10x10.org/pdn/ containing tags that are not in any standard, but could be useful. I added a few more tags, like WhiteURL, BlackURL and TournamentURL.

User avatar
steenslag
Posts: 1184
Joined: Sun Sep 21, 2003 10:09
Contact:

Post by steenslag » Thu May 28, 2009 09:58

Wieger Wesselink wrote:
steenslag wrote:
Wieger Wesselink wrote:I have added an overview of the most common tags to the PDN description on http://10x10.org/pdn. Most of them are borrowed from chess, and a few extra ones were added. Today I have extended the PDN checker http://10x10.org/pdn/test accordingly.

I consider this work on the PDN standard as finished now, unless I receive feedback.
Regarding the "Setup Commands", would it be a good idea to replace the current proposal by a valid .pdn formatted string or a reference to one? PDN going recursive!
It's just an idea; it could be too hard to implement or a feature nobody will ever use. At this time (just thought of it) I think it would be cool.
Probably this can be implemented. But I have a hard time imagining what this feature can be used for.
I'm not sure it's a good idea, but to clarify what I meant:
from http://www.10x10.dse.nl/pdn/#setup-commands
In game analysis it is common to make side steps to different positions, for example to a similar position that has occurred before. The setup command allows to incorporate these side steps as normal variations starting with a setup.
In such a sidestep it could be desirable to give the players and the tournament etc as well as the moves played or variations. All of which could be captured in a PDN.

User avatar
wellnesswrotter
Posts: 323
Joined: Mon May 21, 2007 15:10
Location: www.snukenkuzco.nl
Contact:

Post by wellnesswrotter » Mon Jun 15, 2009 20:32

De volgende PDN is een uitdaging voor een goede PDN viewer:

Code: Select all

[Event "Open NK Computers"]
[Site "Gorredijk"]
[Date "2008.12.14"]
[Round "8"]
[White "Cerberus"]
[Black "TDKing"]
[Result "0-2"]

01. 34-30 20-25 02. 32-28 25x34 03. 39x30 19-24 04. 30x19 14x32 05. 37x28 10-14 
06. 44-39 14-19 07. 39-34 18-23 08. 42-37 23x32 09. 37x28 5-10 10. 38-32 12-18 
11. 41-37 7-12 12. 43-38 15-20 13. 49-44 18-23 14. 35-30 12-18 15. 30-25 10-15 
16. 25x14 9x20 17. 34-29 23x34 18. 40x29 20-24 19. 29x20 15x24 20. 44-39 18-23 
21. 31-27 17-21 22. 37-31 21-26 23. 47-42 26x37 24. 42x31 11-17 25. 45-40 17-21 
26. 31-26 24-30 27. 26x17 19-24 28. 28x19 30-35 29. 19x30 35x44 30. 30-25 44-49 
31. 33-28 13-18 32. 39-33 49-35 33. 46-41 3-9 34. 41-37 8-13 35. 28-22 18-23 
36. 50-45 35-24 37. 45-40 23-29 38. 36-31 24-15 39. 33x24 15x45 40. 48-43 1-7 
41. 32-28 7-11 42. 38-33 45-1 43. 43-38 16-21 44. 27x7 1x18x27x49 45. 31-26 49-32
46. 37-31 32x5 47. 25-20 2-8 48. 31-27 8-12 49. 17x19 5x39 50. 20-15 6-11
51. 26-21 11-16 52. 21-17
Deze partij heeft de "long capture notation" op een gegeven moment nodig.

http://10x10.org/pdn
Additional restrictions

•In some cases the notation of a move can be ambiguous. For example in the position below the normal capture notation 48x36 does not specify which one of the lower black pieces has been captured.


In ambiguous cases like this, the long capture notation must be used. In this case the move can be either 48x30x13x36 or 48x25x9x36. In all other cases the normal notation must be used.
Image

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

Re: PDN standard

Post by Wieger Wesselink » Mon May 27, 2013 23:23

I have made some improvements to the gametype section of the PDN standard, with the help of Jake Cacher. See http://pdn.fmjd.org/gametype.html. The changes are:
  • Added game types Jamaican draughts and Unified pool checkers
  • Added some examples of the board layout of game types
  • Adapted the interpretation of the invert flag in the game type
  • Extended the notation flag of the game type, such that the Jamaican draughts notation is supported
After looking at the invert flag, it turned out that the description wasn't accurate, in particular for Italian draughts. I have changed it such that it is correct for the game types that I could find on the Internet.

The table of existing gametype tags has not been changed.

BertTuyt
Posts: 1592
Joined: Wed Sep 01, 2004 19:42

Re: PDN standard

Post by BertTuyt » Sun Feb 16, 2014 17:46

Im now parsing the Toernooibase Games.
So far I have found several games where my previous parser was not able to understand all.
Examples which I corrected, ambiguous moves, and captures with turning points included.

I'm now focusing on games with a FEN.
I always thought that a FEN in the beginning should start/end with a [FEN .... ], and a FEN in between can also be characterized with /FEN .... /

Some of the Toernooibase games however start with a "/FEN .../" in the header.
Is this allowed within the PDN 3.0 definition?
In this case I need to change my parser accordingly.

See below game.

Bert

Code: Select all

[Event "24e Zomercompetitie Friesland + FK  PFDB 2013"]
[Site ""]
[Section "Groep A"]
[White "Jongsma,J. (Jelle)"]
[Black "Jonker,S. (Sietse)"]
[Result "2-0"]
[GameType "20"]
[Round "4"]
[Date "2013.05.27"]
[WhiteTime "1:12"]
[BlackTime "0:53"]
[WhiteUrl "http://toernooibase.kndb.nl/Afbeeldingen/Spelers/249.jpg"]
[BlackUrl "http://toernooibase.kndb.nl/Afbeeldingen/Spelers/253.jpg"]
[DamboTopLine "24e Zomercompetitie Friesland + FK  PFDB 2013 Round 4"]
[DamboBottomLine "J. Jongsma - S. Jonker 2-0"]
/FEN "W:W25,27,28,30,32,33,35,36,37,38:B9,13,14,16,18,19,21,24,26,29"/

1. 28-23 19x39
2. 30x8 39-44
3. 37-31 26x28
4. 8-3 21x43
5. 25-20 14x25
6. 3x1 *

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

Re: PDN standard

Post by Ed Gilbert » Mon Feb 17, 2014 14:51

Some of the Toernooibase games however start with a "/FEN .../" in the header.
Is this allowed within the PDN 3.0 definition?
"/FEN .../" is not a header, it is an element of the game body.

Here are the relevant grammar productions copied from the standard:

Code: Select all

Game             : (GameHeader GameBody?) | GameBody
GameBody         : (GameMove | Variation | COMMENT | SETUP | NAG)+
There are no special requirements for the first element of a GameBody. A SETUP is allowed along with the other types. So it seems that a game that starts at a non-standard position can define the start position either in the header or the GameBody. It's probably preferable to define it in the header because the /FEN .../ notation is an extension defined in 3.0 and not compatible with older parsers.

-- Ed

BertTuyt
Posts: 1592
Joined: Wed Sep 01, 2004 19:42

Re: PDN standard

Post by BertTuyt » Mon Feb 17, 2014 18:12

There are no special requirements for the first element of a GameBody. A SETUP is allowed along with the other types. So it seems that a game that starts at a non-standard position can define the start position either in the header or the GameBody. It's probably preferable to define it in the header because the /FEN .../ notation is an extension defined in 3.0 and not compatible with older parsers.
Ed, does it mean that basically both are valid according to the PDN 3.0 rules, but [FEN ] is preferable for the initial Game position (so part of the GameHeader and not the GameBody).
If both are "allowed"" , I will (have to) change my parser accordingly...

Bert

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

Re: PDN standard

Post by Ed Gilbert » Mon Feb 17, 2014 18:47

Yes, both are allowed. If your parser can already parse /FEN .../ setups in the game body then I would think it would just work. In other words, you would have had to have some special exclusion code that says, "don't allow a /FEN .../ setup as the first element in a game body when there is a [FEN ""] header present".

-- Ed

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

Re: PDN standard

Post by Wieger Wesselink » Wed Apr 30, 2014 22:49

I have made a web page for experimenting with the GameType tag. It shows the initial position and the board numbering of many different game types. Thanks to Rein Halbersma and Jake Cacher several errors have been corrected, and a number of game types have been added.

http://pdn.fmjd.org/_downloads/gametype.html

Also I made some corrections to the table with predefined GameType tags, see http://pdn.fmjd.org/gametype.html and http://pdn.fmjd.org/changelog.html. Corrections and additions are welcome!

Post Reply