You are on page 1of 8

Article 7A12 (8-15-05) Richard’s Bridge Notation by Richard Pavlicek

I
t is desirable to have a standard data format for The above change also simplifies the entire RBN
recording, archiving and exchanging bridge deals. structure. The first 10 labels (TDLESFKNBH) repeat
This should be flexible, simple and compact. A automatically if unstated, and the last six (ACPRIM)
variety of formats have been proposed, but in my view never repeat. There is no longer the pound-sign (#)
they don’t pass the test. option to confuse the issue.
Probably the most notable attempt is PBN (Portable This version also adds a new scoring abbreviation:
Bridge Notation) which includes some good ideas but X = IMP Pairs (think “cross IMPs” to associate the X).
is hopelessly bloated. For example, the syntax to state Many pair events now use IMP scoring, so it deserves
the vulnerability is: a separate indicator. This also reduces the burden on
[Vulnerable “Both”] I = IMPs, which now refers only to team events.
Really? Do I have to write the word “Vulnerable”
every time? And why are the confusing brackets and
quotes needed? If I had a penny for every megabyte of RBN Labels and Structure
data wasted, I’d be richer than Bill Gates in a week. The basic structure of an RBN file is that each line
Another popular format is LIN (Bridgebase) which begins with a one-character label, a space (for read-
is excellent for display purposes (e.g., segments of a ability), then the data to the end of the line. A blank line
bridge match) but poor for archiving because of its (double CRLF) marks the end of each deal. There are
severely limited file size (16 boards typically). Single 16 basic labels:
matches must be split into multiple files, which is
awkward and inconvenient. T Title and Author
D Date and Time
RBN format conveniently stores any bridge match L Location
(or multiple matches) in a single file. Further, my RBN E Event or Main Heading
utilities will verify all data (noting any errors) and can S Session, Stage or Subheading
easily convert to other formats (PBN, LIN, plus many F Form of Scoring
others) including options to filter data, correct certain K Team Names and Carryovers
errors and supply missing data on-the-fly. Output can N Names of Players and Room or Table
also be split into multiple files, e.g., to create separate B Board Number
H Hands (cards held by each player)
LIN files for viewing segments of a match.
A Auction (dealer, vul and call sequence)
RBN format is well-organized, based on many years C Contract and Declarer
of experience in handling bridge data. It is compact and P Play (opening leader and play sequence)
easy to parse by software, as well as intuitively coded R Result (tricks won) and Score
to be familiar to any bridge player. RBN provides an I Instant Awards
ideal format to archive deals and maintain bridge data- M Makes at Double-Dummy
bases. Try it! You’ll like it. Besides the above labels, any single digit (1-9) may
be used to label an explanatory note. This pertains to
What’s New? the A (auction) label unless the P (play) label appears
This document describes RBN version 2.2, which is first, then it pertains to the play. For example:
just a slight change from versions 2.0 and 2.1, recently 1 forcing one round
released. The only difference is the removal of the 2 artificial, spades + diamonds
“N#” syntax. With the K label (team names) added in
Version 2.1, it is unnecessary to state the alternating In addition to labeled fields, free text may be entered
names pattern in team matches (which comprise about at any place using this structure:
90 percent of archived bridge deals). Anytime the K {Text paragraph}
label exists (not null), it is assumed that the N label
(player names) repeats in alternating fashion. If the K Each text paragraph must begin on a new line and
label is null, the N label repeats consecutively. Simple start with a left curly brace. The paragraph continues
and logical.* (using multiple lines if desired) until terminated by a
*My RBN tools will still recognize the N# syntax in old files, but output files
right curly brace at the end of line, or the end of a deal
will dispense with it. (double CRLF).
To illustrate the RBN format, consider the following Database Format
article that I wrote in 1993:
Below is the same article in RBN format:
Florida Belles Are Ringers {Two Florida ladies put together a tremendous score
-- 78 percent -- in the continent-wide International
Two Florida ladies put together a tremendous score Fund Game on May 12. Helen Shanbrom and Julia
— 78 percent — in the continent-wide International Carswell played at the Palm Beach Bridge Studio, a
popular club owned and operated by Daniel Cohen.}
Fund Game on May 12. Helen Shanbrom and Julia {Winning is nothing new to Shanbrom, arguably the
Carswell played at the Palm Beach Bridge Studio, a most successful club player of all time. Her partner
has not been playing bridge that long; but she learns
popular club owned and operated by Daniel Cohen. fast and has become a sound, reliable player.
Winning is nothing new to Shanbrom, arguably the most suc- Carswell has posted a number of wins already.}
{The diagrammed deal shows the ladies in action,
cessful club player of all time. Her partner has not been playing stampeding their opponents to the five level.
bridge that long; but she learns fast and has become a sound, Shanbrom, West, opened routinely with 1 s and
reliable player. Carswell has posted a number of wins already. Carswell, East, chose a single raise because her hand
contained doubtful values -- good judgment in my
The diagrammed deal shows the ladies in action, stampeding opinion. (North’s decision to overcall and South’s
their opponents to the five level. Shanbrom, West, opened rou- 4 d bid are not clearly understood, perhaps for the
tinely with 1 ♠ and Carswell, East, chose a single raise because best.)}
T Florida Belles Are Ringers:Richard Pavlicek
her hand contained doubtful values — good judgment in my
opinion. (North’s decision to overcall and South’s 4 ♦ bid are not
D 19930512
L West Palm Beach FL:Palm Beach Bridge Studio
clearly understood, perhaps for the best.) E ACBL International Fund Game
S
F M
5 ♥ x by North ♠J42 None Vul K
♥AJ7632 N :Helen Shanbrom+Julia Carswell
B 8
♦J H W:A8765.QT.K9.AT87:J42.AJ7632.J.632:QT3.85.Q86.KQJ54:
♣632 A WZ:1S2H2S4D:4SPP5H:XA
C 5HX:N
♠A8765 ♠ Q 10 3 P E:CK972:CQ!H483:DA9J6:D2KH28:SJ?QKA:CA
♥ Q 10 N ♥85 R 9-300:0
{Shanbrom’s push to 4 s is best explained as “It was
♦K 9 W
S
E
♦Q 8 6 my turn,” but this is the kind of aggressive tactic
♣ A 10 8 7 ♣KQJ54 that a clever player senses to be right at the table.
Sure enough, South took the bait and pushed to 5 h
♠K9 (actually, North is more the culprit here for the
frivolous overcall). Opportunity needs knock only
♥K94 once for Shanbrom, and she wielded the ax.}
♦ A 10 7 5 4 3 2 {Watch the defense! Carswell led the c K and Shanbrom
followed with the seven -- a wisely chosen card to
Lead: ♣ K ♣9 de-emphasize the desirability of a spade switch. (The
partnership, as do most defenders, indicate suit
preference when the dummy has a singleton in the suit
led.) Shanbrom figured that her partner would
West North East South
4♦
routinely lead a spade if she held Q-J, but in the
1♠ 2♥ 2♠ actual layout a spade shift would be costly.}
4♠ Pass Pass 5♥ {How many East defenders do you think would come
through? This one did! Carswell found the killing
Dbl All Pass play of _another_club_, and declarer actually went
down two when he misplayed spades later. If Carswell
Shanbrom’s push to 4 ♠ is best explained as “It was my turn,”
leads _any_other_suit_ at trick two, declarer can
make the contract by establishing the diamonds.}
but this is the kind of aggressive tactic that a clever player senses
to be right at the table. Sure enough, South took the bait and pushed
to 5 ♥ (actually, North is more the culprit here for the frivolous Note how the actual placement of free text emulates
overcall). Opportunity needs knock only once for Shanbrom, and the text flow around the diagrams; thus the exact article
she wielded the ax. could be reconstructed from the data. Text paragraphs
Watch the defense! Carswell led the ♣ K and Shanbrom fol- may contain any characters except curly braces and a
lowed with the seven — a wisely chosen card to de-emphasize the double CRLF (terminates deal). Paragraphs must be
desirability of a spade switch. (The partnership, as do most de- terminated by a right curly brace at the end of a line.*
fenders, indicate suit preference when the dummy has a singleton
in the suit led.) Shanbrom figured that her partner would routinely
*This was optional in the past if not followed by a label. My utilities still
lead a spade if she held Q-J, but in the actual layout a spade shift interpret the relaxed practice; but paragraphs are always terminated in output files.
would be costly.
How many East defenders do you think would come through? Aside from the text, note how each data element is
This one did! Carswell found the killing play of another club, and
declarer actually went down two when he misplayed spades later. contained on a single line, prefixed by the appropriate
If Carswell leads any other suit at trick two, declarer can make the label identifier. Labels S and K are not used, so they are
contract by establishing the diamonds. indicated as null by the label alone.
Detailed Explanation of Labels Recommended style is to use standard two-character
The 16 basic labels (TDLESFKNBHACPRIM) are codes for states, provinces and countries (as shown).
described below. While each pertains to different data, While flawed (e.g., IL = Illinois or Israel), the chance
all have the common syntax that a colon (:) is used as of ambiguity is too remote for concern.
a separator. The maximum length (including the label
and space after) is shown for each label, as well as a list E = Event or Main Heading
of valid characters. Max len: 128 Valid char: (all)

The name of the event, or a main heading (such as a


T = Title and Author
catalog of lesson deals). This can be a single string, or
Max len: 128 Valid char: (all)
two strings separated by a colon (:). If two strings, the
The title of an article about the deal and the author’s more general one should be given first. Examples:
name, separated by a colon (:). Examples: E 1999 Grand National Teams
T Greed Costs Contract:Richard Pavlicek E Southeastern Regional:Flight A Open Pairs
T :Joe Blow (untitled, written by Joe Blow) E Beginning Bridge:Lesson 1
T Preempts:: Fact or Fiction?:Marty Bergen
The last example shows how to handle the rare case S = Session, Stage or Subheading
of a colon in the actual text. Double it (::) to be treated Max len: 128 Valid char: (all)
as a single colon, rather than a separator. This applies
This indicates which part of a multisession event, or
only to labels TLES. In all other labels, a colon is
a subheading (such as a lesson topic). Here also, a
interpreted strictly as a separator.
separator (:) is permitted for further clarification. If the
D = Date and Time part after the separator consists of a number only, it is
the segment number. Examples:
Max len: 18 Valid char: 0123456789C:?
S 2nd Session
When the deal occurred. The date is given in fixed S Semifinal:3 (3rd segment)
format (yyyymmdd) without separators. Unknown parts S Flight A:Round 12
may be filled with a question mark (?), and mmdd or dd S Rebids by Opener:Page 1
may be truncated. The letter C may be used after the year
(or after the year and month) to mean “circa” (approxi- F = Form of Scoring
mation).
Max len: 64 Valid char: (all)
Optionally, the date may be followed by a separator
(:) and the time in 24-hour fixed format (hhmmss), of The kind of scoring in effect. This can be written as
which mmss or ss may be truncated. Midnight may be a word or phrase, or abbreviated as a single letter.
indicated at the end of a day as 24 (truncated from Allowed abbreviations are I = IMPs, B = Board-a-
240000) or at the start of a day as zero. Time is local to Match (aka Point-a-Board), T = Total Points, X = IMP
the location the deal occurred. Examples: Pairs, M = Matchpoints, N = Instant Matchpoints,
D 19980131 (January 31, 1998)
R = Rubber Bridge, C = Chicago, A = Cavendish
D 199709 (sometime in September, 1997) (Chicago with second and third dealer nonvulnerable)
D 1996 (sometime in 1996) and P = Plus-or-Fishfood (my creation for whichever
D 1955C (not sure but about 1955) side goes plus wins; honors don’t count). Note that
D 20000509:091508 (May 9, 2000, 9:15:08 am) abbreviations I, B and T imply team competition; all
D 20010704:1930 (July 4, 2001, 7:30 pm) others imply pair competition.
D 20011130:24 (Nov. 30, 2001, midnight)
D 20011201:0 (same exact time as above)
Optionally, this may be followed by a separator (:)
and modifying information. The word “old” is as-
L = Location sumed to mean “prior to the scoring changes of 1987.”
A year may be entered to indicate the scoring scale in
Max len: 128 Valid char: (all)
use at that time. Examples:
Where the deal occurred. This may be a single string,
F I (IMPs)
or two strings with a separator (:). If two strings, the F N (Instant matchpoints)
more general location is given first. Examples: F X:Butler (IMP pairs, Butler type)
L Fort Lauderdale FL F I:1952 (IMPs, using scale from 1952)
L Toronto ON:Royal York Hotel F M:old (Matchpoints before 1987 changes)
L Valkenberg NL:Holland Casino F A:no honors or partials (duplicate style)
K = Team Names and Carryovers B 7 (Board 7)
B 10:7X01 (Board 10, and RP numbering)
Max len: 128 Valid char: (all) B 15:C (Board 15, Section C)
B 9:97-7-542 (Board 9, and OKbridge number)
The names of two teams in a bridge match, which B :KK (Board number unknown, Section KK)
may be a captain’s name, country name, etc., separated
by a colon. The team given first (Home Team) is
North-South for the first of each pair of identical deals. H = Hands
Max len: 71 Valid char: 23456789AEJKNQSTW:.;
Optionally, a team name may be followed by a space
and a sign (+/-) to indicate a carryover (usually IMPs The cards for each player, starting with the direction
but dependent on the form of scoring) that applies to given and moving clockwise. Each hand begins with a
the current segment. A plus carryover indicates the colon (:). Suit holdings are given in descending order
running total from a previous segment(s) or qualifying (SHDC) separated by a dot (.) and cards in descending
round(s). A minus carryover indicates an assessment rank (AKQJT98765432).
made against the current segment, usually based on a Hands do not necessarily have to form a complete
penalty (e.g., slow play). Plus and minus may both be deal. Empty or incomplete hands are fine as long as no
used if appropriate. Fractional carryovers with two card is used twice, and no hand has more than 13 cards.
places (decimal hundredths) are allowed. Examples: This is useful for storing single hands, paired hands
K Nickell:Schwartz
(e.g., only E-W for bidding practice), bridge endings,
K Italy +999:United States +2 single-suit layouts, etc.
K Meckstroth's Marauders:Rodwell's Rockets For full deals, the fourth hand is redundant and may
K Iceland +76.33:Bulgaria +91.50 be omitted, but the initial colon must be present (else
K France:Spain -3 (Spain penalized 3 IMPs) fourth hand would be assumed not to exist). In other
K GIB +99 -3:Jack 97 (Jack ahead by 1)
words, three full hands followed by a colon means
“fourth hand gets the rest.”
N = Names of Players Various examples follow.
Max len: 128 Valid char: (all)
H W:873.A6.KT864.KQ8:96.T54.97.AJ9643:T542.K93.AQ53.52:
H S:9.AK6.AKT982.K87:K7654.J73.Q65.T6:QT2.T94.J4.AQ953:
The names of the players in the specific sequence:
North+South:West+East. Partners are separated by a Full deals (note trailing colon). Regardless of the
plus sign (+) and pairs by a colon (:). West is given distribution, any full deal requires the same number of
before East to keep the left-right relationship. Names characters (55), which is a visual aid in data entry.
may be first or last names (or both) or even non-human H N:AKQ72..AKQ72.753::.AKQ72.753.AKQ72
names such as computers. If a name is unknown, just
leave it empty. Optionally, this may be followed by a North and South hands only. Note that North is void
second colon (:) and the room (C = Closed, O = Open) in hearts and South is void in spades. Also note the
or table number (1-250). extra colon to indicate the East hand is missing.
Examples: H E:T4.8642.AKT8.K65

N Wolff+Hamman:Stansby+Martel Only the East hand.


N Soloway (Soloway was North) H W:K9.K9.9:3.A3.Q.4:Q82..J.A:A7.7.K8
N :Jan+Joe:O (Jan and Joe E-W in Open Room)
N :+Norman Kay:6 (Norman Kay East Table 6) A five-card end position. Note that West and South
N +Roth:GIB 4.0 (Roth South, computer West) are void in clubs, and East is void in hearts.
H W:43:KJ2:Q976:AT85
B = Board Number
Only the spade suit is given for each hand.
Max len: 24 Valid char: 0-9 A-Z :.-/
In the last two examples note that nonessential suit
The board (or sequence) number of the deal. Option- separators (when a hand contains no more cards) may
ally, this may be followed by a separator (:) and a be removed since the hand automatically ends at a
second number or letter. This may represent any other colon or the end of the line. Either way is fine with my
numbering such as its location in large catalog of deals. utilities, however, output files will remove unnecessary
A letter (or letters) may also be used to indicate the dots only for incomplete hands (less than 13 cards); full
section in a large tournament. Examples: hands will always include three dots.
Optionally, a semicolon may be used in place of any A = Auction
colon to indicate the hand following should be hidden Max len: 128 Valid char: 123456789ABCDEHNPRSWXYZ:!?*^
for normal purposes. This is useful for quizzes, polls,
The dealer (NESW) and vulnerability (ZNEB), then
play problems, etc., where only a portion of the dia-
each bidding round is preceded by a colon. No other
gram should be shown. For example:
separators are used in the sequence of calls.
H W:A875.632.76.8643;Q632.Q87.J842.Q2:KJT4.KJT4.AQ3.AJ;
Normal calls are indicated as: P = Pass, X = Double,
Above describes a full deal but indicates that only R = Redouble, 1C = One Club, 3N = Three Notrump,
the West and East hands should be shown. Note that the A = All Pass. Further, the letter Y may be used as a
North hand begins with a semicolon, and the trailing query point (multiple times are allowed) to mean “Your
semicolon means that South exists (but is hidden). call?” as in a bidding quiz or poll. Partial or incomplete
H W:A8765.QT.K9.AT87;J42.AJ7632.J.632;QT3.85.Q86.KQJ54; auctions are allowed (just stop writing). Complete auc-
Again a full deal, but only the West hand should be tions must end in A or PPP.
shown, as for an opening-lead problem. Any call (except A and Y) may by followed by a
H E;K5.T.KQJT98.KQJT:A876.A2.765.A876;32.KQJ9876543..9: notation: ! = good, ? = poor, !! = very good, ?? = very
H S:A876.A2.765.A876;32.KQJ9876543..9:QJT94..A432.5432; poor, !? = speculative, ?! = questionable, * = conven-
H W;32.KQJ9876543..9:QJT94..A432.5432;K5.T.KQJT98.KQJT:
tional (no explanation follows), ^1 = see Note 1.
H N:QJT94..A432.5432;K5.T.KQJT98.KQJT:A876.A2.765.A876;
Examples:
The above examples show the exact same deal and
hidden status (only N-S hands should be shown) and A SZ:1SP2SP:4SA (South deals, none vul)
A EN (East deals N-S vul, no auction given)
are included to emphasize that any hand may be given A WE:A (West deals E-W vul, passed out)
first. My output utilities select the starting hand as the A NB:1SXY (your call as South?)
first non-hidden hand with cards in the priority WNES; A S:1SP2CP:2D (vul unknown, incomplete)
so the last example would be used. A EB:3CP3N?P:PX!R^1A (East deals, both vul)
In the last example West’s 3 NT bid was poor and
South made a good double. The ^1 after the redouble
means a note follows, and the next line might say:
1 Apparently lost his mind

C = Contract and Declarer


Max len: 9 Valid char: 0123456789CDEHMNPRSWX:

The final contract and direction of the declarer, sepa-


rated by a colon (:), or the single letter P if passed out.
Optionally, the declarer may be immediately followed
by a number (or M = maximum) to state a goal. This
goal is necessary for end positions (contract is just a
suit or notrump with no level) and is useful when the
object is to win a certain number of tricks rather than
to make a contract, such as a sacrifice. Examples:
C 5D:N (Five diamonds, North declarer)
C P (Passed out)
C 6HR:W (Six hearts rdbld, West declarer)
C 4SX:S8 (true goal to win 8 tricks)
The last example is appropriate for a sacrifice bid of
four spades at equal vulnerability; i.e., object is to go
down two (at most).
C N:S6 (Notrump, South declarer, win 6)
C C:EM (Clubs, East declarer, win maximum)
Above are endings (partial deals) stating the strain,
declarer and the number of tricks required (M stands
for maximum). The player on lead would be indicated
in the P (play) label.
P = Play I = Instant Awards
Max len: 128 Valid char: 123456789ACDEHJKNQSTWY:+-!?*^ Max len: 512 Valid char: (all)

The direction of the opening leader and the play This label is used for any prepared award scale that
sequence. Each trick is preceded by a colon (:) but no applies to the current deal. Awards may be for the call
other separators are used. The play sequence is exactly of the player with the pseudo call Y in the A (auction)
as it would occur at the table; each trick starts with the label, or for the play of the player with the pseudo play
lead and is followed by the next three plays in order. Y in the P (play) label.
The play can end at any time (just stop writing). If there are no pseudo calls or plays, awards are
Plays are shown by suit and rank, except if following assumed to be “instant matchpoints” if a full deal exists
to the suit led, then only the rank is given. When a play with no hidden hand. If a hand is missing or hidden,
is insignificant its rank may be indicated with a minus and two partnership hands exist (non-hidden), awards
sign (-) to mean the lowest card, or a plus sign (+) to are for that partnership, typically for contracts reached
mean the highest card. in partnership bidding practice.
The letter Y may be used as a query point to mean Listing is in the form [description]=[award], where
“Your play?” but no further plays may follow (hence it description can be a call or contract (3N), a lead or play
can be used only once at the end). (SK), a phrase such as “Win first trick; lead HK” or a
Any play (except Y) may be followed by a notation: bridge score divided by 10. The last is to save space in
! = good, ? = poor, !! = very good, ?? = very poor, !? = a long list of scores by omitting trailing zeros (I think
speculative, ?! = questionable, * = conventional (no Harold Vanderbilt was obsessed with his millions when
explanation follows), ^1 = see Note 1. Examples: he invented contract bridge scoring).
P N:SK54T:SA87H3:HA245:HKQ8J Awards must be positive whole numbers (no frac-
P W:DA762:Y (your lead at trick two?) tions), and the list must be ordered from best to worst.
P S:HQ*3J2:HK47A:DJA53:HT68C7^1
Except for instant matchpoints, any award scale may be
In the last example the opening lead of the queen is used. My practice is to use a 10 scale for most purposes,
conventional but not explained. The club discard at as in my monthly polls and contests. Examples:
Trick 4 is noted, and the next line might say: I 3N=10:4S=7:6S=5:P=4:5S=3:4N=1 (calls)
1 A subtle falsecard I SK=10:HK=9:H8=7:HT=4:D3=3:CK=2 (leads)
I Win HA; lead SK=10:Win HA; lead H2=8
R = Result and Score The last listing (declarer-play options) is curtailed.
Max len: 16 Valid char: 0123456789P:+-=. Note that the semicolons are just plain text (colons and
The result is the number of tricks won by declarer (or equal signs, of course, cannot be in the text).
the letter P if passed out). This may be followed imme- For instant matchpoints, scores and awards are given
diately by a sign (+/-) and the actual raw score. relative to North-South. Scores are assumed to be plus
Optionally, this may be followed by a separator (:) (for N-S) until any score is preceded by a minus sign;
and the effective score. This may be an equal sign (=) then all subsequent scores are also minus. Awards must
to indicate a push or tie, a sign (+/-) and a number of be given as a percentage (100 scale). Corresponding
IMPs (+1 or -1 for board-a-match), or a plain number E-W awards are simply the difference between the N-S
to indicate a matchpoint percentage. Decimal fractions award and 100. For example:
of two places (hundredths) are allowed. All scores (raw I 80=99:98:75=97:95:67=94:92:50=90
or effective) are relative to North-South. Examples:
R 11 (declarer won 11 tricks)
List is curtailed. Note that awards of 98, 95 and 92
R 10+620 (declarer won 10 tricks, NS +620) are given without description and equal sign. This
R 8-300:+4 (8 tricks, EW +300, NS +4 IMPs) signifies a “gap award” for scores between the score on
R P:-2 (passed out, EW won 2 IMPs) the left and the score on the right. Also note the implied
R 12-980:-11 (12 tricks, EW +980, +11 IMPs) end gaps; i.e., any score above 80 (800) gets 100, and
R :66.67 (result unknown, NS 66.67 percent) anything below the last listed score (not shown) gets 0.
R 5:-1 (5 tricks won, EW won board if BAM)
R +2140:+12.29 (NS +2140 and +12.29 IMPs) I 10=98:95:5=91:88:-40=83:42=75:43=65
R 7-750:7 (7 tricks, EW +750, 93 percent) Note the transition from plus to minus. After the N-S
R 9-100:= (9 tricks, EW +100, tie board)
score of 5 (meaning +50) and a gap award, the next
Note that a push at IMPs is shown by an equal sign. score is -40 (-400). All subsequent N-S scores must
If you write a plain zero it means 0 percent. also be minus, so repeating the sign is unnecessary.
M = Makes at Double-Dummy General Database Rules
Max len: 36 Valid char: 0123456789ABCDFM:+=!?
The labels TDLESFKNBH are required for each
Indicates the number of tricks declarer can win in the deal and presumed to repeat until altered. This is a great
given contract against best defense after the opening convenience and space saver because these labels are
lead. This may be followed by a second number, mean- often the same for a group of deals (sometimes for an
ing after the lead to trick two; and a third, meaning after entire file). If any of these labels is unused (unknown
the lead to trick three; etc., up to 10 such numbers. All or immaterial), it should be set null at the first deal by
numbers refer to the total number of tricks (including using the label alone without data.*
past tricks). Optionally, a letter (M = makes, F = fails) *Technically, this isn’t necessary for a single file (unspecified labels are
may be used instead of a number if success or failure is assumed null), but it prevents a problem when joining two RBN files. Without this
known but not the exact number of tricks. precaution, the second file might inherit undesired repeats from the first file.

Numbers 10-13 are given in hexadecimal (A-D) to Repetition pattern of the N label (player names) is
avoid confusion and save space, allowing a one-digit governed by the K label (team names). If the K label
representation of all numbers. exists (not null), the N label repeats in alternating
Optionally, this may be followed by a separator (:) fashion as established by the previous two occurrences
and a list of double-dummy makes for N-S without (typically on the first board of a segment). If the K label
specified leads. North’s makes are given first, followed is null, the N label repeats consecutively like the other
by a plus (+) sign, then South’s. Makes consist of five repeating labels.
numbers, one for each strain in the sequence NSHDC.
The remaining labels (ACPRIM) do not repeat and
Unknown makes can be truncated or replaced with a
are assumed to be null unless explicitly entered.
question mark (?) as a placeholder. If South’s makes are
the same as North (often true), replace the plus sign The order of labels in a deal makes no difference,
with an equal sign (=) and omit the duplicate list. except for the use of notes (1-9). Notes are assumed to
Optionally, this may be followed by a second sepa- apply to the A (auction) label until the P (play) label is
rator (:) and a similar listing for West (first) then East. encountered, then they are assumed to apply to the
(Note that this structure “North+South:West+East” is play. All output files created by my RBN utilities order
the same as for the N label.) As a further shortcut, if labels TDLESFKNBHACPRIM (most logical I think)
West’s makes plus North’s makes total 13 in all strains regardless of the input order. Notes (if any) are placed
(quite common), this may be shown by a logical Not immediately after the appropriate A or P label.
symbol (!). Likewise, if East’s makes plus South’s Case (upper or lower) is significant only in labels
makes total 13. If a deal is square all around, prefer to TLESFKNI, which allow all characters. Otherwise,
use “!=” although “!!” means the same. Examples: case is insignificant — upper and lowercase are inter-
M 9 (declarer can win 9 tricks after lead)
preted the same. My RBN utilities use uppercase for all
M BA (11 after lead, 10 after TR-2 lead) case-insignificant output (as shown by examples in this
M F (fails against best defense after lead) document) but either case is OK for input.
M A:88DAC (10 after lead, North analysis) A space character (ASCII 32) is required after each
M :978A7+979A7:46435+45436 (full analysis) label (except null labels). Otherwise, spaces are permit-
M :BAB8A+AAA89:22253= (as above E-W same)
ted only in label data that accepts all characters (TLES-
M C:DCC99=:!= (12 after lead, equal around)
FKNI). Spaces are not allowed in the data of labels
The above indicates a deal with no opening-lead DBHACPRM.*
dependencies. North makes 13 tricks in notrump, 12 in
*My RBN utilities check each label for valid characters. If an invalid space (or
either major, and 9 in either minor. South makes the other character) is found, the program will stop processing the current file and exit
same, and West or East makes the difference (from 13). with an error message, showing the line number of the faulty character.
Note that no plus sign is used when ! or = appears.
Free-text paragraphs (starting with a left curly brace)
M :+??A (South can win 10 tricks in hearts) may be placed anywhere, but always at the start of a
M 9:?4=:?8+?9 (9 with lead, spade analysis)
line. The paragraph continues until (1) a right curly
Note that because of the fixed format of the five brace is encountered at the end of a line, or (2) a left
strains, placeholders (?) are necessary to skip unknown curly brace is encountered at the start of line to begin a
or immaterial values. The last example means that in new paragraph, or (3) the deal ends (two CRLFs).
spades North or South can win 4 tricks; West 8, and Paragraphs before the H label are presumed to appear
East 9. If the actual contract were, say, 3S by West, it before the diagram; paragraphs after the H label are
also shows that the opening lead was favorable. presumed to appear after the diagram.
File Signature and Limits
To be identified as an RBN file, the first line must
begin with “% RBN” (no quotes) or “%RBN” (i.e., the
space is optional). A percent sign may also be used at
the start of any line (except within free text) to indicate
extraneous information that is not part of the data. This
is commonly used at the start of a file to describe its
contents. For example:
% RBN 2.2
% Copyright 2004 Richard Pavlicek
% 36 deals, recommended bidding, and awards
T ACBL Instant MP Pairs:Richard Pavlicek
D ... etc.

Note that there is no blank line between extraneous


text and the first label, as two CRLFs terminate a deal.
(Adding a blank line would result in an extra “deal”
with all null labels.) For the same reason, you cannot
put blank lines in free text. Also note that the last deal
in a file also should be followed by a blank line (two
CRLFs). This good practice not only avoids confusing
software parsers but makes it easy to concatenate two
or more RBN files, ensuring proper deal separation.
The maximum line length is shown for each label.
Except for the I label (allowing 512) the longest is 128.
This length includes the label and space but not the
CRLF. In theory, it is possible to have longer auctions,
or excessively long names, etc., but in practice I’ve
never come close. (If you expect to exceed this amount,
you need a storybook, not a database.) Note that this
limit does not apply to free text, which may have lines
of any length, subject to the deal-size restriction.
The maximum size of any single deal is 16,384
bytes. Obviously, this could only be approached by the
inclusion of free text. To give you an idea how this
relates, the “Florida Belles Are Ringers” article uses
only 2291 bytes; so it’s hard to imagine needing more
than 16K for one deal. There is no limit on the size of
an RBN file — well, except the DOS file-size limit of 2
gigabytes, but that’s hardly a concern.

Summary
The RBN format produces data files that are simple,
flexible, and easy to parse by software. The RBN file
is also smaller than other textual formats — usually less
than one-third the size of an equivalent PBN file.
This edition (version 2.2) represents a reasonably
finalized format, which has been refined over eight
years of continued use. Try it! I think you’ll find it the
best way to incorporate bridge deals into a database.
-Richard Pavlicek (e-mail: richard@rpbridge.net)
Copyright © 2005 Richard Pavlicek. All rights reserved.

You might also like