Discussion:
PBN DoubleDummyTricks tag
(too old to reply)
WeakNoTrump
2013-02-16 16:49:19 UTC
Permalink
I am the webmaster for a Bridgewebs site and need to handcraft a PBN
file to upload. I would like it to have the makeable contracts included
and understand that the "DoubleDummyTricks" tag is the one I need to use
for this. I have scoured the web but can't find any information about
how the content of this tag is formed. I have downloaded some existing
files and attemted to decipher the format of the tag contents, but so
far have had no success.

Can anyone please tell me how I should format this tag inside a PBN file.

Thanks.
Lorne
2013-02-16 18:04:16 UTC
Permalink
Post by WeakNoTrump
I am the webmaster for a Bridgewebs site and need to handcraft a PBN
file to upload. I would like it to have the makeable contracts included
and understand that the "DoubleDummyTricks" tag is the one I need to use
for this. I have scoured the web but can't find any information about
how the content of this tag is formed. I have downloaded some existing
files and attemted to decipher the format of the tag contents, but so
far have had no success.
Can anyone please tell me how I should format this tag inside a PBN file.
Thanks.
You should be able to find a document on the web which details the full
PBN standard. Section 5.7 is what you want which reads as follows:

5.7 OptimumResultTable
This table shows the optimum result of a deal in number of tricks, with
open cards (double dummy). For each direction, being the declarer, and
for each denomination the maximum number of tricks is given based on
optimum declarer play and optimum defence. A full table consists of 20
rows. The table has 3 predefined columns with names:
* Declarer direction of declarer: W, N, E, S
* Denomination S, H, D, C, NT
* Result number of tricks won by declarer: 0…13

When writing your code be aware that PBN file are text, hence many
people take liberties and you can't assume all files will meet the
published standard. Your code needs to check each line it reads from a
PBN file to make sure it contains what you expect and does something
sensible when it finds something that should not be there.
WeakNoTrump
2013-02-16 18:13:14 UTC
Permalink
Post by Lorne
You should be able to find a document on the web which details the full
5.7 OptimumResultTable
This table shows the optimum result of a deal in number of tricks, with
open cards (double dummy). For each direction, being the declarer, and
for each denomination the maximum number of tricks is given based on
optimum declarer play and optimum defence. A full table consists of 20
* Declarer direction of declarer: W, N, E, S
* Denomination S, H, D, C, NT
* Result number of tricks won by declarer: 0?13
When writing your code be aware that PBN file are text, hence many
people take liberties and you can't assume all files will meet the
published standard. Your code needs to check each line it reads from a
PBN file to make sure it contains what you expect and does something
sensible when it finds something that should not be there.
Thanks. I have the PBN 2.1 specification. I'll go and have another look
at that section.
WeakNoTrump
2013-02-17 14:04:05 UTC
Permalink
Post by WeakNoTrump
Post by Lorne
You should be able to find a document on the web which details the full
5.7 OptimumResultTable
This table shows the optimum result of a deal in number of tricks, with
open cards (double dummy). For each direction, being the declarer, and
for each denomination the maximum number of tricks is given based on
optimum declarer play and optimum defence. A full table consists of 20
* Declarer direction of declarer: W, N, E, S
* Denomination S, H, D, C, NT
* Result number of tricks won by declarer: 0?13
When writing your code be aware that PBN file are text, hence many
people take liberties and you can't assume all files will meet the
published standard. Your code needs to check each line it reads from a
PBN file to make sure it contains what you expect and does something
sensible when it finds something that should not be there.
Thanks. I have the PBN 2.1 specification. I'll go and have another look
at that section.
I've added the makeable tricks to my PBN file using that tag, but I've
also worked out how the "DoubleDummyTricks" tag is formatted. It's
string of 20 hexadecimal digits indicating how many tricks can be made.
The order is a bit quaint but is as follows:

