1
--- dealer-0.20040530.orig/dealer.dpp.pod
2
+++ dealer-0.20040530/dealer.dpp.pod
6
+dealer.dpp - preprocessor for dealer scripts
10
+B<dealer.dpp> [I<inputfile>]
14
+dealer.dpp stands for dealer-pre-processor. Its main purpose it to preprocess
15
+input files for Hans van Staveren's great dealer program.
19
+The program expands shape specifications of the form:
21
+ shape{COMPASS, shp1 + shp2 + ... + shpM - shm1 - ... - shmN}
23
+=head2 regular shapes
25
+7xxx, 4432, 4xx5 have the same meaning as in original dealer.
27
+=head2 the `at least' operator
29
+whenever you put a `+' after a suit-length, it means `at least'.
31
+ shape{north, 5+xx5+}: at least 5/5 in the blacks,
32
+ -->shape(north,5xx5 + 5xx6 + 6xx5 + 5xx7 + 6xx6 + 7xx5 + 5008 + 6007
35
+=head2 the `at most' operator:
37
+same as the `at least', just use a `-':
39
+ shape{north, 2-xxx}: at most 2 spades,
40
+ -->shape(north,0xxx + 1xxx + 2xxx)
42
+=head2 the `range' operator:
44
+the range operator operates on a single suit. It comes with [],
47
+ shape{north, x[3-5]x[13]}: (3 to 5) hearts, and one or 3 clubs
48
+ -->shape(north,x3x1 + x4x1 + x3x3 + x5x1 + x4x3 + x5x3)
50
+Note that shape{north, 3-xxx} is equivalent to shape{north,[0-3]xxx}
51
+You can write compound ranges if you want:
53
+ shape{north, [013-68]xxx} means: 0,1,3,4,5,6 or 8 spades.
55
+=head2 the `permutation' operator:
57
+the permutation operator will appears as () like in the WBF rules
58
+of specifying shapes.
60
+ shape{north, (4432)}: any 4432 hand.
61
+ -->shape(north,any 4432)
63
+what's best is that the () operator can operate on restricted groups
66
+ shape{north, 5s(431)}: 5 spades, the others suits being (431).
67
+ -->shape(north,5134 + 5314 + 5143 + 5341 + 5413 + 5431)
69
+What you have to do is:
75
+specify the suit names (s,h,d,c in english) in the left part of
76
+the shape, in any order,
80
+and enclose the rest of the permutation into () in the right part.
84
+A (complicated) example:
86
+ shape{north, 4+c3+d(2+2+)}: at least 5 clubs, at least 3 diamonds,
88
+ -->shape(north,3334 + 4234 + 2434 + 3244 + 2344 + 2254 + 3235 + 2335 + 2245 + 2236)
90
+=head2 the `Major' operator:
92
+has to be used together with the () operator. `M' stands for `a major'
93
+The `M' operator can only be used in the left part (never put a M
96
+ shape{north, 5M(xxx)}
97
+ -->shape(north,x5xx + 5xxx)
99
+ shape{north, 5+M3+c(31)}
100
+ -->shape(north,1534 + 3514 + 1633 + 3613 + 5134 + 5314 + 6133 + 6313)
102
+=head2 the `minor' operator:
104
+same as the `Major' operator, but in lowercase `m'.
106
+ shape{north, 5M5m(xx)}
107
+ -->shape(north,x5x5 + 5xx5 + x55x + 5x5x)
109
+=head2 the `conditional' operator:
111
+you've got the possibility of specifying complex conditions to be
112
+verified that cannot be simply expressed by other operators. In
113
+order to do that, you use the `:' operator, just after the
114
+atomic-shape specification:
116
+ shape{north, shp1:condition1,condition2,...}
118
+The conditions use the letters (s,h,d,c) as variables for the suit
119
+lengths, and the usual C-operators (*,+,-,/,>,<,==,!,?, and so on).
120
+Note that the `,' stands for the `and-logical' operator. You can
121
+use `or' for the `or-logical' operator.
123
+ shape{north, 4+s4+h(xx):d>c,h+s==10}
124
+ -->shape(north,6421 + 6430 + 5521 + 5530 + 4621 + 4630)
130
+=item a balanced hand
134
+=item a french 1H opening
136
+ x5+xx:h>s,h>=d,h>=c
138
+=item my No_trump opening
141
+ n1NT = (hn > 14 and hn < 18 and shape{north, 5m(332) + 5m2s(42)} )
142
+ or (hn > 13 and hn < 17 and shape{north, 6m(322)} )
143
+ or (hn > 15 and hn < 18 and shape{north, 5M(332)} )
144
+ or (hn > 15 and hn < 19 and shape{north, (4432) + (4333)} )
151
+F</usr/share/doc/dealer/Manual>.
157
+=item Francois Dellacherie
159
+=item Manpage: Christoph Berg <cb@df7cb.de>
165
+This program is hereby put in the public domain. Do with it whatever
166
+you want, but I would like you not to redistribute it in modified form
167
+without mentioning the fact of modification. I will accept bug reports
168
+and modification requests, without any obligation of course, but fixing
169
+bugs someone else put in is beyond me.
171
--- dealer-0.20040530.orig/dealer.pod
172
+++ dealer-0.20040530/dealer.pod
176
+dealer - bridge hand generator
180
+B<dealer> [-023ehuvmqV] [-p I<n>] [-g I<n>] [-s I<seed>] [-l I<n>] [I<inputfile>]
182
+=head1 DESCRIPTION AND EXAMPLE
184
+The program dealer can be used to generate hands for partnerships bidding training or for generating
185
+statistics that can be used to design conventions, or win postmortems.
187
+Running the program involves 3 steps. First, the user has to write an input file containing
188
+hand-descriptions and action. A very simple example would look something like:
190
+ condition shape(north, any 4333 + any 4423) and hcp(north)>=19
193
+The first line specifies a condition for the north hand, in this case, a hand with 4333 or 4432 shape
194
+and at least 19 high card points. The second line tells the program to print the 4 hands. The program
195
+reads from standard input, so in principle, it is possible to enter the conditions directly into the
196
+program. Using a file is a lot more practical though, as it allows the user to re-use conditions and
197
+fine-tune the conditions.
199
+Then the program has to be run, it reads the file, looks at the various command line switches and then
200
+produces a number of hands. The output appears on the screen but can be re-directed to a file.
202
+Finally, the user has to look at output and analyze the produced hands. Alternatively, the output can
203
+be used for a playing program.
211
+Exhaust mode (alpha version).
213
+=item B<-g> I<number>
215
+Maximum number of hands to generate (default is 1000000).
217
+=item B<-l> I<number>
219
+Instead of shuffling, deals are read from the file library.dat by M. Ginsberg
220
+(see [1]). When using this, the tricks() function is quite fast and bridge.exe
221
+from GIB is not used.
223
+[1] ftp://ftp.cirl.uoregon.edu/pub/users/ginsberg/bridge/
227
+Shows a progress meter.
229
+=item B<-p> I<number>
231
+Maximum number of hands to produce (default is 40).
235
+Suppress PBN output (useful for testing, then switch it back on when generating the "final" sample).
237
+=item B<-s> I<number>
239
+Uses number as the seed for the random generator, running the program twice
240
+with the same seed will produce the same sequence of hands.
244
+Select uppercase for the symbols "AKQJT" (default is lowercase).
248
+Toggle verbose output, prints statistics at the end of the run (default is on).
252
+Emit a version-identification string and exit.
256
+Help, prints the syntax.
260
+No swapping, each deal is generated normally (shuffling) (default).
264
+2-way swapping, after each shuffle another deal is generated by permuting E and
265
+W, leaving N and S in place (NB: not fully compatible with predeal).
269
+3-way swapping, after each shuffle another 5 deals are generated by permuting
270
+E, W, and S every which way, leaving N in place (NB: not fully compatible with
277
+I would prefer if you did B<not> use this program for generating hands
278
+for tournaments. I have not investigated the random number generation
279
+closely enough for me to be comfortable with that thought.
283
+F</usr/share/doc/dealer/Manual>,
291
+=item Hans van Staveren <sater@sater.home.cs.vu.nl>
293
+=item Henk Uijterwaal <henk@ripe.net>
295
+=item Manpage: Christoph Berg <cb@df7cb.de>
299
+=head1 COPYRIGHT AND LICENSE
301
+This program is hereby put in the public domain. Do with it whatever
302
+you want, but I would like you not to redistribute it in modified form
303
+without mentioning the fact of modification. I will accept bug reports
304
+and modification requests, without any obligation of course, but fixing
305
+bugs someone else put in is beyond me.