~ubuntu-branches/ubuntu/oneiric/dds/oneiric

« back to all changes in this revision

Viewing changes to debian/dds.6

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Berg
  • Date: 2010-05-23 11:56:03 UTC
  • mto: (11.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: james.westby@ubuntu.com-20100523115603-70eaujm5odn2madi
Tags: upstream-2.0.1+ddd105
ImportĀ upstreamĀ versionĀ 2.0.1+ddd105

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH DDS 6
 
2
.SH NAME
 
3
dds \- double dummy solver frontend
 
4
.SH SYNOPSIS
 
5
.B dds
 
6
.I file
 
7
[
 
8
.I options
 
9
]
 
10
.SH DESCRIPTION
 
11
This program is a command line interface for
 
12
Bo Haglund's Double Dummy Solver (DDS).
 
13
.PP
 
14
It has four useful stand-alone options:
 
15
.IP 1.
 
16
Option \fB\-playdd\fP, to play any deal double dummy.
 
17
.IP 2.
 
18
Option \fB\-giblib\fP. For any deal, to get maximum trick values
 
19
for all possible contracts and leaders
 
20
(these are the 20 trick values as for giblib).
 
21
.IP 3.
 
22
Option \fB\-tricks\fP. For specified deal, to get maximum trick values
 
23
for all possible contracts and leaders
 
24
(these are the 20 trick values as for giblib).
 
25
.IP 4.
 
26
Option \fB\-gen\fP. This is to generate deals,
 
27
without or with up to 20 possible trick values.
 
28
.SH OPTIONS
 
29
.BR \fIfile\fP
 
30
path for 'giblib' input file
 
31
.TP
 
32
Optional arguments [\fIoptions\fP] are one or more of: 
 
33
.TP
 
34
.BR \-v
 
35
verbose where applicable
 
36
.TP
 
37
.BR \-target=\fId\fP
 
38
\-1-13 (default \-1).
 
39
Number of tricks to be won by the side to play, \-1 means that the program 
 
40
shall find the maximum number. For equivalent cards only the highest is returned. 
 
41
.TP
 
42
.BR \-sol=\fId\fP
 
43
solution 1/2/3 (default 3).
 
44
How many card solutions SolveBoard returns:
 
45
 
 
46
target=1-13, solutions=1:  Returns only one of the cards. Its returned score is
 
47
the same as target when target or higher tricks can be won. Otherwise, score
 
48
\-1 is returned if target cannot be reached, or score 0 if no tricks can be
 
49
won.
 
50
 
 
51
target=\-1, solutions=1:  Returns only one of the optimum cards and its score.
 
52
 
 
53
target=0, solutions=1:  Returns only one of the cards legal to play with score
 
54
set to 0.
 
55
 
 
56
target=1-13, solutions=2:  Return all cards meeting target. Their returned
 
57
scores are the same as target when target or higher tricks can be won.
 
58
Otherwise, only one card is returned with score \-1 if target cannot be
 
59
reached, or score 0 for all cards legal to play if no tricks can be won.
 
60
 
 
61
target=\-1, solutions=2:  Return all optimum cards with their scores.
 
62
 
 
63
target=0, solutions=2:  Return all cards legal to play with scores set to 0.
 
64
 
 
65
target irrelevant, solutions=3:  Return all cards that can be legally played
 
66
with their scores in descending  order.
 
67
.TP
 
68
.BR \-mode=\fId\fP
 
69
0/1 (default 1).
 
70
DLL mode of operation. This mode does not affect the DLL if there are multiple
 
71
choices for cards to play. If there is just one card to play, or multiple cards
 
72
that are all equivalent, this mode determines  whether or not the DLL will
 
73
search to find the score.
 
74
 
 
75
mode=0:  Do not search to find the score if the hand to play has only one card,
 
76
including its equivalents, to play. Score is set to \-2 for this card,
 
77
indicating that there are no alternative cards. This mode is very fast.
 
78
 
 
79
mode=1:  Always search to find the score. Even when the hand to play has only
 
80
one card,  with possible equivalents, to play.
 
81
.\"
 
82
.\"mode=2:  As for mode=1, but the transposition table contents is reused from the
 
83
.\"preceding SolveBoard call. Requires that target is the same as for the
 
84
.\"preceding call and is not target=\-1. The parameter solutions must be set to 1,
 
85
.\"deal must be the same, except that deal.first for the second call is partner to
 
86
.\"deal.first in the first call.
 
87
.\"Example:
 
88
.\"1st call:  SolveBoard(deal, 10, 1, 1, &fut1),  deal.first=1, i.e. East leads.
 
89
.\"2nd call:  SolveBoard(deal, 10, 1, 2, &fut2),  deal.first=3, i.e. West leads.  
 
90
.TP
 
91
.BR \-trumps=\fIt\fP
 
92
s/h/d/c/n, this overrides the file (default=n) 
 
93
.TP
 
94
.BR \-leader=\fIl\fP
 
95
w/n/e/s, this overrides the file (default=w) 
 
96
but used only when no cards have been played 
 
97
.TP
 
98
.BR \-deal=\fId\fP
 
99
1/2/... deal number in giblib file.
 
100
Only one of \fB\-deal\fP or \fB\-name\fP should be specified.
 
101
.TP
 
102
.BR \-name=\fIstr\fP
 
103
deal with 'name=str' in giblib file.
 
104
Only one of \fB\-deal\fP or \fB\-name\fP should be specified.
 
105
.TP
 
106
.BR \-playdd
 
107
play deal choosing between DDS alternatives 
 
108
.TP
 
109
.BR \-timeall
 
110
time all deals in file for sol=1/2/3, print stats 
 
111
.TP
 
112
.BR \-timeg=\fIxcn\fP
 
113
 \fIx\fP - hex digit, total tricks by n-s 
 
114
 \fIc\fP - contract s/h/d/c/n 
 
115
 \fIn\fP - number of deals 
 
116
 
 
117
time the first n deals in the giblib file, 
 
118
having total tricks x at contract c, 
 
119
for target=\-1 sol=1 mode=1 
 
120
and for the specified/default leader,
 
121
each deal is validated.
 
122
.TP
 
123
.BR \-giblib=\fId1\fP\-\fId2\fP[\-all]
 
124
validate all deals from d1 to d2 in giblib file 
 
125
for target=\-1 sol=1 mode=1.
 
126
1. if \fB\-all\fP is given, this is done for all of
 
127
the 20 trick values even if some of them are '\-'.
 
128
2. if \fB\-all\fP is not given, this is done only for 
 
129
those trick values which are not '\-'.
 
130
.TP
 
131
.BR \-tricks
 
132
like \fB\-giblib\fP, but for single deal specified 
 
133
by \fB\-name\fP=str \fB\-deal\fP=d or option 
 
134
.TP
 
135
Generate deals: 
 
136
.TP
 
137
.BR \-gen=\fIn\fP
 
138
(required) n=number of deals to generate.
 
139
output is written to a file (see below) 
 
140
.TP
 
141
.BR \-genseed=\fIs\fP
 
142
(default 0) seed for random generator 
 
143
.TP
 
144
.BR \-gencards=\fIc\fP
 
145
(default=52) number of cards generated per deal,
 
146
must be multiple of 4 
 
147
.TP
 
148
.BR \-gentricks=\fIt\fP
 
149
0,1,...,20 (default 1), number of tricks values to set randomly
 
150
.TP
 
151
Generate output is written to a file:
 
152
gen\-\fIgenseed\fP\-\fIndeal\fP\-\fIgencards\fP\-\fIgentricks\fP.txt 
 
153
.SH NOTES
 
154
The program was named ddd by its author. As there is already some other
 
155
ddd package in Debian (the gdb frontend) it was renamed to dds, the name
 
156
of the library used.
 
157
.SH "SEE ALSO"
 
158
dealer(6), deal(6).