How to tell the simulator what you know about each seat.
There are three ways to fill in a seat, and you can mix them freely across the four boxes. Leave a seat empty and it takes any hand at all.
Type it out, suits in the order spades, hearts, diamonds, clubs, separated by full stops. A void is just nothing between two stops.
Underneath the box you will see the hand drawn out with suit symbols. If it does not appear, you have the wrong number of cards or a stray character.
Often the spot cards do not matter. Two characters stand in for them:
| x | any card from the ten down to the two |
| * | any card from the jack down to the two, drawn at random, so the jack turns up as often as it really would |
Honours can be typed in either case, which is easier on a phone: akxxx.qxx.jx.xxx is the same hand, and so is a full hand written that way.
Write # for a suit to leave it open — neither its length nor its cards given. KJx.#.#.# is the king, the jack and a spot in spades, with the other ten cards dealt from the remaining forty-nine.
A template like that can be followed by a description, separated by a space: KJx.#.#.# h5m8M10 is five or more hearts and 8–10 points in all, the four points in the spades included.
Anything the template has already settled is refused rather than ignored, so KJx.#.#.# s4 is an error: the spades are given. Whole hand shapes are allowed if the template can still reach them — :m is fine with the minors open, :b is not, because it needs five spades.
This is the useful one. A description is a run of letters and numbers with no spaces. A lower case letter sets a minimum, an upper case letter a maximum.
Whatever you type, the line underneath tells you what it actually means. If that line does not say what you had in mind, change it until it does — that is what it is there for.
| Letter | Meaning |
|---|---|
| s S | fewest / most spades |
| h H | fewest / most hearts |
| d D | fewest / most diamonds |
| c C | fewest / most clubs |
| m M | fewest / most high card points |
| a A | fewest / most aces |
| l L | lower / upper bound on losing tricks. Only useable where a fit has been diagnosed. At most three in a suit: start from twelve and take one off for any ace, for any king in a suit of two or more, and for any queen in a suit of three or more |
| b u | suit-length product, at least / at most. On their own b means balanced and u unbalanced, which is the same as b90 and u80 |
| Q | a good suit: Q0 spades, Q1 hearts, Q2 diamonds, Q3 clubs |
| x X | fewest / most stops in a suit. Two digits, suit then count: x01 is at least one spade stop |
| t T | the suit is headed by at least / at most a given card. Two digits, suit then 0 ace 1 king 2 queen 3 jack 4 a ten or lower |
| z Z | at least / less than Qx in a suit. z2 means the diamonds are Qx, Kx or Ax, or three cards or more whatever they are |
| o O | six or more of a suit with no four card side suit: o1 is a one-suited heart hand |
| f F | at least / at most a given fit with partner. Two characters, the suit then the count, where A to D stand for ten to thirteen: f09 is a 9+ card spade fit, F18 at most eight hearts between you |
| r R | at least / at most a number of keycard points between you and partner in a suit: each ace 2, the king of the suit 2, its queen 1, so 0 to 11. Two characters, the suit then the count, where A and B stand for ten and eleven: r06 is at least three spade keycards, r1B all five with the ♥Q |
| v V | a control / no control in a suit — a void, a singleton, the ace or the king: v0 is a spade control, V1 is two or more hearts without the ace or king |
| i I | holds / does not hold a particular card, given as a rank and a suit in either order and either case: iAH and iha both mean the ♥A, IDa is without the ♦A |
| w | the quality of a suit of six cards or more, graded by how many losers it expects opposite a small singleton: the suit then a band — 0 solid, 1 semi-solid, 2 strong, 3 decent, 4 fair, 5 weak, 6 anaemic, for fewer than 0.4, 1.2, 2, 2.7, 3 and 3.58 expected losers, and more. w12 is strong hearts, six or more of them; w01|w02 is semi-solid or strong spades. The losers are counted over every split of the missing cards, with partner's singleton led and covered as cheaply as a jack or better allows, then the suit played from the top |
| : | five-five or better in two suits. Either a suit to leave out — :0 55+ outside spades, :1 outside hearts, :2 outside diamonds, :3 outside clubs — or a pair by name: :M majors, :m minors, :r red, :b black, :p pointed, :o rounded |
| y Y | is / is not a named whole-hand shape. y0 is a set of shapes that fit a Precision 1♦ in a style where it might include a 4405, y1 is 5+ spades and spades≥hearts, y2 is 5+ hearts and hearts>spades |
Suits are numbered 0 spades, 1 hearts, 2 diamonds, 3 clubs.
Everything is joined by “and” unless you say otherwise.
| | | or |
| . | everything before this must hold, whatever follows |
| ! | reverses what has been said so far |
That second one is the pattern for ruling a hand type out: write the thing you want to exclude, then !.
Ask for something impossible — s4h4d4c4 needs sixteen cards — and you get an error when you run it rather than a wrong answer.
The solver returns a trick count for each deal, and everything after that is arithmetic. So the deals and the solved strains are kept between calls, and changing the vulnerability rescores what is already in hand rather than dealing and solving again. On a five hundred deal run it takes a few hundredths of a second instead of fifteen seconds.
The Advanced page does the same: the vulnerability sits in the spec, but it changes nothing about the cards, so switching it rescores what is in hand. The same applies to dropping a contract, or swapping one for another at a different level in a strain already solved. Only a new strain, or a change to the hands or the deal count, costs anything. Pressing Deal and solve always deals afresh.
Under the results on the Contracts page, beside the download, is a button to open the same setting on the Advanced page. The four seats, the vulnerability and the deal count carry over, and each contract becomes an option with a single leaf — the point from which branches can be added.
It is offered rather than loaded: the Advanced editor keeps what you were working on, so a setting that arrives waits behind a button rather than replacing it.
After a run, the Advanced page draws the tree as it was actually walked. Ribbons show how the deals divide at each branch, and every node opens to give the deals routed there, the mean score, its standard error and how often the contract came home. The probability can be read against the parent or against all the deals, and the value as the score at that node or as its contribution to the option.
A node carrying further branches has no contract of its own, so its score is the deal-weighted mean of what sits below it. A branch no hand ever took shows no deals at all, which is usually a sign the constraint is tighter than intended.
Under the results on the Contracts and Opening leads pages is a button to download the run as a CSV. Contracts gives one row a deal: all four hands, each hand’s point count, and then the tricks and the score for every contract. Opening leads gives one row a deal and lead, since which cards can be led changes from deal to deal.
Nothing is solved again to produce it. The module keeps the trick count for every deal, so the file is written straight out of what the run already knew.
With the Why control set to a seat, the chart under the results breaks the scores down by that hand’s point count. Where there are exactly two contracts it can also show the IMP or matchpoint margin at each point count, chosen with the buttons above the chart. The heading names the vulnerability the figures were solved at.
Note that these are margins, one contract against the other, not the par-relative figures in the table above: the two lines mirror each other and the crossing is the point count where the decision turns over. They need a head to head comparison, so they are offered only with two contracts. With three or more there is a mixture to solve, possibly with a cycle in it, and no single figure belongs to a point count.
A fourth page asks a narrower question: given partner’s range and mine, is the lower call or the higher one better? It answers twice. First across my whole range, which is what to do if I always chose the same. Then hand by hand, holding one of my hands fixed and varying partner.
The second table is sorted, so the hands wanting the higher call sit at the top and the rest at the bottom, with a heavy line where the answer changes. The hands either side of that line are the ones worth learning.
The Lessons page works through one spot at a time. The first is this: partner has raised your hearts to two showing 6–9 and three-card support, you hold a balanced fifteen to eighteen with five hearts, and the question is whether to bid the game.
Type a hand, or tap one of the examples, and it shows the arithmetic rather than a verdict: what the point count alone says, then what each suit is worth beyond that, and the total in IMPs. The numbers come from thirty-two thousand deals solved double dummy. Outside that shape and range it says so rather than guessing.
On the Contracts page, open Why and pick a seat whose constraint sets a point range. The scores are then plotted against that hand’s point count, one line a contract, so you can see where one call overtakes another rather than only which wins on average.
The figure under each point count is how many deals fell there. A hollow marker means fewer than ten, so treat it as a hint rather than a number.
When a solve finishes, the app sends how long it took, how many deals were asked for, and a rough description of the device: the number of processor cores, whether it is a phone, and the browser's major version. That is all.
There is no account, no cookie and no identifier of any kind, and your address is not stored. The only reason for collecting it is to find out how slow the app is on real phones, which is hard to judge from my own. To stop it sending anything, run this in the browser console:
The double dummy solving is done by DDS, by Bo Haglund and Soren Hein — the solver behind most of the double dummy analysis you will have seen elsewhere. It is used unmodified, compiled to WebAssembly so that it runs on your own device.
DDS is copyright © 2006–2014 Bo Haglund and © 2014–2018 Bo Haglund and Soren Hein, and is licensed under the Apache License 2.0. A copy of that licence is included here: dds-LICENSE.txt.
Everything else — the hand generator, the constraint language, the scoring and the game theory — is my own.