Starting with North's makeable tricks in NT, S, H, D & C
Followed by East, South & West in the same order.
Lorne
2013-02-18 00:57:43 UTC
Permalink
Post by WeakNoTrump
Post by WeakNoTrump
Post by Lorne
You should be able to find a document on the web which details the full
5.7 OptimumResultTable
This table shows the optimum result of a deal in number of tricks, with
open cards (double dummy). For each direction, being the declarer, and
for each denomination the maximum number of tricks is given based on
optimum declarer play and optimum defence. A full table consists of 20
* Declarer direction of declarer: W, N, E, S
* Denomination S, H, D, C, NT
* Result number of tricks won by declarer: 0?13
When writing your code be aware that PBN file are text, hence many
people take liberties and you can't assume all files will meet the
published standard. Your code needs to check each line it reads from a
PBN file to make sure it contains what you expect and does something
sensible when it finds something that should not be there.
Thanks. I have the PBN 2.1 specification. I'll go and have another look
at that section.
I've added the makeable tricks to my PBN file using that tag, but I've
also worked out how the "DoubleDummyTricks" tag is formatted. It's
string of 20 hexadecimal digits indicating how many tricks can be made.
Starting with North's makeable tricks in NT, S, H, D & C
Followed by East, South & West in the same order.
Do not assume the order will be as you say. Firstly the order is not
specified in the official spec document, secondly even if it was some
people will create files with a different order. I would not even
assume there are 20 results if I were you, nor would I assume 'NT' for
no trumps as some might just use 'N'. Also the files I have seen use
normal numbers, not hexadecimal.

A typical entry might be like this:
[OptimumResultTable]
S C 10
S D 13
S H 9
S S 7
S NT 13
W C 3
W D 0
W H 3
W S 5
W NT 0
N C 10
N D 13
N H 9
N S 7
N NT 13
E C 3
E D 0
E H 3
E S 5
E NT 0
j***@gmail.com
2018-03-16 18:15:31 UTC
Permalink
Post by WeakNoTrump
I am the webmaster for a Bridgewebs site and need to handcraft a PBN
file to upload. I would like it to have the makeable contracts included
and understand that the "DoubleDummyTricks" tag is the one I need to use
for this. I have scoured the web but can't find any information about
how the content of this tag is formed. I have downloaded some existing
files and attemted to decipher the format of the tag contents, but so
far have had no success.
Can anyone please tell me how I should format this tag inside a PBN file.
Thanks.
I'm want to do the same.. Hand craft a PBN file.. Read your bit about hexadecimal string below. Not able to work out the hexadecimal process. Can you walk me through the process a little? Jim
Lorne
2018-03-17 01:11:56 UTC
Permalink
Post by j***@gmail.com
Post by WeakNoTrump
I am the webmaster for a Bridgewebs site and need to handcraft a PBN
file to upload. I would like it to have the makeable contracts included
and understand that the "DoubleDummyTricks" tag is the one I need to use
for this. I have scoured the web but can't find any information about
how the content of this tag is formed. I have downloaded some existing
files and attemted to decipher the format of the tag contents, but so
far have had no success.
Can anyone please tell me how I should format this tag inside a PBN file.
Thanks.
I'm want to do the same.. Hand craft a PBN file.. Read your bit about hexadecimal string below. Not able to work out the hexadecimal process. Can you walk me through the process a little? Jim
Do a google search fo PBNstandard-21a_wrd97.doc and you will be able to
download the full PBN spec.
Lorne
2018-03-17 01:20:32 UTC
Permalink
Post by j***@gmail.com
Post by WeakNoTrump
I am the webmaster for a Bridgewebs site and need to handcraft a PBN
file to upload. I would like it to have the makeable contracts included
and understand that the "DoubleDummyTricks" tag is the one I need to use
for this. I have scoured the web but can't find any information about
how the content of this tag is formed. I have downloaded some existing
files and attemted to decipher the format of the tag contents, but so
far have had no success.
Can anyone please tell me how I should format this tag inside a PBN file.
Thanks.
I'm want to do the same.. Hand craft a PBN file.. Read your bit about hexadecimal string below. Not able to work out the hexadecimal process. Can you walk me through the process a little? Jim
Here is a copy of a hand with that info - note it is the
[OptimumResultTable] tag that you want:

% PBN 2.1
% EXPORT
%
[Event "Created by Bridge Analyser"]
[Site ""]
[Date "2017. 6. 3"]
[Board "1"]
[West ""]
[North ""]
[East ""]
[South ""]
[Dealer "N"]
[Vulnerable "None"]
[Deal "N:97642.T542.Q3.A3 AQ5.J.KT764.J942 J83.KQ87.AJ2.KT6
KT.A963.985.Q875"]
[Scoring ""]
[Declarer "S"]
[Contract ""]
[Result ""]
[DealId "S Opening Bid = 1N. N custom constraint. Dlr Always South.
Always None Vul."]
[OptimumResultTable "Declarer;Denomination\2R;Result\2R"]
S C 5
S D 5
S H 8
S S 8
S NT 7
W C 8
W D 8
W H 5
W S 4
W NT 6
N C 5
N D 5
N H 8
N S 8
N NT 7
E C 8
E D 8
E H 5
E S 4
E NT 6
*

Loading...