Article 7A12 Main |
| by Richard Pavlicek |
It is desirable to have a standard format for recording, archiving and exchanging bridge deals. This should be flexible, simple and compact. A variety of formats have been proposed, but in my view they dont pass the test.
Probably the most notable attempt is PBN (Portable Bridge Notation) which includes a few good ideas but is hopelessly bloated. For example, the syntax to state the vulnerability is: [Vulnerable Both].
Hello-o-o? Do I really have to write the word Vulnerable every time? Most writers abbreviate it in ordinary writing, so this is outrageous for a data format. And why are brackets and quotes both required?
PBN has a number of design flaws, because it was derived from a chess notation (PGN) rather than originated for bridge. For instance, the default ordering of tags is illogical, and the play syntax must have been thought up by monkeys.
Another popular format is LIN (Bridgebase) which is excellent for display purposes (e.g., segments of a bridge match) but poor for archiving because of its limited file size (16 boards typically). Single matches must be split into multiple files.
RBN conveniently stores any number of deals a complete match, an entire event, multiple events, etc., so is ideal for maintaining a bridge database. Its organization is based on many years of working with bridge data, and the intuitive coding will be familiar to bridge players.
The basic structure of RBN is that each line starts with a one-character label, a space for readability, then appropriate data to the end of line. A double line-feed (blank line) marks the end of each record. There are 16 letter labels and 10 digit labels, as summarized below:
Label | Description | Max Len | Valid Characters |
---|---|---|---|
D | Date and time | 20 | 0123456789CG:? |
T | Title and author | 128 | (all) |
L | Location | 128 | (all) |
E | Event or main heading | 128 | (all) |
F | Form of scoring | 64 | (all) |
K | Team Names and carryovers | 92 | (all) |
S | Session, stage or subheading | 128 | (all) |
N | Names of players | 128 | (all) |
B | Board number | 32 | (all) |
H | Hands (deal diagram) | 72 | 23456789AEJKNQSTWx:.;? |
A | Auction (w/dealer, vul) | 128 | 123456789ABCDEHNPRSWXYZ:!?*^ |
0-9 | Auction note | 64 | (all) |
C | Contract and declarer | 24 | 0123456789CDEHMNRSWX: |
P | Plays | 128 | 123456789ACDHJKQSTY:;+-~.!?*^ |
0-9 | Play note | 64 | (all) |
R | Result and score | 24 | 0123456789P:+-=. |
M | Makes at double-dummy | 64 | 0123456789ABCD:+=!? |
I | Item list | 1024 | (all) |
Digit labels (notes 0-9) must appear immediately after the A label if pertaining to the auction, and/or immediately after the P label if pertaining to the play.
In addition to labeled fields, free text may be entered at any place by starting a line with a left curly brace. The text continues, which may include multiple lines (but no blank lines), until ended by a right curly brace at the end of a line.
To illustrate the RBN format, consider the following article I wrote in 1993:
Two Florida ladies put together a tremendous score 78 percent in the continent-wide International Fund Game on May 12. Helen Shanbrom and Julia Carswell played at the Palm Beach Bridge Studio, a popular club owned and operated by Daniel Cohen.
Winning is nothing new to Shanbrom, arguably the most successful club player of all time. Her partner has not been playing bridge that long; but she learns fast and has become a sound, reliable player. Carswell has posted a number of wins already.
The diagrammed deal shows the ladies in action, stampeding their opponents to the five level. Shanbrom, West, opened routinely with 1 and Carswell, East, chose a single raise because her hand contained doubtful values good judgment in my opinion. (Norths decision to overcall and Souths 4 bid are not clearly understood, perhaps for the best.)
Shanbroms push to 4 is best explained as It was my turn, 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 overcall). Opportunity needs knock only once for Shanbrom, and she wielded the ax.
West deals | J 4 2 | West | North | East | South | |
None vul | A J 7 6 3 2 | Shanbrom | Carswell | |||
J | 1 | 2 | 2 | 4 | ||
6 3 2 | 4 | Pass | Pass | 5 | ||
A 8 7 6 5 | Q 10 3 | Dbl | Pass | Pass | Pass | |
Q 10 | 8 5 | |||||
K 9 | Q 8 6 | |||||
A 10 8 7 | K Q J 5 4 | |||||
K 9 | ||||||
K 9 4 | ||||||
Lead: K | A 10 7 5 4 3 2 | |||||
5 × North | 9 |
Watch the defense! Carswell led the K and Shanbrom followed with the seven a wisely chosen card to 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 routinely lead a spade if she held Q-J, but in the actual layout a spade shift would be costly.
How many East defenders do you think would come through? This one did! Carswell found the killing play of another club, and declarer actually went down two when he misplayed spades later. If Carswell leads any other suit at trick two, declarer can make the contract by establishing the diamonds.
D 19930512
T Florida Belles Are Ringers:Richard Pavlicek
L West Palm Beach FL:Palm Beach Bridge Studio
E ACBL International Fund Game
F M
{Two Florida ladies put together a tremendous score 78 percent in the continent-wide International Fund Game on May 12. Helen Shanbrom and Julia Carswell played at the Palm Beach Bridge Studio, a popular club owned and operated by Daniel Cohen.}
{Winning is nothing new to Shanbrom, arguably the most successful club player of all time. Her partner has not been playing bridge that long; but she learns fast and has become a sound, reliable player. Carswell has posted a number of wins already.}
{The diagrammed deal shows the ladies in action, stampeding their opponents to the five level. Shanbrom, West, opened routinely with 1s and Carswell, East, chose a single raise because her hand contained doubtful values good judgment in my opinion. (Norths decision to overcall and Souths 4d bid are not clearly understood, perhaps for the best.)}
{Shanbroms push to 4s is best explained as It was my turn, 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 5h (actually, North is more the culprit here for the frivolous overcall). Opportunity needs knock only once for Shanbrom, and she wielded the ax.}
N :Helen Shanbrom+Julia Carswell
B 8
H W:A8765.QT.K9.AT87:J42.AJ7632.J.632:QT3.85.Q86.KQJ54:
A WZ:1S2H2S4D:4SPP5H:XA
C 5HX:N
P CK972:CQ!H483:DA9J6:D2KH28:SJ?QKA:CA
R 9-300:0
{Watch the defense! Carswell led the cK and Shanbrom followed with the seven a wisely chosen card to 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 routinely lead a spade if she held Q-J, but in the actual layout a spade shift would be costly.}
{How many East defenders do you think would come through? This one did! Carswell found the killing play of another club, and declarer actually went down two when he misplayed spades later. If Carswell leads _any other suit_ at trick two, declarer can make the contract by establishing the diamonds.}
Note how each label and its data are contained on a single line and there are no blank lines. (A blank line separates records.) Labels KSMI are not needed so they are omitted, which by default presumes them to be null.
Paragraphs of free text (surrounded by curly braces) can be placed anywhere, but good practice is to emulate their position before or after the hand diagram (H label) as done above. A vertical bar (|) may be used to denote a line break to keep text on a single line.
Article 7A12 Main | Top Richards Bridge Notation |
The 16 letter labels are described below. While each pertains to different data, all have the common syntax that a colon (:) is used as a separator.
When the deal occurred. The date is given in fixed format (yyyymmdd) without separators. Unknown parts may be filled with a question mark (?), and mmdd or dd may be truncated. The letter C may be used after the year (or year and month) to mean circa (approximation). Optionally, a second date may be given (yyyymmdddd) to indicate a span (if lower wraps to next month).
The date (if not a span) may be followed by a colon and the time in 24-hour fixed format (hhmmss), of which mmss or ss may be truncated. Midnight may be indicated at the end of a day as 24 or at the start as 00.
Date and time are local to the location (L label) unless followed by the letter G (GMT).
D 19980131 | January 31, 1998 |
D 199709 | some date in September, 1997 |
D 1986120911 | December 9-11, 1986 |
D 1955C | not sure but about 1955 |
D 20010704:1930 | July 4, 2001, 7:30 pm |
D 20120428:072315G | time to exact second GMT |
The title of an article about the deal and the authors name, separated by a colon.
T Overbid Succeeds:John Doe | typical case |
T Bridge Made Easy | title (author unknown) |
T :Joe Blow | author (no title or unknown) |
Where the deal occurred. This may be a single string, or two strings (with more general location first) separated by a colon.
L Fort Lauderdale FL |
L Toronto ON:Royal York Hotel |
L Valkenberg NL:Holland Casino |
Recommended style is to use standard two-character codes for states, provinces and countries. While flawed (e.g., IL = Illinois or Israel) the chance of ambiguity is too remote for concern.
The name of the event, or a main heading such as a catalog of lesson deals. This can be a single string, or two strings separated by a colon. If two strings, the more general one should be given first.
E 1999 Grand National Teams |
E Southeastern Regional:Flight A Open Pairs |
E Beginning Bridge:Lesson 11 |
The kind of scoring in effect. This can be a word, phrase or one-letter abbreviation: I = IMPs, B = Board-a-match (aka Point-a-board), T = Total points, X = IMP pairs (aka Cross-IMPs), M = Matchpoints, N = Instant matchpoints, R = Rubber bridge, C = Chicago, A = Cavendish (same as Chicago but second/third dealer nonvulnerable) or P = Plus-or-fishfood (my silliness for the side that goes plus wins; honors do not count). Note that abbreviations I, B and T imply team competition; all others imply pair competition.
Optionally, this may be followed by a colon and modifying information. The word old is assumed to mean prior to the scoring changes of 1987. A year may be entered to indicate the scoring scale in use at that time.
F I | IMPs |
F N | Instant matchpoints |
F X:Butler | IMP pairs, Butler type |
F I:1952 | IMPs using scale from 1952 |
F M:old | Matchpoints before 1987 changes |
F R | Rubber bridge |
F C:NS 60 | Chicago, N-S have 60 partscore |
F A:-HP | Cavendish, no honors or partscores |
The names of two teams in a bridge match, which may be a captains name, country name, etc., separated by a colon. The team given first is North-South for the first of each pair of identical deals.
Optionally, this may be followed by a colon and carryover for Team 1; then another colon and carryover for Team 2. Carryovers may be IMPs, matchpoints or total points, depending on form of scoring. Fractional carryovers are allowed and must be expressed in hundredths (two decimal places). Negative carryovers are allowed and are useful to deduct a penalty assessed in the current segment (e.g., slow play).
K Nickell:Schwartz | typical case |
K Italy:USA1:999:22 | Italy leads by 977 |
K Meckstroths Marauders:Rodwells Rockets | wordy case |
K Iceland:Bulgaria:76.33:91.50 | Bulgaria leads by 15.17 |
K France:Spain::-5 | Spain penalized 5 |
K GIB:Jack:99-8 | GIB up 99 but penalized 8 |
The part of an event, or a subheading such as a lesson topic. A number alone indicates the session (typically in a pair event). Allowed abbreviations are F = Final, P = Playoff, S = Semifinal, Q = Quarterfinal, R16 = Round of 16 (likewise for any number) or I = Initial stage (Qualifying). A colon separator allows further clarification, where a number alone indicates the segment or round.
S 2 | second session |
S S:3 | semifinal, third segment |
S R32:1 | round of 32, first segment |
S I:12 | qualifying, round 12 |
S Slam Bidding:Blackwood | subheading |
Names of players in the specific order: North+South:West+East. Partners are separated by a plus sign (+) and pairs by a colon. Names may be first or last names (or both) or even non-human names such as computers. If a name is unknown, leave it empty.
If the event is a team match, this is followed by the names at Table 2, so the structure is: North+South:West+East:North+South:West+East. The composition of each team is North+South at one table and West+East at the other. Note: Team names indicated by the K label must be synchronous, showing the team that is North-South at Table 1 first.
N Wolff+Hamman:Stansby+Martel | typical single table |
N Grue+Moss:Smith+Cohen:Levin+Zia:Gold+Robson | typical team match |
N Rosenberg+Zia:::Miller+Kohler | Team 1 (Team 2 unknown) |
N :Stanley Laurel+Oliver Hardy | Laurel & Hardy were West-East |
N GIB 4.0+Jones:GIB 4.0+GIB 4.0 | Jones (South) & 3 computers |
The board or sequence number of the deal usually just a plain number, but any notation is acceptable. Optionally, this may be followed by a colon and a plus sign (+) to auto-number subsequence records consecutively, and/or a description (what to call it).
B 6 | number only with period after |
B 1:Board | Board 1 |
B 1:+ | auto-number consecutively from 1 |
B 1:+Deal | Deal 1, Deal 2, Deal 3, |
The cards for each player, starting with the direction given and moving clockwise. Each hand begins with a colon. Suit holdings are given in descending order (SHDC) separated by a dot (.) and cards in descending rank (AKQJT98765432).
Hands do not necessarily have to form a full deal. Empty or incomplete hands are fine as long as no card is used twice, and no hand has more than 13 cards. This allows the same syntax to store single hands, partnership hands, bridge endings, single-suit layouts, etc.
For full deals, the fourth hand is redundant and may be omitted, but the initial colon must be present (else fourth hand would be assumed not to exist). In other words, three full hands followed by a colon means fourth hand gets the rest.
Optionally, a semicolon may be used in place of any colon to indicate that the hand following should be hidden for the intended purpose. This is useful for quizzes, polls, play problems, etc., where only a portion of the diagram should be shown.
H W:873.A6.KT864.KQ8:96.T54.97.AJ9643:T542.K93.AQ53.52: | full deal |
H S:9.AK6.AKT982.K87:K7654.J73.Q65.T6:QT2.T94.J4.AQ953: | full deal |
H N:AKQ72 AKQ72.753::.AKQ72.753.AKQ72 | N-S hands (N void , S void ) |
H E:T4.8642.AKT8.K65 | only the East hand |
H W:K9.K9.9:3.A3.Q.4:Q82 J.A:A7.7.K8 | 5-card end position |
H W:43:KJ2:Q976:AT85 | only the spade suit |
H N:QJT94 A432.5432;K5.T.KQJT98.KQJT:A876.A2.765.A876; | full deal, E-W hidden |
H E;K5.T.KQJT98.KQJT:A876.A2.765.A876;32.KQJ9876543 9: | (same as above) |
The last two examples show the exact same deal and hidden status to emphasize that the H label may start with any hand and always continues clockwise. My practice is to start with the first non-hidden hand with cards in the priority WNES.
Nonessential suit separators (dots) may be omitted when a hand has no more cards, since the hand automatically ends at a colon, semicolon, or end of line. For full deals, however, it is better (but not required) to include all separators to aid visual recognition.
Cards may also be entered as x to indicate one of the lowest unassigned cards in that suit, or as ? to indicate an unknown rank. The latter is often useful for presentation purposes but of course precludes any card play.
Dealer NESW and vulnerability ZNEBX (X = any or immaterial) then each bidding round preceded by a colon. Optionally, the dealer, vulnerability and first colon may be omitted, which presumes WX: by default.
Normal calls are indicated as: P = Pass, X = Double, R = Redouble, 1C = One Club, 3N = Three Notrump, A = All Pass. Also, the letter Y may be used as a query point (multiple times allowed) to mean Your call? as in a bidding quiz or poll. Partial or incomplete auctions are allowed (just stop writing). Complete auctions must end in A or PPP.
Any call (except A and Y) may by followed by a notation: ! = good, ? = poor, * = conventional (with no explanation) or ^ followed by 1-9 (note reference).
A SZ:1SP2SP:4SA | South deals, none vul |
A WE:A | West deals, E-W vul, passed out |
A NB:1SXY | North deals, both vul, your call as South? |
A 1SP2CP:2D | West deals, any vul, incomplete auction |
A EB:3CP3N?P:PX!R^1A | poor 3 NT bid, good double, see Note 1 |
1 apparently lost his mind | description of the redouble |
Besides labels 1-9, the A label may be followed by the 0 label for a comment not referenced in the auction. For example:
0 North-South were a new partnership |
Article 7A12 Main | Top Richards Bridge Notation |
The contract consists of level, strain, jeopardy and goal (in that order) but only the strain is required. Level is a digit (1-7); strain is a letter (CDHSN); jeopardy is a letter (XR); and goal is a number of tricks to win (1-13) or the letter M (maximum). Stating a goal is only necessary for endings (without a level) but is useful to show a true objective, as in a deliberate sacrifice bid.
Contract must be followed by a colon and the declarer (NESW). If the first leader is not to the left of declarer (as for an ending) append a second colon and the first leader (NESW).
C 3N:N | 3 NT, North declarer |
C 5DR:W | 5 ××, West declarer |
C 4SX8:E | 4 ×, goal 8 tricks, East declarer |
C H6:S:S | win 6, South declarer, South leads |
C CM:S:E | win max, South declarer, East leads |
The play sequence in the exact order of cards played. Each trick begins with the lead and is followed by the second, third and fourth plays. Tricks are separated by a colon, or a semicolon to mean plays that follow are unimportant or trivial. The play can end at any time (including mid-trick); just stop writing.
Plays are shown by suit and rank, except when following to the suit led, then only the rank is given. This method not only saves keystrokes but makes it easier to follow the play, since ruffs and discards stand out.
Any play may by followed by a notation: ! = good, ? = poor, * = conventional (with no explanation) or ^ followed by 1-8 (note reference). Label 0 is available for a general comment (similar to auction). Label 9 is not like 1-8 but used to summarize omitted plays, e.g., 9 Win the rest.
Besides specific plays, five pseudo plays are allowed: Hyphen (-) indicates a trivial play of the lowest unplayed card. Tilde (~) does the same but means the suit chosen is significant. Plus (+) indicates a trivial play of the highest unplayed card. Dot (.) indicates an immaterial discard. The letter Y means Your play? which is useful for quiz purposes.
P D3 | opening lead only |
P SK54T:SA87H3:HA245:HKQ8J | tricks 1-4 |
P HQ*3J2:HK47A:DJA53:HT68C71 | Q conventional (no note), 7 noted 1 |
1 subtle falsecard | description of 7 |
P SJQKA:HA--- | all follow low to A at Trick 2 |
P SA---:D2Y | A lead (all follow low), 2 shift, your play? |
The result is the number of tricks won by declarer, or the letter P if passed out. This may be followed immediately by the signed (+/-) raw score relative to North-South.
Optionally, this may be followed by a colon and the effective score. This may be an equal sign (=) to indicate a push or tie, a signed (+/-) number of IMPs (+1 or -1 if board-a-match) or a plain number indicating a matchpoint percent. Decimal fractions of two places (hundredths) are allowed. All scores are relative to North-South.
R 11 | declarer won 11 tricks |
R 10+620 | declarer won 10 tricks, N-S +620 |
R 8-300:+4 | 8 tricks won, E-W +300, N-S +4 IMPs |
R P:-2 | passed out, E-W won 2 IMPs |
R 12-980:-11 | 12 tricks won, E-W +980, E-W +11 IMPs |
R :66.67 | result unknown, N-S matchpoints 66.67% |
R 5:-1 | 5 tricks won, E-W won board if B-a-M |
R 9-750:7 | 9 tricks won, E-W +750, E-W 93% |
R 7-100:= | 7 tricks, E-W +100, push board |
Note that a push at IMPs is shown by an equal sign. A plain zero means 0 percent (matchpoints).
This label contains double-dummy analysis of the deal; more specifically, the number of tricks declarer can win with best play and best defense. Numbers are hexadecimal (A=10, B=11, C=12, D=13) so that all makes can be shown by a single digit. The M label is divided into four parts, separated by colons, as explained below.
Part 1: Number of tricks declarer can win in the given contract with best defense. Optionally this may be followed by the status after each lead in the P label thru trick 12. Each number represents the total number of makable tricks including past tricks; thus an increase means the defense erred, and a decrease means declarer erred. To save space, equivalent numbers may be truncated from the lead-status list; so if only a partial list is given it must be terminated with a question mark (?) to mean nothing further known.
M 9 | makes 9 tricks with best defense |
M 8998888788887 | full analysis (at start and after lead to Tricks 1-12) |
M AA | makes 10 tricks, same after each lead |
M 9A9 | makes 9 tricks, 10 after opening lead, 9 thereafter |
M 79? | makes 7 tricks, 9 after opening lead, unknown after |
Part 2: Number of tricks makable in the given contract after all opening leads, ordered high-to-low by suit then rank. Touching cards in the same suit are skipped; i.e., if leaders spades are K-Q-9-3, the queen is omitted since the result must be the same as the king. As in Part 1, equivalent numbers may be truncated from the end, and a question mark (?) means unknown.
M :AAABBBAABA | makes after 10 different leads |
M :87 | makes 8 after highest-rank lead, else 7 |
M :D | makes 13 tricks with any lead |
M :99? | makes 9 after highest and next-highest lead, others unknown |
Part 3: Number of tricks makable by North-South in each strain (assuming best defense without specified leads). Norths makes are given first, followed by a plus (+) sign then South. Makes consist of five numbers, one for each strain in ranking order (NSHDC). Unknown makes can be truncated or replaced with a question mark (?) as a placeholder. If South makes the same as North (usually true), replace the plus sign with an equal sign (=) and omit the duplicate list.
M ::9A888= | N or S win 9 in NT, 10 in , 8 in |
M ::987A8+997A8 | by South plays a trick better |
M ::9 | North makes 9 in NT, else unknown |
Part 4: Analogous to Part 3 but for West-East. As a shortcut, if Wests makes plus Norths makes total 13 in all strains (quite common) this may be shown by a logical Not symbol (!); likewise for East and South.
M :::74499= | West makes shown, East is same |
M ::987A8=:!= | North shown, all square (common) |
M ::88666+88667:!! | West 55777, East 55776 |
The M label can be used on incomplete deals provided each player has the same number of cards. Numbers then relate to the diagram as given; e.g., in an eight-card ending the highest possible make is 8.
This label can be used to include data for any purpose desired. Recommended format is [item]=[value] with fields separated by a colon. One of my many uses is to include awards for bids, leads or plays. For example:
I 4S=10:3N=8:5S=7:4N=6:3S=4:2N=3:6S=1 |
Article 7A12 Main | Top Richards Bridge Notation |
Labels DTLEFKSNBH are presumed to repeat until altered. This is a great convenience and space saver because these labels are often the same for a group of deals, and sometimes for an entire file. Therefore, if one of these labels exists and then becomes unused, it must be explicitly set to null using the label alone (without data) to end the repetition.
The remaining letter labels ACPRMI and digit labels 0-9 do not repeat and are presumed null unless explicitly entered. Exception: Any of labels ACPRMI can be designated as fixed if given at the first record with an exclamation point (instead of a space). For example: C!3N:S means the contract is 3 NT by South for the entire file.
The order of labels doesnt matter, except for digit labels 0-9 which must follow the A or P label as appropriate. Logical ordering (at least for my purposes) is DTLEFKSNBHACPRMI, and I retain this order throughout for uniformity.
Labels DHACPRM allow only specific characters (as shown in the first table) and cannot contain spaces. Letter case is immaterial but can be varied for any purpose desired. My practice is to use uppercase in general, and lowercase as a flag for special treatment. For example, the label A SB:1sP2SP:4sA indicates to me that Souths bids of 1 and 4 should be quizzed.
A double line feed (blank line) separates records regardless of where it occurs. Therefore, free text must not contain a double line feed. Further, the last record in a file should be followed by a double line feed, not only to avoid confusing software parsers but to simplify the concatenation of two or more RBN files.
Note: RBN files follow the Unix format for line endings (LF only) because the Windows format (CR and LF) bloats the file size for no reason or as most people have realized by now: Windows sucks.
While not required, I give the following characters special treatment in free text:
_ | start or end Italics | duck _one round_ only | = | duck one round only |
| | line feed | now is|the time | = | now is[LF]the time |
^ | superscript next character(s) | x^2 | = | x2 |
{ | treat next character literally | {^ or {| or {_ | = | ^ or | or _ |
To denote suit symbols, my practice is to use a lowercase cdhs as a standalone word or combined with another character to form a bid, contract, or card. Similarly, I use a lowercase n for a notrump bid or contract. For example:
s | standalone word | |
1h | bid or contract | 1 (likewise with 234567) |
3n | bid or contract | 3 NT (likewise with 124567) |
d2 | card | 2 (likewise with AKQJ9876543x) |
c10 | card | 10 (only 3-character case) |
Optionally, plain data (for any purpose) may be entered at the start of a line after all labels. Its second character (at the first instance) cannot be a space or exclamation point to be distinguishable from a label. Plain data continues until free text is met (line starting with a left curly brace) or the end of the record (double line feed). One advantage of this is to document bidding systems in a simple, readable format. For example:
A 1HP2HP:Y |
2s=relay game try |
2n=invitational |
3c 3d 3s=natural slam try |
3h=preemptive |
3n=choice of game |
A common use for an RBN file is to document team matches between two tables playing the same deal. To distinguish this, the two records are separated by a line containing an exclamation point only (instead of a blank line). For example:
B 10 |
H W:KQ973.AQJ.74.KJ4:AJ5.64.9862.AQ62:82.98.AKQT53.T98: |
A EB:3DA |
C 3D:E |
R 10 |
! |
A EB:PP1NP:3NA |
C 3N:W |
R 9 |
Note that labels B and H apply to both records since they repeat by default.
To be identified as an RBN file, the first line should begin with % RBN (no quotes) or %RBN (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. My practice is to use this only at the start of a file to describe its contents. For example:
% RBN rpbridge.net 37 records 36 deals |
D 19890919 |
T Royal Viking Pairs:Richard Pavlicek |
L Analyses 7N05 |
{The 1989 Royal Viking Pairs begins |
Note there is no blank line between extraneous text and the first label, as it would terminate the record. (Adding a blank line would result in an extra record with all null labels.)
The maximum length of each label (shown in the first table) includes the label and space but not the LF. Of course it is possible to need more, e.g., with excessively long names, but in practice this has never been an issue. Note that free text has no limit.
There is no maximum length of an RBN record, or an RBN file, other than what your operating system can handle.
I have found it useful for online purposes to place each RBN record on a single line. The reason is to allow each record to be retrieved easily with a single file read. Conversion is simple: Replace each line feed (except the last of each record) with a right curly brace. I call this RBX format. Note that the file size is unchanged.
Parsing an RBX file is the same as RBN except: Each label ends with a right curly brace, and free text ends with two right curly braces (a single right curly brace within free text indicates a LF).
Article 7A12 Main | Top Richards Bridge Notation |
© 2023 Richard Pavlicek