File: dealer.pod

package info (click to toggle)
dealer 20161012-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,148 kB
  • sloc: ansic: 2,436; yacc: 630; perl: 400; makefile: 139; sh: 5
file content (133 lines) | stat: -rw-r--r-- 3,691 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
=head1 NAME

dealer - bridge hand generator

=head1 SYNOPSIS

B<dealer> [-023ehuvmqV] [-p I<n>] [-g I<n>] [-s I<seed>] [-l I<n>] [I<inputfile>]

=head1 DESCRIPTION AND EXAMPLE

The program dealer can be used to generate hands for partnerships bidding training or for generating
statistics that can be used to design conventions, or win postmortems.

Running the program involves 3 steps. First, the user has to write an input file containing
hand-descriptions and action. A very simple example would look something like:

    condition shape(north, any 4333 + any 4423) and hcp(north)>=19
    action printall

The first line specifies a condition for the north hand, in this case, a hand with 4333 or 4432 shape
and at least 19 high card points. The second line tells the program to print the 4 hands. The program
reads from standard input, so in principle, it is possible to enter the conditions directly into the
program. Using a file is a lot more practical though, as it allows the user to re-use conditions and
fine-tune the conditions.

Then the program has to be run, it reads the file, looks at the various command line switches and then
produces a number of hands. The output appears on the screen but can be re-directed to a file.

Finally, the user has to look at output and analyze the produced hands. Alternatively, the output can
be used for a playing program.

=head1 OPTIONS

=over

=item B<-e>

Exhaust mode (alpha version).

=item B<-g> I<number>

Maximum number of hands to generate (default is 1000000).

=item B<-l> I<number>

Instead of shuffling, deals are read from the file library.dat by M. Ginsberg
(see [1]). When using this, the tricks() function is quite fast and bridge.exe
from GIB is not used.

[1] ftp://ftp.cirl.uoregon.edu/pub/users/ginsberg/bridge/

=item B<-m>

Shows a progress meter.

=item B<-p> I<number>

Maximum number of hands to produce (default is 40).

=item B<-q>

Suppress PBN output (useful for testing, then switch it back on when generating the "final" sample).

=item B<-s> I<number>

Uses number as the seed for the random generator, running the program twice
with the same seed will produce the same sequence of hands.

=item B<-u>

Select uppercase for the symbols "AKQJT" (default is lowercase).

=item B<-v>

Toggle verbose output, prints statistics at the end of the run (default is on).

=item B<-V>

Emit a version-identification string and exit.

=item B<-h>

Help, prints the syntax.

=item B<-0>

No swapping, each deal is generated normally (shuffling) (default).

=item B<-2>

2-way swapping, after each shuffle another deal is generated by permuting E and
W, leaving N and S in place (NB: not fully compatible with predeal).

=item B<-3>

3-way swapping, after each shuffle another 5 deals are generated by permuting
E, W, and S every which way, leaving N in place (NB: not fully compatible with
predeal).

=back

=head1 BUGS

I would prefer if you did B<not> use this program for generating hands
for tournaments. I have not investigated the random number generation
closely enough for me to be comfortable with that thought.

=head1 SEE ALSO

F</usr/share/doc/dealer/Manual>,
dealer.dpp(6),
deal(6).

=head1 AUTHORS

=over

=item Hans van Staveren <sater@sater.home.cs.vu.nl>

=item Henk Uijterwaal <henk@ripe.net>

=item Manpage: Christoph Berg <cb@df7cb.de>

=back

=head1 COPYRIGHT AND LICENSE

This program is hereby put in the public domain. Do with it whatever
you want, but I would like you not to redistribute it in modified form
without mentioning the fact of modification. I will accept bug reports
and modification requests, without any obligation of course, but fixing
bugs someone else put in is beyond me.