~ubuntu-branches/ubuntu/utopic/dds/utopic-proposed

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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
Release Notes DDS 1.0.1
-----------------------
Includes support for reuse of the transposition table
contents for a subsequent search. (This idea was brought forward 
independently by Alex Martelli and Flip Cronje.)
When setting the SolveBoard solutions to 2, the transposition 
table contents will be reused when searching for alternative cards,
giving a slightly decreased search time in most cases, in a few cases
the decrease is substantial.
Earlier the contents of the transposition table was always emptied 
between searches.

The way to control whether or not to empty the transposition table
is to properly set the parameter mtd in the InitSearch function:

mtd=FALSE means that the transposition table is emptied, mtd=TRUE
that it is not emptied.


Release Notes DDS 1.0.2
-----------------------
Includes a bug fix for the case when the SolveBoard parameter
"solutions" is set to 3. SolveBoard did not handle correctly the case
when the scores of the alternative cards were a mix of zero and 
non-zero. This is now fixed in 1.0.2.


Release Notes DDS 1.0.3
----------------------- 
Includes:
a) An improvement of the move ordering algorithm. When LHO ruffs,
this is now given a low weight if the highest rank of RHO beats both
the rank of the leading card and the highest rank of the leading suit
at the partner of the leading hand, assuming that the partner of the 
leading hand is not void in the suit of the leading card.
If these conditions do not hold, the weight for the LHO ruffing card is 
high.
b) For the SolveBoard parameter solutions=3, reuse of the transposition
table contents between card searches have been added.
a) and b) together give on the average an improvement performance. 

Release Notes DDS 1.0.4
-----------------------
When introducing the possibility of reusing the transposition table
between subsequent searches in 1.0.1, unfortunately a bug was introduced 
as well. It occassionally gives wrong scores when evaluating the last hand 
of the trick using solutions=2 or 3.  
This bug is fixed in 1.0.4.

Release Notes DDS 1.0.5
--------------------------
1) About 25% speed improvement due to a search algorithm improvement:
For moves generated in the search tree, only one "small" card move per hand 
and suit is generated. By "small" card is meant a card with a rank that is 
not winning due to its rank value.
Earlier all "small" cards generated their own moves.
This improvement comes from a tip by Hans Kuijf.

2) The size of the transposition table has been increased by 25%. This was 
done after realizing that for some extreme deals, rarely occuring, when
solutions=2 and 3 the transposition table could get completely filled up, 
making the search time extremely long for those cases.
The increased transposition table size should still fit well inside a 256 MB
machine.

3) Parameter mode=2 indicates that the transposition table is reused from an
earlier SolveBoard call. It is restricted to the case where the same conditions
apply for the 2 calls, except that the leading hand in the second call is the
partner to the leading hand in the first call.
I.e. same deal incl same trump suit, same target (not equal to -1), solutions=1. 


Release Notes DDS 1.0.6
--------------------------
1) A bug has been fixed in the DDS start up code.
The bug did not affect the accuracy of the solver.
Thanks to Fabien Bradmetz for spotting this!

2) About 10% increased speed due to improvements in Quick Tricks. 

3) An error code has been added for checking the input of of cards earlier played
in the trick.

4) A document (mode2.txt) describes source code examples how to call
SolveBoard using the parameter mode set to 2.


Release Notes DDS 1.1.0
---------------------------
1) Performance improvement giving a speed of about twice that of 1.0.6.

2) Redesign of the transposition table solution, see algorithm description.

3) Improvements in the Quicktricks algorithm, see algorithm description.

4) Dump in text file of SolveBoard parameters if SolveBoard returns with
error code.


Release Notes DDS 1.1.1
---------------------------
1) For target=-1 and solutions=1/2/3, the transposition table contents is now
reused also when SolveBoard is called with a new target value.

2) Slight improvement of the QuickTricks algorithm.

3) Moderate speed improvement compared to 1.1.1.


Release Notes DDS 1.1.2
---------------------------
1) Increased performance (about 15%) due to improved
algorithm for move ordering. For more information, look in the
algorithm description.


Release Notes DDS 1.1.3
---------------------------
1) Compiles with Visual C++ 2005 Express edition
2) Some improvements in move ordering, quick tricks
and the new later tricks algorithms.
3) Total improvement about 20% including the faster
code generated by Visual C++ and the algorithm 
improvements.


Release Notes DDS 1.1.4
---------------------------
Improvements at usage of the SolveBoard parameter
mode set to 2.
The mode parameter can now be set to 2 for SolveBoard
calls with parameter target set to -1 or a value 0-13,
and solutions set to 1, 2 or 3.
Following the first SolveBoard call with mode=1, mode
can be set to 2 for any further SolveBoard call for
the same deal, also when an opponent hand leads the trick.

If scores are to be calculated for all 4 possible leading hands
of the deal, 1 SolveBoard call can be made with mode=1, and the
other 3 SolveBoard calls for the other 3 leading hands can be
made with mode=2.
Compared to dds 1.1.3, the better support of mode=2 means improved
calculation speed.
Compared to using only mode=1 at calling Solveboard 4 times, each
time for each alternative leading hand, the calculation time is
roughly halfed using mode=2 as described above. 


