There are two versions of the dealer program a simpler, web-based program and a Windows command-line application. Both are available on bridge.vahalia.com, the web-based one for immediate use, and the Windows application for download. While they both use a common engine and underlying syntax, the Web-based application takes UI-based input and only does hand generation, whereas the Windows application (dealer.exe) is run from the command line on a 64-bit Windows OS, requires a manually created rules file (input.txt), and has a built-in double-dummy analyzer that tells you how many tricks can be made in each contract. In this note, we will focus on the command-line application.
Installation is simple. Download the executable from bridge.vahalia.com to a directory of your choice, and run the file from a Windows command prompt. By default, you will create your rules file (called input.txt by default) and all output files in the same folder, although this can be customized when starting the dealer.
Before you run the dealer, you must create a rules file. By default, this file is called input.txt, although you can tell dealer if you wish to use a different name. At a minimum, the file must have the below single line:
$Any := (Points >= 0);
Also, if you want to use any other rules, they must be defined in this file before you can use them. The syntax for the rules file is intuitive, and once you define a rule, you can use it to create more complex rules. UVPrecision.txt is an example rules file that covers the opening bids for the Uresh-Vivek Precision system.
Note: Each rule name must start with $, whether you are defining the rule or using the rule. However, the $ must be omitted when specifying the rule on the command line.
The syntax for starting the dealer is as follows:
dealer options reps mode NorthRule EastRule SouthRule WestRule
|
options . |
A set of options to modify program behavior. You can include any combination of the available options. |
|
reps |
The number of hands to generate |
|
mode |
A number that describes what we want the program to generate (see below) |
|
NorthRule |
The name of the rule that describes the conditions for the North hand. This rule must be defined in the rules file input.txt. Likewise, EastRule, SouthRule, and WestRule are the names of the rules for the East,South, and West hands. |
The following are the permissible values of the mode parameter:
|
1 |
Generate just one hand. This mode takes a single rule (NorthRule), and generates northhands.txt as an output file |
|
2 |
Generate a pair of East-West hands. This mode takes two rules (EastRule and WestRule), and generates three output files easthands.txt, westhands,txt, and bothhands.txt |
|
4 |
Generate all four hands. Requires four rules to be supplied, for North, East, South,and West respectively. This will generate several files the hands themselves will be generated in northhands.txt, easthands.txt, southhands.txt, westhands.txt, and allhands.txt, and also in a PBN format file output.pbn. Finally, it will generate a file called output.csv, which will enumerate the points and shapes of each hand, plus the number of tricks makeable in each denomination. |
|
5 |
Generate all four hands, with one of them (the North hand) known. Works similarly to mode 4, except that instead of NorthRule, you specify the known hand in PBN format (e.g., AK832.QT54.62.AJ) |
The following are the available options. Each option is optional, but all options must be specified before the reps parameter.
|
-i inputfile |
Specify a different rules file (default is input.txt) |
|
-d directory |
Look for rules file and create output files in specified directory |
|
-p prefix |
Change the prefix for the pbn and csv files from the default of output.pbn and output.csv. For instance, if we give the option -p 1C1H, then the output files will be 1C1H.pbn and 1C1H.csv |
|
-f filter |
Do not analyze the specified strains. The filter is a five-digit string where each digit represents S,H,D,C and NT respectively. A 1 means that we should skip that denomination, and a 0 means we should analyze it. Hence, -f 11000, for instance, would only analyze D, C, and NT contracts. |
|
-D declarer |
Specifies who is the declarer (valid values are N, E, S, and W). Default is North (N). |
Generate 10 deals, with all four hands dealt, with no restrictions on any hand
Generate 100 deals, with all four hands dealt. The North hand is specified by the rule 1C, and the South hand by the rule 1C1D. No restrictions on East or West hands. The rules are specified in the file precision.txt.
Generate 100 deals, with the North hand specified as A43.KQ987.AT76.5, and the South hand by the rule 1N. No restrictions on East or West hands.