Release Notes DDS 1.1.5
---------------------------  
A correction has been made removing a risk of DD value miscalculation.
The fault has not however yet showed up as far as I know.

A survival mechanism has been added to handle the situation if the
transposition table gets full:
The transposition table is emptied.
Before this, a full transposition table would in practise lock up the program.
Therefore the present size of the transposition table is quite large (393 MB)
to handle the most difficult deals.
This could lead to extensive memory swapping with the hard drive if the
PC RAM size is 256 MB or less, slowing down the program.
With the new survival mechanism, the program will not lockup at a full
transposition table. The calculation time will increase because of the extra time 
to build up stored positions in the table, but  the increase will be reasonable.
This means that DDS should be possible to run with such small PC RAM sizes 
as 64 MB (this has not been tested though).


Release Notes DDS 1.1.6
---------------------------  
A bug has been fixed. It could show up (but haven't as far as I know)
after the transposition table got full. 
Only a minor part of the maximum transposition table, about 30 MB, is 
now allocated at initialization, if more is needed it is dynamically 
added as need arises. Each incremental addition is about 2 MB. 
This continues until the maximum allowed space is reached, for 512 MB 
PC about 400 MB. Then the incrementally added transposition table pieces 
are wiped out and the initially allocated table is cleared. 


Release Notes DDS 1.1.7
---------------------------
A bug fix and recoding of the dynamic transposition table implementation. 


Release Notes DDS 1.1.8
--------------------------- 
The transposition table solution has been redesigned.
Each "winning ranks node" now contains all ranks for one suit.

When a new transposition table entry is created, it is now
positioned at the front of the alternative "winning ranks node"
list rather than at the end as before.

Each leading hand has now own root pointers pointing to
the "suit lengths combination" tree.

Some changes in QuickTricks.


Release Notes DDS 1.1.9
-----------------------
Speed increase 10-15% compared to 1.1.8.
Main improvements from 1) and 2) below.

1) Much faster initialization of variable rel
(struct type relRanksType).
Implementation done by Thomas Andrews.

2) Move generation:
If the hand-to-play is trick leading hand, the first
positions in the move list now come each from a different suit.
In 1.1.8, the first positions were groups of 2 cards from
each suit.

3) DismissX renamed to NextMove. A bug was corrected
in NextMove, increasing performance. (The bug did not give
incorrect result.)
The bug was found by Joël Bradmetz.

4) The function CountOnes replaced by a table look up.
Implementation by Thomas Andrews.

5) The handStore variable replaced by a macro. Based on
an implementation by Thomas Andrews.

6) The WinAdapt function replaced by a table look up.

7) A new table highestRank gives the highest rank from a
bitmap of ranks. Makes functions UpdateWinner, UpdateSecondBest
and QuickTricks slightly faster.



Release Notes DDS 2.0.0
-----------------------
A bug was fixed.
SolveBoard is now thread-safe.
The SolveBoard parameter "mode" no longer needs to be set to 2.
DDS automatically detect situations when the transposition
table contents can be reused.
Used with a single thread, DDS 2.0.0 has about the same speed as DDS 1.1.9.
Used with 2 parallel threads, DDS 2.0.0 is twice as fast as the single
thread case. 

A new function, CalcDDtable, has been added.
CalcDDtable calls SolveBoard using parallel threads. The number of
parallel threads is the same as the number of processor cores.
CalcDDtable calculates the double dummy values of the initial 52 cards
for all the 20 trump suit/leading hand combinations. 


Release Notes DDS 2.0.1
-----------------------
In 2.0.0, the contents of the transposition table could be erronously
be reused when the previous position contained a different number of
cards. This was caused by an erroneous implementation of the
deal similarity test. This bug was fixed by removing the similarity test.

The DDS version number is defined by a #define statement in dll.h. 


Release Notes DDS 2.1.0
-----------------------
Added OpenMP as multi-thread support for CalcDDtable when compiling with 
gcc 4.4.0 or later.

Added a similarity deals test function for reuse of the transposition
table contents when the current deal is similar to the previous deal. 


Release Notes DDS 2.1.1
-----------------------
The maximum number of threads is configurable depending on the size of the
physical memory. The configuration is either done automatically by reading
out the physical memory size by the operating system, or by supplying
parameter values in InitStart.


Release Notes DDS 2.1.2
-----------------------
2 new callable functions have been added:
SolveBoardPBN and CalcDDtablePBN.
They both accept PBN format for the remaining cards in the deal information
instead of the bit codes.

Code improvements have been done concerning quick tricks detection and move
ordering. 2.1.2 is about 10% faster than 2.1.1.


Release Notes DDS 1.1.12
------------------------
2 new callable functions have been added:
SolveBoardPBN and CalcDDtablePBN.
They both accept PBN format for the remaining cards in the deal information
instead of the bit codes.

Code improvements have been done concerning quick tricks detection and move
ordering. 1.1.12 is about 15-20% faster than 1.1.11.