From 375e32b488d5fb19c1e7deffca7e3fd48105d056 Mon Sep 17 00:00:00 2001 From: Bo Haglund Date: Sat, 23 Feb 2013 15:50:54 -0500 Subject: [PATCH] historical commit dds 1.1.18 --- DLL-dds_1117_m.rtf => DLL-dds_1118_m.rtf | 66 ++-- DLL-dds_1118plus_a.rtf | 353 ++++++++++++++++++++ GPL.txt | 340 ------------------- LICENSE-2_0.txt | 201 ++++++++++++ dds.cpp | 395 +++++++++++++++-------- dll.h | 2 +- release_notes.txt | 5 + 7 files changed, 861 insertions(+), 501 deletions(-) rename DLL-dds_1117_m.rtf => DLL-dds_1118_m.rtf (92%) create mode 100644 DLL-dds_1118plus_a.rtf delete mode 100644 GPL.txt create mode 100644 LICENSE-2_0.txt diff --git a/DLL-dds_1117_m.rtf b/DLL-dds_1118_m.rtf similarity index 92% rename from DLL-dds_1117_m.rtf rename to DLL-dds_1118_m.rtf index 4e1f1e69..da163c2e 100644 --- a/DLL-dds_1117_m.rtf +++ b/DLL-dds_1118_m.rtf @@ -42,9 +42,9 @@ heading 2;}{\s3\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\li \widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1053\langfe1053\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1053\langfenp1053 \snext11 \ssemihidden \sunhideused Normal Table;}{\*\cs15 \additive \rtlch\fcs1 \ab\af0\afs32 \ltrch\fcs0 \b\fs32\kerning32\loch\f31502\hich\af31502\dbch\af31501 \sbasedon10 \slink1 \slocked \spriority9 Rubrik 1 Char;}{\*\cs16 \additive \rtlch\fcs1 \ab\ai\af0\afs28 \ltrch\fcs0 \b\i\fs28\loch\f31502\hich\af31502\dbch\af31501 \sbasedon10 \slink2 \slocked \ssemihidden \spriority9 Rubrik 2 Char;}{\*\cs17 \additive \rtlch\fcs1 \ab\af0\afs26 \ltrch\fcs0 \b\fs26\loch\f31502\hich\af31502\dbch\af31501 -\sbasedon10 \slink3 \slocked \ssemihidden \spriority9 Rubrik 3 Char;}}{\*\rsidtbl \rsid812199\rsid1927002\rsid10776626}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info -{\operator Bo Haglund}{\creatim\yr2012\mo10\dy22\hr23\min26}{\revtim\yr2012\mo11\dy7\hr16\min11}{\version3}{\edmins0}{\nofpages4}{\nofwords1213}{\nofchars6432}{\nofcharsws7630}{\vern49275}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/200 -3/wordml}}\paperw12240\paperh15840\margl1417\margr1417\margt1417\margb1417\gutter0\ltrsect +\sbasedon10 \slink3 \slocked \ssemihidden \spriority9 Rubrik 3 Char;}}{\*\rsidtbl \rsid812199\rsid1927002\rsid10306343\rsid10776626}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0 +\mnaryLim1}{\info{\operator Bo Haglund}{\creatim\yr2012\mo10\dy22\hr23\min26}{\revtim\yr2013\mo2\dy23\hr12\min44}{\version4}{\edmins0}{\nofpages4}{\nofwords1213}{\nofchars6432}{\nofcharsws7630}{\vern49275}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.co +m/office/word/2003/wordml}}\paperw12240\paperh15840\margl1417\margr1417\margt1417\margb1417\gutter0\ltrsect \widowctrl\ftnbj\aenddoc\hyphhotz425\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120 \dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot1927002 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}} {\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}} @@ -55,25 +55,25 @@ Normal Table;}{\*\cs15 \additive \rtlch\fcs1 \ab\af0\afs32 \ltrch\fcs0 \b\fs32\k \par \hich\af1\dbch\af31505\loch\f1 Latest DLL issue with this description is available at }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 HYPERLINK "http://www.bahnhof.se/wb758135/"}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid1927002 {\*\datafield 00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b5800000068007400740070003a002f002f007700770077002e006200610068006e0068006f0066002e00730065002f00770062003700350038003100330035002f000000795881f43b1d7f48af2c825dc48527630000 -0000a5ab000000}}}{\fldrslt {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\ul\cf2\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 http://www.bahnhof.se/wb758135/}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { +0000a5ab00000020}}}{\fldrslt {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\ul\cf2\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 http://www.bahnhof.se/wb758135/}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj { \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \par \par \par }\pard\plain \ltrpar\s2\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1053\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1053\langfenp1053 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\ul\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 Short description of the DLL functions supported in Do}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 -\b\fs20\ul\cf1\lang1033\langfe1053\langnp1033\insrsid1927002\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 uble Dummy Problem Solver 1.1.1}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\ul\cf1\lang1033\langfe1053\langnp1033\insrsid10776626 -\hich\af1\dbch\af31505\loch\f1 7}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\ul\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 +\b\fs20\ul\cf1\lang1033\langfe1053\langnp1033\insrsid1927002\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 uble Dummy Problem Solver 1.1.1}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\ul\cf1\lang1033\langfe1053\langnp1033\insrsid10306343 +\hich\af1\dbch\af31505\loch\f1 8}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\ul\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1053\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1053\langfenp1053 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \par }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1053\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1053\langfenp1053 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 Callable functions \par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1053\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1053\langfenp1053 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 -\par \hich\af1\dbch\af31505\loch\f1 extern "C\hich\af1\dbch\af31505\loch\f1 " __declspec(dllimport) int __stdcall SolveBoard(struct deal, int target, +\par \hich\af1\dbch\af31505\loch\f1 extern "\hich\af1\dbch\af31505\loch\f1 C" __declspec(dllimport) int __stdcall SolveBoard(struct deal, int target, \par \hich\af1\dbch\af31505\loch\f1 int solutions, int mode, struct futureTricks *futp); \par \par \hich\af1\dbch\af31505\loch\f1 extern "C" __declspec(dllimport) int __stdcall SolveBoardPBN(struct dealPBN, int target, -\par \hich\af1\dbch\af31505\loch\f1 int solutions, int mode, \hich\af1\dbch\af31505\loch\f1 struct futureTricks *futp); +\par \hich\af1\dbch\af31505\loch\f1 int solutions, int mode,\hich\af1\dbch\af31505\loch\f1 struct futureTricks *futp); \par \par \par }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1053\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1053\langfenp1053 {\rtlch\fcs1 @@ -83,8 +83,8 @@ HYPERLINK "http://www.bahnhof.se/wb758135/"}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \par \hich\af1\dbch\af31505\loch\f1 Before SolveBoard can be called, a structure of type "futureTricks" must be declared. \par \par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 SolveBoard}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 returns a status integer, "no fault" means the DLL supplies the trick data in the "futureTricks" type structure.\line St\hich\af1\dbch\af31505\loch\f1 -atus codes: +\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 returns a status integer, "no fault" means the DLL supplies the trick data in the "futureTricks" type structure.\line S\hich\af1\dbch\af31505\loch\f1 +tatus codes: \par \hich\af1\dbch\af31505\loch\f1 1=No fault, \par \hich\af1\dbch\af31505\loch\f1 -1=Unknown fault, \par \hich\af1\dbch\af31505\loch\f1 -2=No of cards = 0, @@ -105,16 +105,16 @@ atus codes: \par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 int trump; /* I.e. which suit that is trump or if contract is NT, Spades=0, Hearts=1, Diamonds=2, Clubs=3, NT=4 */}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af0\dbch\af31505\loch\f0 -\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 int first; /* 0-3, 0=North, 1=East, 2=South, 3=West , Leading hand for the trick.*/}{\rtlch\fcs1 \af0\afs20 -\ltrch\fcs0 \f0\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af0\dbch\af31505\loch\f0 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 int f\hich\af1\dbch\af31505\loch\f1 +irst; /* 0-3, 0=North, 1=East, 2=South, 3=West , Leading hand for the trick.*/}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af0\dbch\af31505\loch\f0 \par \hich\af0\dbch\af31505\loch\f0 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 int currentTrickSuit[3]; /* 0-2 for up to 3 cards in the order played */ \par \hich\af1\dbch\af31505\loch\f1 int currentTrickRank[3]; /* 2-14 for up to 3 cards */}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 -\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 unsigned int remainCards\hich\af1\dbch\af31505\loch\f1 [4][4]; /* 1}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 unsigned int remainCards[4][4]; \hich\af1\dbch\af31505\loch\f1 /* 1}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\super\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 st}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 index hand (0-3), 2}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\super\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 nd}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 \hich\f1 index suit (0-3), values as bitstring of ranks bit 0=0, bit 1=0, bit 2=rank 2, \'85\'85\'85\loch\f1 . bit 14=rank 14, bit 15=0}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af0\dbch\af31505\loch\f0 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 -\hich\af1\dbch\af31505\loch\f1 for cards remaining after already played cards (cards already played to the current trick are not included in \hich\af1\dbch\af31505\loch\f1 this bitstring). \line +\hich\af1\dbch\af31505\loch\f1 for cards remaining after already played cards (cards already played to the current trick are not included in this bit\hich\af1\dbch\af31505\loch\f1 string). \line The decimal value for a card then range between 4 (=rank 2) and 16384 (Ace=rank 14). */}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af0\dbch\af31505\loch\f0 \par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \}\hich\af1\dbch\af31505\loch\f1 ;}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af0\dbch\af31505\loch\f0 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 @@ -122,34 +122,34 @@ atus codes: \par \hich\af1\dbch\af31505\loch\f1 \hich\f1 Parameter \'94}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 target}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \loch\af1\dbch\af31505\hich\f1 \'94\loch\f1 is the number of tricks to be won by the side to play, -1 means that the program}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af0\dbch\af31505\loch\f0 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 -shall find the maximum number. For equiva\hich\af1\dbch\af31505\loch\f1 lent cards only the highest is returned. +shall find the maximum number. For equivalent ca\hich\af1\dbch\af31505\loch\f1 rds only the highest is returned. \par \line \hich\af1\dbch\af31505\loch\f1 \hich\f1 Parameter \'94}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 solutions}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \loch\af1\dbch\af31505\hich\f1 \'94\loch\f1 defines how many card solutions that SolveBoard must return: -\par \hich\af1\dbch\af31505\loch\f1 target=1-13, solutions=1: Returns only one of the cards. Its returned score is the same as target whentarget or higher tricks \hich\af1\dbch\af31505\loch\f1 can be won. Otherwise, score \hich\f1 \endash \loch\f1 +\par \hich\af1\dbch\af31505\loch\f1 target=1-13, solutions=1: Returns only one of the cards. Its returned score is the same as target whentarget or higher tricks can be w\hich\af1\dbch\af31505\loch\f1 on. Otherwise, score \hich\f1 \endash \loch\f1 1 is returned if target cannot be reached, or score 0 if no tricks can be won. \line target=-1, solutions=1: Returns only one of the optimum cards and its score. -\par \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 target=0, solutions=1: Returns only one of the cards legal to p -\hich\af1\dbch\af31505\loch\f1 lay with score set to 0.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \line \hich\af1\dbch\af31505\loch\f1 +\par \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 target=0, solutions=1: Returns only one of the cards legal to play with +\hich\af1\dbch\af31505\loch\f1 score set to 0.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \line \hich\af1\dbch\af31505\loch\f1 target 1-13, solutions=2: Return all cards meeting target. Their returned scores are the same as target when target or higher tricks can be won. Otherwise, only one card is returned with score \hich\f1 \endash \loch\f1 -1 if target cannot be reached, or \hich\af1\dbch\af31505\loch\f1 score 0 for all cards legal to play if no tricks can be won.\line target \hich\f1 \endash \loch\f1 1, solutions=2: Return all optimum cards with their scores. +1 if target cannot be reached, or score 0 \hich\af1\dbch\af31505\loch\f1 for all cards legal to play if no tricks can be won.\line target \hich\f1 \endash \loch\f1 1, solutions=2: Return all optimum cards with their scores. \par \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 target=0, solutions=2: Return all cards legal to play with scores set to 0}{ \rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf6\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \line \hich\af1\dbch\af31505\loch\f1 - target irrelevant, solutions=3: Return all\hich\af1\dbch\af31505\loch\f1 cards that can be legally played with their scores in descending order. + target irrelevant, solutions=3: Return all cards t\hich\af1\dbch\af31505\loch\f1 hat can be legally played with their scores in descending order. \par \par \hich\af1\dbch\af31505\loch\f1 \hich\f1 Parameter \'94}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 mode}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \loch\af1\dbch\af31505\hich\f1 \'94\loch\f1 defines the DLL mode of operation.\line - mode=0: Do not search to find the score if the hand to play has only one card, including its equivalents, to play. Score is se\hich\af1\dbch\af31505\loch\f1 t to \hich\f1 \endash \loch\f1 -2 for this card, indicating that there are no alternative cards. If there are multiple choices for cards to play, search is done to find the score. This mode is very fast but you don\hich\f1 \rquote \loch\f1 t -\par \hich\af1\dbch\af31505\loch\f1 mode=1: Always }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1033\langfe1053\langnp1033\insrsid812199 \hich\af1\dbch\af31505\loch\f1 search to find the score. Even when the hand t\hich\af1\dbch\af31505\loch\f1 -o play has only one card, with possible equivalents, to play. For both mode=0 and mode=1: If the preceding SolveBoard call had the same trump suit and the same deal, except for deal.first, then the transposition table contents is reused from the precedi -\hich\af1\dbch\af31505\loch\f1 n\hich\af1\dbch\af31505\loch\f1 g SolveBoard call. Setting mode=2 is no longer needed in this case, but can still be done for backwards compatibility.\line - mode=2: As for mode=1, but the transposition table contents is reused from the preceding SolveBoard call. It is the responsibility of\hich\af1\dbch\af31505\loch\f1 \hich\af1\dbch\af31505\loch\f1 -the programmer using the DLL to ensure that reusing the table is safe in the actual situation. Example: Deal is the same, except for deal.first. Trump suit is the same. + mode=0: Do not search to find the score if the hand to play has only one card, including its equivalents, to play. Score is set to \hich\f1 \endash \loch\f1 2 \hich\af1\dbch\af31505\loch\f1 +for this card, indicating that there are no alternative cards. If there are multiple choices for cards to play, search is done to find the score. This mode is very fast but you don\hich\f1 \rquote \loch\f1 t +\par \hich\af1\dbch\af31505\loch\f1 mode=1: Always }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1033\langfe1053\langnp1033\insrsid812199 \hich\af1\dbch\af31505\loch\f1 search to find the score. Even when the hand to play h\hich\af1\dbch\af31505\loch\f1 +as only one card, with possible equivalents, to play. For both mode=0 and mode=1: If the preceding SolveBoard call had the same trump suit and the same deal, except for deal.first, then the transposition table contents is reused from the preceding Solve +\hich\af1\dbch\af31505\loch\f1 B\hich\af1\dbch\af31505\loch\f1 oard call. Setting mode=2 is no longer needed in this case, but can still be done for backwards compatibility.\line + mode=2: As for mode=1, but the transposition table contents is reused from the preceding SolveBoard call. It is the responsibility of the pro\hich\af1\dbch\af31505\loch\f1 g\hich\af1\dbch\af31505\loch\f1 +rammer using the DLL to ensure that reusing the table is safe in the actual situation. Example: Deal is the same, except for deal.first. Trump suit is the same. \par }\pard \ltrpar\ql \fi720\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1033\langfe1053\langnp1033\insrsid812199 \hich\af1\dbch\af31505\loch\f1 1}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1033\langfe1053\super\langnp1033\insrsid812199 \hich\af1\dbch\af31505\loch\f1 st}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1033\langfe1053\langnp1033\insrsid812199 \hich\af1\dbch\af31505\loch\f1 call: SolveBoard(deal, -1, 1, 1, &fut, 0), deal.first=1, i.e. East leads. \par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1033\langfe1053\langnp1033\insrsid812199 \hich\af1\dbch\af31505\loch\f1 \tab 2}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 -\fs20\lang1033\langfe1053\super\langnp1033\insrsid812199 \hich\af1\dbch\af31505\loch\f1 nd}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1033\langfe1053\langnp1033\insrsid812199 \hich\af1\dbch\af31505\loch\f1 \hich\af1\dbch\af31505\loch\f1 -call: SolveBoard(deal, -1, 1, 2, &fut, 0), deal.first=2, i.e. South leads. +\fs20\lang1033\langfe1053\super\langnp1033\insrsid812199 \hich\af1\dbch\af31505\loch\f1 nd}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1033\langfe1053\langnp1033\insrsid812199 \hich\af1\dbch\af31505\loch\f1 call: S\hich\af1\dbch\af31505\loch\f1 +olveBoard(deal, -1, 1, 2, &fut, 0), deal.first=2, i.e. South leads. \par \hich\af1\dbch\af31505\loch\f1 \tab 3rd call: SolveBoard(deal, -1, 1, 2, &fut, 0), deal.first=3, i.e. West leads. \par }\pard \ltrpar\ql \fi720\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1033\langfe1053\langnp1033\insrsid812199 \hich\af1\dbch\af31505\loch\f1 4th call: SolveBoard(deal, -1, 1, 2, &fut, 0), deal.first=0, i.e. North leads. }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 @@ -158,8 +158,8 @@ call: SolveBoard(deal, -1, 1, 2, &fut, 0), deal.first=2, i.e. South leads. \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 \{ /* The DLL provides the score (number of tricks) that can be won by the card to play defined by its suit and rank. Array of all alternative cards. */ }{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af0\dbch\af31505\loch\f0 \par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 int nodes; /* Number of searched nodes */ -\par \hich\af1\dbch\af31505\loch\f1 int cards; /* No of alternative\hich\af1\dbch\af31505\loch\f1 cards */}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 -\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 int suit[13]; /* 0=Spades, 1=Hearts, 2=Diamonds, 3=Clubs */ +\par \hich\af1\dbch\af31505\loch\f1 int cards; /* No of alternative cards */}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 \hich\af1\dbch\af31505\loch\f1 int suit[13]; /* 0=Spades, 1=Hearts, 2=Diamonds, 3=Clubs */ \par \hich\af1\dbch\af31505\loch\f1 int rank[13]; /* 2-14 for 2 through Ace *}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 / \par \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\lang1033\langfe1053\langnp1033\insrsid812199\charrsid1927002 \hich\af1\dbch\af31505\loch\f1 int equals[13]; /* Bitstring of ranks for equivalent lower rank cards. The decimal value range between 4 \hich\af1\dbch\af31505\loch\f1 \hich\f1 (=2) and 8192 (King=rank 13). When there are several \'94\loch\f1 \hich\f1 equals\'94\loch\f1 @@ -334,8 +334,8 @@ fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff -ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e50000000000000000000000000052 -0a22fabccd01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e5000000000000000000000000602d +4f27bb11ce01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/DLL-dds_1118plus_a.rtf b/DLL-dds_1118plus_a.rtf new file mode 100644 index 00000000..4b343fcd --- /dev/null +++ b/DLL-dds_1118plus_a.rtf @@ -0,0 +1,353 @@ +{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff1\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1053\deflangfe1053\themelang1053\themelangfe0\themelangcs0{\fonttbl{\f0\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fbidi \fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} +{\f34\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria Math;}{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbmajor\f31501\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 02040503050406030204}Cambria;} +{\fbimajor\f31503\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;} +{\fdbminor\f31505\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 020f0502020204030204}Calibri;} +{\fbiminor\f31507\fbidi \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f39\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\f40\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\f42\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\f44\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f45\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\f46\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f49\fbidi \fswiss\fcharset238\fprq2 Arial CE;}{\f50\fbidi \fswiss\fcharset204\fprq2 Arial Cyr;} +{\f52\fbidi \fswiss\fcharset161\fprq2 Arial Greek;}{\f53\fbidi \fswiss\fcharset162\fprq2 Arial Tur;}{\f54\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f55\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);} +{\f56\fbidi \fswiss\fcharset186\fprq2 Arial Baltic;}{\f57\fbidi \fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f379\fbidi \froman\fcharset238\fprq2 Cambria Math CE;}{\f380\fbidi \froman\fcharset204\fprq2 Cambria Math Cyr;} +{\f382\fbidi \froman\fcharset161\fprq2 Cambria Math Greek;}{\f383\fbidi \froman\fcharset162\fprq2 Cambria Math Tur;}{\f386\fbidi \froman\fcharset186\fprq2 Cambria Math Baltic;}{\f387\fbidi \froman\fcharset163\fprq2 Cambria Math (Vietnamese);} +{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbmajor\f31518\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fdbmajor\f31519\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbmajor\f31521\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbmajor\f31522\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fdbmajor\f31523\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbmajor\f31524\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbmajor\f31525\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fdbmajor\f31526\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhimajor\f31528\fbidi \froman\fcharset238\fprq2 Cambria CE;}{\fhimajor\f31529\fbidi \froman\fcharset204\fprq2 Cambria Cyr;} +{\fhimajor\f31531\fbidi \froman\fcharset161\fprq2 Cambria Greek;}{\fhimajor\f31532\fbidi \froman\fcharset162\fprq2 Cambria Tur;}{\fhimajor\f31535\fbidi \froman\fcharset186\fprq2 Cambria Baltic;} +{\fhimajor\f31536\fbidi \froman\fcharset163\fprq2 Cambria (Vietnamese);}{\fbimajor\f31538\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbimajor\f31539\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\fbimajor\f31541\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbimajor\f31542\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbimajor\f31543\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\fbimajor\f31544\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbimajor\f31545\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbimajor\f31546\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);} +{\flominor\f31548\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\flominor\f31549\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\flominor\f31551\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;} +{\flominor\f31552\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\flominor\f31553\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\flominor\f31554\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);} +{\flominor\f31555\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\flominor\f31556\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fdbminor\f31558\fbidi \froman\fcharset238\fprq2 Times New Roman CE;} +{\fdbminor\f31559\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\fdbminor\f31561\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fdbminor\f31562\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;} +{\fdbminor\f31563\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\fdbminor\f31564\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fdbminor\f31565\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;} +{\fdbminor\f31566\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\fhiminor\f31568\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\fhiminor\f31569\fbidi \fswiss\fcharset204\fprq2 Calibri Cyr;} +{\fhiminor\f31571\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\fhiminor\f31572\fbidi \fswiss\fcharset162\fprq2 Calibri Tur;}{\fhiminor\f31575\fbidi \fswiss\fcharset186\fprq2 Calibri Baltic;} +{\fhiminor\f31576\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}{\fbiminor\f31578\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}{\fbiminor\f31579\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;} +{\fbiminor\f31581\fbidi \froman\fcharset161\fprq2 Times New Roman Greek;}{\fbiminor\f31582\fbidi \froman\fcharset162\fprq2 Times New Roman Tur;}{\fbiminor\f31583\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\fbiminor\f31584\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\fbiminor\f31585\fbidi \froman\fcharset186\fprq2 Times New Roman Baltic;}{\fbiminor\f31586\fbidi \froman\fcharset163\fprq2 Times New Roman (Vietnamese);}} +{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0; +\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\*\defchp \fs22\loch\af31506\hich\af31506\dbch\af31505 }{\*\defpap \ql \li0\ri0\sa200\sl276\slmult1 +\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 }\noqfpromote {\stylesheet{\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 +\fs24\lang1033\langfe1053\loch\f1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 \snext0 \sqformat \spriority0 Normal;}{\s1\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 +\fs24\lang1033\langfe1053\loch\f1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 \sbasedon0 \snext0 \slink15 \sqformat heading 1;}{\s2\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 +\ltrch\fcs0 \fs24\lang1033\langfe1053\loch\f1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 \sbasedon0 \snext0 \slink16 \sqformat heading 2;}{\s3\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0 \rtlch\fcs1 +\af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1053\loch\f1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 \sbasedon0 \snext0 \slink17 \sqformat heading 3;}{\*\cs10 \additive \sunhideused \spriority1 Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\sa200\sl276\slmult1 +\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs22\alang1025 \ltrch\fcs0 \fs22\lang1053\langfe1053\loch\f31506\hich\af31506\dbch\af31505\cgrid\langnp1053\langfenp1053 \snext11 \ssemihidden \sunhideused +Normal Table;}{\*\cs15 \additive \rtlch\fcs1 \ab\af0\afs32 \ltrch\fcs0 \b\fs32\lang1033\langfe0\kerning32\loch\f31502\hich\af31502\dbch\af31501\langnp1033\langfenp0 \sbasedon10 \slink1 \slocked \spriority9 Rubrik 1 Char;}{\*\cs16 \additive \rtlch\fcs1 +\ab\ai\af0\afs28 \ltrch\fcs0 \b\i\fs28\lang1033\langfe0\loch\f31502\hich\af31502\dbch\af31501\langnp1033\langfenp0 \sbasedon10 \slink2 \slocked \ssemihidden \spriority9 Rubrik 2 Char;}{\*\cs17 \additive \rtlch\fcs1 \ab\af0\afs26 \ltrch\fcs0 +\b\fs26\lang1033\langfe0\loch\f31502\hich\af31502\dbch\af31501\langnp1033\langfenp0 \sbasedon10 \slink3 \slocked \ssemihidden \spriority9 Rubrik 3 Char;}}{\*\rsidtbl \rsid4538894\rsid4542728\rsid6650094\rsid8617117\rsid16130314\rsid16470149\rsid16608682 +\rsid16655487}{\mmathPr\mmathFont34\mbrkBin0\mbrkBinSub0\msmallFrac0\mdispDef1\mlMargin0\mrMargin0\mdefJc1\mwrapIndent1440\mintLim0\mnaryLim1}{\info{\operator Bo Haglund}{\creatim\yr2012\mo10\dy21\hr14\min22}{\revtim\yr2013\mo2\dy23\hr12\min45}{\version7} +{\edmins31}{\nofpages3}{\nofwords1247}{\nofchars6612}{\nofcharsws7844}{\vern49275}}{\*\xmlnstbl {\xmlns1 http://schemas.microsoft.com/office/word/2003/wordml}}\paperw12240\paperh15840\margl1417\margr1417\margt1417\margb1417\gutter0\ltrsect +\widowctrl\ftnbj\aenddoc\hyphhotz425\trackmoves0\trackformatting1\donotembedsysfont0\relyonvml0\donotembedlingdata1\grfdocevents0\validatexml0\showplaceholdtext0\ignoremixedcontent0\saveinvalidxml0\showxmlerrors0\horzdoc\dghspace120\dgvspace120 +\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\rsidroot4538894 \fet0{\*\wgrffmtfilter 2450}\ilfomacatclnup0\ltrpar \sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}} +{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}} +{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9 +\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 +\fs24\lang1033\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid6650094\charrsid16470149 \hich\af1\dbch\af31505\loch\f1 Bo Haglund, Bob Richardson +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid4538894\charrsid16470149 \hich\af1\dbch\af31505\loch\f1 Rev }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid8617117 \hich\af1\dbch\af31505\loch\f1 A}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\fs20\insrsid16608682 \hich\af1\dbch\af31505\loch\f1 , 2013-02-19}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid6650094\charrsid16470149 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 Latest DLL issue with this description is available at }{\field{\*\fldinst {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid6650094\charrsid4538894 +\hich\af1\dbch\af31505\loch\f1 HYPERLINK "http://www.bahnhof.se/wb758135/"}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\lang1053\langfe1053\langnp1053\insrsid4538894 {\*\datafield +00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b5800000068007400740070003a002f002f007700770077002e006200610068006e0068006f0066002e00730065002f00770062003700350038003100330035002f000000795881f43b1d7f48af2c825dc48527630000 +0000a5ab00000000005a}}}{\fldrslt {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\ul\cf2\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 http://www.bahnhof.se/wb758135/}}}\sectd \ltrsect\linex0\sectdefaultcl\sftnbj {\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \fs20\insrsid6650094\charrsid4538894 +\par +\par +\par }\pard\plain \ltrpar\s2\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel1\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 +\ab\af1\afs20 \ltrch\fcs0 \b\fs20\ul\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 Short description of the DLL functions supported in D}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\ul\cf1\insrsid16655487 +\hich\af1\dbch\af31505\loch\f1 ouble Dummy Problem Solver }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\ul\cf1\insrsid16130314 \hich\af1\dbch\af31505\loch\f1 1.1.18}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\ul\cf1\insrsid8617117 +\hich\af1\dbch\af31505\loch\f1 plus}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\ul\cf1\insrsid6650094\charrsid4538894 +\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\fs20\cf1\insrsid6650094\charrsid4538894 +\par }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 +\ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 Callable functions +\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\fs20\cf1\insrsid6650094\charrsid4538894 +\par \hich\af1\dbch\af31505\loch\f1 ext\hich\af1\dbch\af31505\loch\f1 ern "C" __declspec(dllimport) int __stdcall SolveBoard(struct deal, int target, +\par \hich\af1\dbch\af31505\loch\f1 int solutions, int mode, struct futureTricks *futp, }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid8617117 0}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 +\hich\af1\dbch\af31505\loch\f1 ); +\par +\par \hich\af1\dbch\af31505\loch\f1 extern "C" __declspec(dllimport) int __stdcall SolveBoardPBN(struct dealPBN, int target, +\par \hich\af1\dbch\af31505\loch\f1 int solutions, \hich\af1\dbch\af31505\loch\f1 int mode, struct futureTricks *futp, }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid8617117 0}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 ); +\par +\par \hich\af1\dbch\af31505\loch\f1 extern "C" __declspec(dllimport) int __stdcall CalcDDtable(struct ddTableDeal tableDeal, \line struct ddTableResults * tablep); +\par +\par \hich\af1\dbch\af31505\loch\f1 extern "C" __declspec(dllimport) int __stdcall CalcDDtablePBN(struct ddTableDealPBN\line \hich\af1\dbch\af31505\loch\f1 tableDealPBN, struct ddTableResults * tablep); +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid8617117\charrsid4538894 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 +\par }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 +\ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 SolveBoard +\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\fs20\cf1\insrsid6650094\charrsid4538894 +\par \hich\af1\dbch\af31505\loch\f1 Before SolveBoard can be called, a structure of type "futureTricks" must be declared. }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 +\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 SolveBoard}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 + returns a status integer, "no fault" means the DLL supplies the trick data in the "futureTric\hich\af1\dbch\af31505\loch\f1 ks" type structure.\line Status codes: +\par \hich\af1\dbch\af31505\loch\f1 1=No fault, +\par \hich\af1\dbch\af31505\loch\f1 -1=Unknown fault, +\par \hich\af1\dbch\af31505\loch\f1 -2=No of cards = 0, +\par \hich\af1\dbch\af31505\loch\f1 -3=target > Number of tricks left, +\par \hich\af1\dbch\af31505\loch\f1 -4=Duplicated cards, +\par \hich\af1\dbch\af31505\loch\f1 -5=target < -1, +\par \hich\af1\dbch\af31505\loch\f1 -7=target >13, +\par \hich\af1\dbch\af31505\loch\f1 -8=solutions < 1, +\par \hich\af1\dbch\af31505\loch\f1 -9=solutions > 3, +\par \hich\af1\dbch\af31505\loch\f1 -10=No of cards > 52 +\par \hich\af1\dbch\af31505\loch\f1 -11=Not used +\par \hich\af1\dbch\af31505\loch\f1 -12=Suit or rank value out of range for deal.currentTrickSuit or deal.currentTrickRank. +\par \hich\af1\dbch\af31505\loch\f1 -13=Card already played in the current trick is also defined as a remaining card to play. +\par \hich\af1\dbch\af31505\loch\f1 -14=Wrong number}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid8617117 \hich\af1\dbch\af31505\loch\f1 of rem\hich\af1\dbch\af31505\loch\f1 aining cards for a hand. +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \line \hich\af1\dbch\af31505\loch\f1 \line \hich\f1 Structure \'94}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\insrsid6650094\charrsid4538894 +\hich\af1\dbch\af31505\loch\f1 deal}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \loch\af1\dbch\af31505\hich\f1 \'94\loch\f1 defines all data needed to describe the deal to be analyzed. +\par \hich\af1\dbch\af31505\loch\f1 struct deal \{}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af0\dbch\af31505\loch\f0 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 int trump; /* I.e. which suit that is trump or if contract is NT, Spades=0, Hearts=1, Diamonds=2, Clubs=3, NT=4 */}{\rtlch\fcs1 \af0\afs20 +\ltrch\fcs0 \f0\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af0\dbch\af31505\loch\f0 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 int first\hich\af1\dbch\af31505\loch\f1 ; /* 0-3, 0=North, 1=East, 2=South, 3=West , Leading hand for the trick.*/}{\rtlch\fcs1 +\af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af0\dbch\af31505\loch\f0 +\par \hich\af0\dbch\af31505\loch\f0 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 int currentTrickSuit[3]; /* 0-2 for up to 3 cards in the order played */ +\par \hich\af1\dbch\af31505\loch\f1 int currentTrickRank[3]; /* 2-14 for up to 3 cards */}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\insrsid6650094\charrsid4538894 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 unsigned int remainCards[4][4]; /* 1}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\super\insrsid6650094\charrsid4538894 +\hich\af1\dbch\af31505\loch\f1 st}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 index hand (0-3), 2}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\super\insrsid6650094\charrsid4538894 +\hich\af1\dbch\af31505\loch\f1 nd}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 \hich\f1 index suit (0-3), values as bitstring of ranks bit 0=0, bit 1=0, bit 2=rank 2, \'85\'85\'85\loch\f1 +. bit 14=rank 14, bit 15=0}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af0\dbch\af31505\loch\f0 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 +for cards remaining after already played cards (cards already played to the current trick are not included in this bitstri\hich\af1\dbch\af31505\loch\f1 ng). \line The decimal value for a card then range between 4 (=rank 2) and 16384 (Ace=rank 14). */} +{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af0\dbch\af31505\loch\f0 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \}\hich\af1\dbch\af31505\loch\f1 ;}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af0\dbch\af31505\loch\f0 }{\rtlch\fcs1 \af1\afs20 +\ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 +\par +\par \hich\af1\dbch\af31505\loch\f1 \hich\f1 Parameter \'94}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 target}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 +\loch\af1\dbch\af31505\hich\f1 \'94\loch\f1 is the number of tricks to be won by the side to play, -1 means that the program}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af0\dbch\af31505\loch\f0 }{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 shall find the maximum number. For equivalent cards \hich\af1\dbch\af31505\loch\f1 only the highest is returned. +\par \line \hich\af1\dbch\af31505\loch\f1 \hich\f1 Parameter \'94}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 solutions}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\fs20\cf1\insrsid6650094\charrsid4538894 \loch\af1\dbch\af31505\hich\f1 \'94\loch\f1 defines how many card solutions that SolveBoard must return: +\par \hich\af1\dbch\af31505\loch\f1 target=1-13, solutions=1: Returns only one of the cards. Its returned score is the same as target whentarget or higher tricks can be won. \hich\af1\dbch\af31505\loch\f1 Otherwise, score \hich\f1 \endash \loch\f1 +1 is returned if target cannot be reached, or score 0 if no tricks can be won. \line target=-1, solutions=1: Returns only one of the optimum cards and its score. +\par \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 target=0, solutions=1: Returns only one of the cards legal to play with sco\hich\af1\dbch\af31505\loch\f1 +re set to 0.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \line \hich\af1\dbch\af31505\loch\f1 + target 1-13, solutions=2: Return all cards meeting target. Their returned scores are the same as target when target or higher tricks can be won. Otherwise, only one card is returned with score \hich\f1 \endash \loch\f1 +1 if target cannot be reached, or score 0 for \hich\af1\dbch\af31505\loch\f1 all cards legal to play if no tricks can be won.\line target \hich\f1 \endash \loch\f1 1, solutions=2: Return all optimum cards with their scores. +\par \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 target=0, solutions=2: Return all cards legal to play with scores set to 0}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\fs20\cf6\insrsid6650094\charrsid4538894 .}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \line \hich\af1\dbch\af31505\loch\f1 target irrelevant, solutions=3: Return all cards that \hich\af1\dbch\af31505\loch\f1 +can be legally played with their scores in descending order. +\par +\par \hich\af1\dbch\af31505\loch\f1 \hich\f1 Parameter \'94}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 mode}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 +\loch\af1\dbch\af31505\hich\f1 \'94\loch\f1 defines the DLL mode of operation.\line mode=0: Do not search to find the score if the hand to play has only one card, including its equivalents, to play. Score is set to \hich\f1 \endash +\hich\af1\dbch\af31505\loch\f1 2 for this card, indicating that there are no alternative cards. If there are multiple choices for cards to play, search is done to find the score. This mode is very fast but you don\hich\f1 \rquote \loch\f1 t +\par \hich\af1\dbch\af31505\loch\f1 mode=1: Always }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid6650094 \hich\af1\dbch\af31505\loch\f1 search to find the score. Even when the hand to play\hich\af1\dbch\af31505\loch\f1 + has only one card, with possible equivalents, to play. For both mode=0 and mode=1: If the preceding SolveBoard call had the same trump suit and the same deal, except for deal.first, then the transposition table contents is reused from the preceding Sol +\hich\af1\dbch\af31505\loch\f1 v\hich\af1\dbch\af31505\loch\f1 eBoard call. Setting mode=2 is no longer needed in this case, but can still be done for backwards compatibility.\line + mode=2: As for mode=1, but the transposition table contents is reused from the preceding SolveBoard call. It is the responsibility of the p\hich\af1\dbch\af31505\loch\f1 r\hich\af1\dbch\af31505\loch\f1 +ogrammer using the DLL to ensure that reusing the table is safe in the actual situation. Example: Deal is the same, except for deal.first. Trump suit is the same. +\par }\pard \ltrpar\ql \fi720\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid6650094 \hich\af1\dbch\af31505\loch\f1 1}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\super\insrsid6650094 +\hich\af1\dbch\af31505\loch\f1 st}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid6650094 \hich\af1\dbch\af31505\loch\f1 call: SolveBoard(deal, -1, 1, 1, &fut, 0), deal.first=1, i.e. East leads. +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid6650094 \hich\af1\dbch\af31505\loch\f1 \tab 2}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\super\insrsid6650094 +\hich\af1\dbch\af31505\loch\f1 nd}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid6650094 \hich\af1\dbch\af31505\loch\f1 call: \hich\af1\dbch\af31505\loch\f1 SolveBoard(deal, -1, 1, 2, &fut, 0), deal.first=2, i.e. South leads. +\par \hich\af1\dbch\af31505\loch\f1 \tab 3rd call: SolveBoard(deal, -1, 1, 2, &fut, 0), deal.first=3, i.e. West leads. +\par }\pard \ltrpar\ql \fi720\li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid6650094 \hich\af1\dbch\af31505\loch\f1 4th call: SolveBoard(deal, -1, 1, 2, &fut, 0), deal.first=0, i.e. North leads. }{ +\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 +\par }\pard \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 +\par \hich\af1\dbch\af31505\loch\f1 struct }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 futureTric\hich\af1\dbch\af31505\loch\f1 ks}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 \{ /* The DLL provides the score (number of tricks) that can be won by the card to play defined by its suit and rank. Array of all alternative cards. */}{\rtlch\fcs1 \af0\afs20 +\ltrch\fcs0 \f0\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af0\dbch\af31505\loch\f0 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 int nodes; /* Number of searched nodes */ +\par \hich\af1\dbch\af31505\loch\f1 int cards; /* No of alternative cards */}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\insrsid6650094\charrsid4538894 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 int suit[13]; /* 0=Spades, 1=Hearts, 2=Diamonds, 3=Clubs */ +\par \hich\af1\dbch\af31505\loch\f1 int rank[13]; /* 2-14 for 2 through Ace *}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 / +\par \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 +int equals[13]; /* Bitstring of ranks for equivalent lower rank cards. The decimal value range between 4 (=2) and 8192 (Kin\hich\af1\dbch\af31505\loch\f1 \hich\f1 g=rank 13). When there are several \'94\loch\f1 \hich\f1 equals\'94\loch\f1 +\hich\f1 , the value is the sum of each \'94\loch\f1 \hich\f1 equal\'94\loch\f1 . *}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 /}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\fs20\cf1\insrsid6650094\charrsid4538894 +\par \hich\af1\dbch\af31505\loch\f1 int score[13]; /* -1 indicates that target was not reached, otherwise target or max numbe of tricks */}{\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \f0\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af0\dbch\af31505\loch\f0 + +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \}\hich\af1\dbch\af31505\loch\f1 ; +\par +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6650094 +\par }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 +\ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\insrsid6650094\charrsid4538894 +\par \hich\af1\dbch\af31505\loch\f1 SolveBoardPBN +\par +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 In SolveBoardPBN the remaining cards\hich\af1\dbch\af31505\loch\f1 in the deal information are given in PBN text +\par \hich\af1\dbch\af31505\loch\f1 format (e.g. \line W:T5.K4.652.A98542 K6.QJT976.QT7.Q6 432.A.AKJ93.JT73 AQJ987.8532.84.K) instead of using bits 2-14 in an integer array. Otherwise, SolveboardPBN is identical to SolveBoard. +\par +\par \hich\af1\dbch\af31505\loch\f1 struct dealPBN \{ +\par \hich\af1\dbch\af31505\loch\f1 in\hich\af1\dbch\af31505\loch\f1 t trump; +\par \hich\af1\dbch\af31505\loch\f1 int first; +\par \hich\af1\dbch\af31505\loch\f1 int currentTrickSuit[3]; }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\insrsid6650094\charrsid4538894 +\par \hich\af1\dbch\af31505\loch\f1 }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 int currentTrickRank[3]; +\par \hich\af1\dbch\af31505\loch\f1 char remainCards[80]; /* First character identifies the hand having the cards given first +\par \hich\af1\dbch\af31505\loch\f1 in the string, then the cards of th\hich\af1\dbch\af31505\loch\f1 e other hands are given in a +\par \tab \tab \tab \hich\af1\dbch\af31505\loch\f1 clock-wise order, see example above. Null characters fill out +\par \tab \tab \tab \hich\af1\dbch\af31505\loch\f1 the character array at the end. */ +\par \}\hich\af1\dbch\af31505\loch\f1 ; +\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\insrsid6650094\charrsid4538894 +\par +\par \hich\af1\dbch\af31505\loch\f1 CalcDDtable +\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af0\afs20 \ltrch\fcs0 +\f0\fs20\cf1\insrsid6650094\charrsid4538894 +\par }\pard\plain \ltrpar\s1\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 CalcDDtable calculates the double dummy values of the initial 52 cards for all the 20 trump suit/declarer hand combinations. +\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1 \ltrch\fcs0 +\insrsid6650094 +\par }\pard\plain \ltrpar\s1\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 Before CalcDDtable can be called, a structure of type " ddTableResults" must be declared. +\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 +\b\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 CalcDDtable}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 returns a status integer,\hich\af1\dbch\af31505\loch\f1 + "no fault" means the DLL supplies the double dummy scores in the "ddTableResults" type structure.\line Status codes: +\par \hich\af1\dbch\af31505\loch\f1 1=No fault, +\par \hich\af1\dbch\af31505\loch\f1 Other status codes are errors, with codes equal to SolveBoard status codes. }{\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6650094 +\par +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 \hich\f1 Structure \'94}{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 +ddTableDeal}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \loch\af1\dbch\af31505\hich\f1 \'94\loch\f1 defines the dealt \hich\af1\dbch\af31505\loch\f1 cards to be analyzed.}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\fs20\insrsid6650094 +\par \hich\af1\dbch\af31505\loch\f1 struct ddTableDeal \{ +\par \hich\af1\dbch\af31505\loch\f1 unsigned int cards[4][4]; /* 1}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\super\insrsid6650094 \hich\af1\dbch\af31505\loch\f1 st}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid6650094 \hich\af1\dbch\af31505\loch\f1 + index is hand, 2}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\super\insrsid6650094 \hich\af1\dbch\af31505\loch\f1 nd}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid6650094 \hich\af1\dbch\af31505\loch\f1 + index is suit, same coding as for deal.remainCards for SolveBoard. */ +\par \}\hich\af1\dbch\af31505\loch\f1 ; +\par +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 struct }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 ddTableResults}{ +\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 \{ /* For each combination trump suit / declarer hand, the DLL\hich\af1\dbch\af31505\loch\f1 provides the double dummy score. */}{\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \fs20\insrsid6650094 +\par \hich\af1\dbch\af31505\loch\f1 int resTable[5][4];\tab /* 1}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\super\insrsid6650094 \hich\af1\dbch\af31505\loch\f1 st}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid6650094 \hich\af1\dbch\af31505\loch\f1 + index is trump (0=Spades, 1=Hearts, 2=Diamonds, 3=Clubs, 4=No Trump 2}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\super\insrsid6650094 \hich\af1\dbch\af31505\loch\f1 nd}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\insrsid6650094 +\hich\af1\dbch\af31505\loch\f1 index is declarer hand, 0=North, 1=East, 2=South, 3=West */ +\par \}\hich\af1\dbch\af31505\loch\f1 ; +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6650094 +\par +\par }{\rtlch\fcs1 \ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 CalcDDtablePBN}{\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6650094 +\par +\par }\pard\plain \ltrpar\s3\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel2\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 +\af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 In CalcDDtablePBN the remaining cards\hich\af1\dbch\af31505\loch\f1 + in the deal information are given in PBN text format, see the description above for SolveBoardPBN. Otherwise, CalcDDtablePBN is identical to CalcDDtable. +\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\fs20\cf1\insrsid6650094\charrsid4538894 +\par \hich\af1\dbch\af31505\loch\f1 struct ddTableDealPBN \{ +\par \hich\af1\dbch\af31505\loch\f1 char cards[80]; +\par \}\hich\af1\dbch\af31505\loch\f1 ; +\par +\par }{\rtlch\fcs1 \af1 \ltrch\fcs0 \insrsid6650094 +\par +\par }\pard\plain \ltrpar\s1\ql \li0\ri0\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 +\ab\af1\afs20 \ltrch\fcs0 \b\fs20\cf1\insrsid6650094\charrsid4538894 \hich\af1\dbch\af31505\loch\f1 Revision History +\par }\pard\plain \ltrpar\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1025 \ltrch\fcs0 \fs24\lang1033\langfe1053\loch\af1\hich\af1\dbch\af31505\cgrid\langnp1033\langfenp1053 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 +\fs20\cf1\insrsid6650094\charrsid4538894 +\par }{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid16608682 \hich\af1\dbch\af31505\loch\f1 Rev A, 2013-02-19}{\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 \tab \tab \hich\af1\dbch\af31505\loch\f1 First issue. +\par +\par }\pard \ltrpar\ql \fi-2880\li2880\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin2880\itap0 {\rtlch\fcs1 \af1\afs20 \ltrch\fcs0 \fs20\cf1\insrsid6650094\charrsid4538894 +\par }{\*\themedata 504b030414000600080000002100e9de0fbfff0000001c020000130000005b436f6e74656e745f54797065735d2e786d6cac91cb4ec3301045f748fc83e52d4a +9cb2400825e982c78ec7a27cc0c8992416c9d8b2a755fbf74cd25442a820166c2cd933f79e3be372bd1f07b5c3989ca74aaff2422b24eb1b475da5df374fd9ad +5689811a183c61a50f98f4babebc2837878049899a52a57be670674cb23d8e90721f90a4d2fa3802cb35762680fd800ecd7551dc18eb899138e3c943d7e503b6 +b01d583deee5f99824e290b4ba3f364eac4a430883b3c092d4eca8f946c916422ecab927f52ea42b89a1cd59c254f919b0e85e6535d135a8de20f20b8c12c3b0 +0c895fcf6720192de6bf3b9e89ecdbd6596cbcdd8eb28e7c365ecc4ec1ff1460f53fe813d3cc7f5b7f020000ffff0300504b030414000600080000002100a5d6 +a7e7c0000000360100000b0000005f72656c732f2e72656c73848fcf6ac3300c87ef85bd83d17d51d2c31825762fa590432fa37d00e1287f68221bdb1bebdb4f +c7060abb0884a4eff7a93dfeae8bf9e194e720169aaa06c3e2433fcb68e1763dbf7f82c985a4a725085b787086a37bdbb55fbc50d1a33ccd311ba548b6309512 +0f88d94fbc52ae4264d1c910d24a45db3462247fa791715fd71f989e19e0364cd3f51652d73760ae8fa8c9ffb3c330cc9e4fc17faf2ce545046e37944c69e462 +a1a82fe353bd90a865aad41ed0b5b8f9d6fd010000ffff0300504b0304140006000800000021006b799616830000008a0000001c0000007468656d652f746865 +6d652f7468656d654d616e616765722e786d6c0ccc4d0ac3201040e17da17790d93763bb284562b2cbaebbf600439c1a41c7a0d29fdbd7e5e38337cedf14d59b +4b0d592c9c070d8a65cd2e88b7f07c2ca71ba8da481cc52c6ce1c715e6e97818c9b48d13df49c873517d23d59085adb5dd20d6b52bd521ef2cdd5eb9246a3d8b +4757e8d3f729e245eb2b260a0238fd010000ffff0300504b03041400060008000000210036cc113fa8060000a31b0000160000007468656d652f7468656d652f +7468656d65312e786d6cec594f6f1b4514bf23f11d467b6f6327761a4775aad8b11b48d346b15bd4e37877bc3bcdecce6a669cd437d41e9190100571a012370e +08a8d44a5ccaa709144191fa157833b3bbde89d7246923a8a039b4f6ec6fdefff79b37ebabd7eec70c1d1221294fda5efd72cd4324f1794093b0eddd1ef62fad +79482a9c0498f184b4bd2991deb58df7dfbb8ad755446282607f22d771db8b944ad79796a40fcb585ee62949e0d9988b182bf82ac2a540e023901bb3a5e55a6d +7529c634f1508263107b6b3ca63eb9a460abb791cbee31509028a9177c26065a327136186c7050d70839955d26d021666d0fd404fc6848ee2b0f312c153c687b +35f3e72d6d5c5dc2ebd926a616ec2dedeb9bbf6c5fb6213858363a45382a94d6fb8dd695ad42be0130358febf57add5ebd906700d8f7c1536b4b5966a3bf56ef +e4324b20fb715e76b7d6ac355c7c49feca9ccdad4ea7d36c65b658a106643f36e6f06bb5d5c6e6b28337208b6fcee11b9dcd6e77d5c11b90c5afcee1fb575aab +0d176f4011a3c9c11c5a27b4dfcfa417903167db95f03580afd532f80c05d55054975631e6895a546b31bec7451f001ac8b0a20952d3948cb10f45dcc5f14850 +ac15e075824b4fec922fe796b42e247d4153d5f63e4c3134c44cdeabe7dfbf7afe141d3f7876fce0a7e3870f8f1ffc680539bbb671129677bdfcf6b33f1f7f8c +fe78facdcb475f54e36519ffeb0f9ffcf2f3e7d540689f99392fbe7cf2dbb3272fbefaf4f7ef1e55c037051e95e1431a13896e9223b4cf6370cc44c5b59c8cc4 +f9760c234ccb3b369350e2046b2d15f27b2a72d037a79865d971ece81037827704d04715f0fae49e63f0201213452b34ef44b103dce59c75b8a88cc28ed6550a +f3709284d5cac5a48cdbc7f8b04a7717274e7e7b931478332f4bc7f16e441c33f7184e140e494214d2cff8012115dedda5d489eb2ef505977cacd05d8a3a9856 +866448474e35cd366dd318f232adf219f2edc466f70eea7056e5f516397491d0159855183f24cc09e3753c5138ae1239c4312b07fc065651959183a9f0cbb89e +5490e990308e7a0191b26acf2d01fe9692be8381b12ad3becba6b18b148a1e54c9bc81392f23b7f84137c2715a851dd0242a633f900750a218ed715505dfe56e +87e8ef90079c2c4cf71d4a9c749fce06b769e898342b10fd64222a72799d70a77e075336c6c4500d90bac3d5314dfe8eb81905e6b61a2e8eb8812a5f7cfdb8c2 +eeb795b237e1f4aaea99ed1344bd0877929ebb5c04f4ed67e72d3c49f60834c4fc11f58e9cdf91b3f79f27e745fd7cf1943c636120683d8bd841db8cddf1c2a9 +7b4c191ba8292337a419bc259c3d411f16f53e73e124c52d2c8de0a3ee6450e0e04281cd1e24b8fa88aa6810e11486f6baa7858432131d4a9472099745b35c29 +5be361f057f6aad9d49710cb1c12ab5d1ed8e515bd9cdf350a31c6aad05c6873452b5ac05995ad5cc984826fafa3acae8d3ab3b6ba31cd90a2a3ad705987d85c +ca21e4856bb0584413861a04a310447915aefc5a355c763023818ebbcd519e1693858b4c918c7040b21c69bfe773543749ca6b65ce11ed872d067d713c256a25 +6d2d2df60db49d254965758d05eaf2ecbd4996f20a9e6509a49d6c4796949b9325e8a8edb59acb4d0ff9386d7b63b827c3c73885ac4b3d476216c2bb265f095b +f6a736b3e9f259365bb9636e13d4e1d5878dfb9cc30e0fa442aa2d2c235b1ae65156022cd19aacfdcb4d08eb453950c14667b362650d8ae15fb302e2e8a6968c +c7c457e564975674ececd78c4af9441131888223346213b18f21fdba54c19f804a78dd6118417f8177733adae6914bce59d395df88199c5dc72c8d7046b7ba45 +f34eb6704348850de65bc93cf0add276e3dcf95d312d7f41ae94cbf87fe68a3e4fe0edc34aa033e0c39b618191ee94b6c7858a38b0501a51bf2f607030dc01d5 +02ef77e1311415bc9f36ff0b72a8ffb73d676598b6864ba4daa7211214ce23150942f680964cf59d22ac9e9d5d5624cb04998a2a992b536bf6881c1236d41cb8 +aacf760f4550ea864d321a30b893f5e77ecf3a6814ea21a7dc6f0e931567afed817f7af2b1cd0c4eb93c6c069a3cfe8589c578303b55ed7eb33d3f7bcb8ee807 +b331ab917705282b1d05adaced5fd384731eb596b1e63c5e6ee6c64116e73d86c562204ae11d12d2ffc0f94785cf8829637da00ef93e702b821f2fb430281ba8 +ea4b76f0409a20ede2080627bb688b498bb2a1cd46271db5fcb0bee049b7d07b22d8dab2b3e4fb9cc12e8633579dd38b1719ec2cc24eaceddac25043664fb628 +2c8df38b8c498cf995acfc4b161fdd83446fc16f0613a6a42926f89d4a6098a107a60fa0f9ad46b375e32f000000ffff0300504b030414000600080000002100 +0dd1909fb60000001b010000270000007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73848f4d0ac2301484f7 +8277086f6fd3ba109126dd88d0add40384e4350d363f2451eced0dae2c082e8761be9969bb979dc9136332de3168aa1a083ae995719ac16db8ec8e4052164e89 +d93b64b060828e6f37ed1567914b284d262452282e3198720e274a939cd08a54f980ae38a38f56e422a3a641c8bbd048f7757da0f19b017cc524bd62107bd500 +1996509affb3fd381a89672f1f165dfe514173d9850528a2c6cce0239baa4c04ca5bbabac4df000000ffff0300504b01022d0014000600080000002100e9de0f +bfff0000001c0200001300000000000000000000000000000000005b436f6e74656e745f54797065735d2e786d6c504b01022d0014000600080000002100a5d6 +a7e7c0000000360100000b00000000000000000000000000300100005f72656c732f2e72656c73504b01022d00140006000800000021006b799616830000008a +0000001c00000000000000000000000000190200007468656d652f7468656d652f7468656d654d616e616765722e786d6c504b01022d00140006000800000021 +0036cc113fa8060000a31b00001600000000000000000000000000d60200007468656d652f7468656d652f7468656d65312e786d6c504b01022d001400060008 +00000021000dd1909fb60000001b0100002700000000000000000000000000b20900007468656d652f7468656d652f5f72656c732f7468656d654d616e616765722e786d6c2e72656c73504b050600000000050005005d010000ad0a00000000} +{\*\colorschememapping 3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d22796573223f3e0d0a3c613a636c724d +617020786d6c6e733a613d22687474703a2f2f736368656d61732e6f70656e786d6c666f726d6174732e6f72672f64726177696e676d6c2f323030362f6d6169 +6e22206267313d226c743122207478313d22646b3122206267323d226c743222207478323d22646b322220616363656e74313d22616363656e74312220616363 +656e74323d22616363656e74322220616363656e74333d22616363656e74332220616363656e74343d22616363656e74342220616363656e74353d22616363656e74352220616363656e74363d22616363656e74362220686c696e6b3d22686c696e6b2220666f6c486c696e6b3d22666f6c486c696e6b222f3e} +{\*\latentstyles\lsdstimax267\lsdlockeddef0\lsdsemihiddendef1\lsdunhideuseddef1\lsdqformatdef0\lsdprioritydef99{\lsdlockedexcept \lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority0 \lsdlocked0 Normal; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdlocked0 heading 1;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdlocked0 heading 2;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdlocked0 heading 3;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 4; +\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 5;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 6;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 7;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 8;\lsdqformat1 \lsdpriority9 \lsdlocked0 heading 9; +\lsdpriority39 \lsdlocked0 toc 1;\lsdpriority39 \lsdlocked0 toc 2;\lsdpriority39 \lsdlocked0 toc 3;\lsdpriority39 \lsdlocked0 toc 4;\lsdpriority39 \lsdlocked0 toc 5;\lsdpriority39 \lsdlocked0 toc 6;\lsdpriority39 \lsdlocked0 toc 7; +\lsdpriority39 \lsdlocked0 toc 8;\lsdpriority39 \lsdlocked0 toc 9;\lsdqformat1 \lsdpriority35 \lsdlocked0 caption;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority10 \lsdlocked0 Title;\lsdpriority1 \lsdlocked0 Default Paragraph Font; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority11 \lsdlocked0 Subtitle;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority22 \lsdlocked0 Strong;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority20 \lsdlocked0 Emphasis; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority59 \lsdlocked0 Table Grid;\lsdunhideused0 \lsdlocked0 Placeholder Text;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority1 \lsdlocked0 No Spacing; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 1;\lsdunhideused0 \lsdlocked0 Revision; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority34 \lsdlocked0 List Paragraph;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority29 \lsdlocked0 Quote;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority30 \lsdlocked0 Intense Quote; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 1; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 1;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 2; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 2;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 3;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 3; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 4; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 4; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 4; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 4; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 4;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 5; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 5;\lsdsemihidden0 \lsdunhideused0 \lsdpriority60 \lsdlocked0 Light Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority61 \lsdlocked0 Light List Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority62 \lsdlocked0 Light Grid Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority63 \lsdlocked0 Medium Shading 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority64 \lsdlocked0 Medium Shading 2 Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority65 \lsdlocked0 Medium List 1 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority66 \lsdlocked0 Medium List 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority67 \lsdlocked0 Medium Grid 1 Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority68 \lsdlocked0 Medium Grid 2 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority69 \lsdlocked0 Medium Grid 3 Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority70 \lsdlocked0 Dark List Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdpriority71 \lsdlocked0 Colorful Shading Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority72 \lsdlocked0 Colorful List Accent 6;\lsdsemihidden0 \lsdunhideused0 \lsdpriority73 \lsdlocked0 Colorful Grid Accent 6; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority19 \lsdlocked0 Subtle Emphasis;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority21 \lsdlocked0 Intense Emphasis; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority31 \lsdlocked0 Subtle Reference;\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority32 \lsdlocked0 Intense Reference; +\lsdsemihidden0 \lsdunhideused0 \lsdqformat1 \lsdpriority33 \lsdlocked0 Book Title;\lsdpriority37 \lsdlocked0 Bibliography;\lsdqformat1 \lsdpriority39 \lsdlocked0 TOC Heading;}}{\*\datastore 010500000200000018000000 +4d73786d6c322e534158584d4c5265616465722e362e3000000000000000000000060000 +d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff090006000000000000000000000001000000010000000000000000100000feffffff00000000feffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +fffffffffffffffffdfffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff +ffffffffffffffffffffffffffffffff52006f006f007400200045006e00740072007900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016000500ffffffffffffffffffffffff0c6ad98892f1d411a65f0040963251e50000000000000000000000006064 +be4ebb11ce01feffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffff000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000105000000000000}} \ No newline at end of file diff --git a/GPL.txt b/GPL.txt deleted file mode 100644 index f90922ee..00000000 --- a/GPL.txt +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff --git a/LICENSE-2_0.txt b/LICENSE-2_0.txt new file mode 100644 index 00000000..0961d1cf --- /dev/null +++ b/LICENSE-2_0.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dds.cpp b/dds.cpp index f1de1ac7..10dd8548 100644 --- a/dds.cpp +++ b/dds.cpp @@ -1,22 +1,18 @@ -/* DDS 1.1.17 A bridge double dummy solver. */ +/* DDS 1.1.18 A bridge double dummy solver. */ /* Copyright (C) 2006-2012 by Bo Haglund */ /* Cleanups and porting to Linux and MacOSX (C) 2006 by Alex Martelli */ /* */ -/* This program is free software; you can redistribute it and/or */ -/* modify it under the terms of the GNU General Public License */ -/* as published by the Free software Foundation; either version 2 */ -/* of the License, or (at your option) any later version. */ -/* */ -/* This program is distributed in the hope that it will be useful, */ -/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ -/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ -/* GNU General Public License for more details. */ -/* */ -/* You should have received a copy of the GNU General Public License */ -/* along with this program; if not, write to the Free Software */ -/* Foundation, Inc, 51 Franklin Street, 5th Floor, Boston MA 02110-1301, USA. */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ +/* See the License for the specific language governing permissions and */ +/* limitations under the License. */ /*#include "stdafx.h"*/ /* Needed by Visual C++ */ @@ -132,7 +128,7 @@ extern "C" BOOL APIENTRY DllMain(HMODULE hModule, int newTrump; unsigned short int diffDeal; unsigned short int aggDeal; - int mcurr, val, payOff, handToPlay; + int val, payOff, handToPlay; int noStartMoves; int handRelFirst; int noOfCardsPerHand[4]; @@ -641,7 +637,7 @@ extern "C" BOOL APIENTRY DllMain(HMODULE hModule, /* All moves before bestMove in the move list shall be moved to the forbidden moves list, since none of them reached the target */ - mcurr=movePly[iniDepth].current; + /*mcurr=movePly[iniDepth].current;*/ for (k=0; k<=movePly[iniDepth].last; k++) if ((bestMove[iniDepth].suit==movePly[iniDepth].move[k].suit) &&(bestMove[iniDepth].rank==movePly[iniDepth].move[k].rank)) @@ -2264,7 +2260,7 @@ int QuickTricks(struct pos * posPoint, int hand, int suit, sum, qtricks, commPartner, commRank=0, commSuit=-1, s; int opps, res; int countLho, countRho, countPart, countOwn, lhoTrumpRanks, rhoTrumpRanks; - int cutoff, ss, rr, lowestQtricks=0, count=0/*, ruff=FALSE*/; + int cutoff, ss, rr, lowestQtricks=0/*, count=0, ruff=FALSE*/; int QtricksLeadHandNT(int hand, struct pos *posPoint, int cutoff, int depth, int countLho, int countRho, int *lhoTrumpRanks, int *rhoTrumpRanks, int commPartner, @@ -3483,8 +3479,7 @@ int WeightAllocNT(struct pos * posPoint, struct moveType * mp, int depth, int weight=0, k, l, kk, ll, suit, suitAdd=0, leadSuit; int suitWeightDelta, first, q; int rRank, thirdBestHand; - int suitBonus=0; - int winMove=FALSE; + int winMove=FALSE; /* If winMove is true, current move can win the current trick. */ unsigned short suitCount, suitCountLH, suitCountRH, aggr; int countLH, countRH; @@ -3503,22 +3498,6 @@ int WeightAllocNT(struct pos * posPoint, struct moveType * mp, int depth, suitCountLH=posPoint->length[lho[q]][suit]; suitCountRH=posPoint->length[rho[q]][suit]; - if ((posPoint->winner[suit].hand==rho[q])|| - (posPoint->secondBest[suit].hand==rho[q])) { - if (suitCountRH!=1) - suitBonus-=7/*6*//*12*//*17*/; - } - else if ((posPoint->winner[suit].hand==lho[q])&& - (posPoint->secondBest[suit].hand==partner[q])) { - /* This case was suggested by Joël Bradmetz. */ - if (posPoint->length[partner[q]][suit]!=1) - suitBonus+=34/*37*//*32*//*20*/; - } - else if ((posPoint->secondBest[suit].hand==lho[q])&& - ((posPoint->winner[suit].hand==partner[q])|| - (posPoint->winner[suit].hand==q))) - suitBonus+=14; - if (suitCountLH!=0) { countLH=(suitCountLH<<2); } @@ -3531,7 +3510,11 @@ int WeightAllocNT(struct pos * posPoint, struct moveType * mp, int depth, else countRH=depth+4; - suitWeightDelta=suitBonus-((countLH+countRH)<<5)/(19/*20*//*15*/); + /* Discourage a suit selection where the search tree appears larger than for the + altenative suits: the search is estimated to be small when the added number of + alternative cards to play for the opponents is small. */ + + suitWeightDelta=-((countLH+countRH)<<5)/19; if (posPoint->winner[suit].rank==mp->rank) winMove=TRUE; @@ -3542,30 +3525,71 @@ int WeightAllocNT(struct pos * posPoint, struct moveType * mp, int depth, } if (winMove) { - if (((posPoint->secondBest[suit].hand!=lho[first]) - ||(suitCountLH==1))&& - ((posPoint->secondBest[suit].hand!=rho[first]) - ||(suitCountRH==1))) - weight=suitWeightDelta+48+rRank; - /*else - weight=suitWeightDelta+35+rRank;*/ - - else if ((mp->sequence)&& + /* Discourage suit if RHO has second best card. + Exception: RHO has singleton. */ + if (posPoint->secondBest[suit].hand==rho[q]) { + if (suitCountRH!=1) + suitWeightDelta-=7; + } + /* Encourage playing suit if LHO has second highest rank. */ + else if (posPoint->secondBest[suit].hand==lho[q]) + suitWeightDelta+=14; + + /* Higher weight if also second best rank is present on current side to play, or + if second best is a singleton at LHO or RHO. */ + + if (((posPoint->secondBest[suit].hand!=lho[first]) + ||(suitCountLH==1))&& + ((posPoint->secondBest[suit].hand!=rho[first]) + ||(suitCountRH==1))) + weight=suitWeightDelta+41/*48*/+rRank; + + /* Encourage playing second highest rank if hand also has + third highest rank. */ + + else if ((mp->sequence)&& (mp->rank==posPoint->secondBest[suit].rank)) weight=suitWeightDelta+39; - /*else if (mp->sequence) - weight=suitWeightDelta+25+rRank;*/ else weight=suitWeightDelta+20+rRank; - if ((bestMove[depth].suit==suit)&& + /* Encourage playing cards that previously caused search cutoff + or was stored as the best move in a transposition table entry match. */ + + if ((bestMove[depth].suit==suit)&& (bestMove[depth].rank==mp->rank)) weight+=123/*122*//*112*//*73*/; - else if ((bestMoveTT[depth].suit==suit)&& + else if ((bestMoveTT[depth].suit==suit)&& (bestMoveTT[depth].rank==mp->rank)) - weight+=20/*17*//*14*/; + weight+=24/*20*//*17*//*14*/; } else { + /* Discourage suit if RHO has winning or second best card. + Exception: RHO has singleton. */ + + if ((posPoint->winner[suit].hand==rho[q])|| + (posPoint->secondBest[suit].hand==rho[q])) { + if (suitCountRH!=1) + suitWeightDelta-=7; + } + + + /* Try suit if LHO has winning card and partner second best. + Exception: partner has singleton. */ + + else if ((posPoint->winner[suit].hand==lho[q])&& + (posPoint->secondBest[suit].hand==partner[q])) { + + /* This case was suggested by Joël Bradmetz. */ + + if (posPoint->length[partner[q]][suit]!=1) + suitWeightDelta+=31/*34*//*37*//*32*//*20*/; + } + + /* Encourage playing the suit if the hand together with partner have both the 2nd highest + and the 3rd highest cards such that the side of the hand has the highest card in the + next round playing this suit. */ + if ((posPoint->secondBest[suit].hand==partner[first])&&(partner[first]==thirdBestHand)) suitWeightDelta+=22/*10*/; else if(((posPoint->secondBest[suit].hand==first)&&(partner[first]==thirdBestHand)&& @@ -3573,26 +3597,35 @@ int WeightAllocNT(struct pos * posPoint, struct moveType * mp, int depth, (first==thirdBestHand)&&(posPoint->length[partner[first]][suit]>1))) suitWeightDelta+=24/*10*/; + /* Higher weight if LHO or RHO has the highest (winning) card as a singleton. */ + if (((suitCountLH==1)&&(posPoint->winner[suit].hand==lho[first])) ||((suitCountRH==1)&&(posPoint->winner[suit].hand==rho[first]))) weight=suitWeightDelta+25/*23*//*22*/+rRank; else if (posPoint->winner[suit].hand==first) { - weight=suitWeightDelta-24/*27*//*12*//*10*/+rRank; + weight=suitWeightDelta-20/*24*//*27*//*12*//*10*/+rRank; } + + /* Encourage playing second highest rank if hand also has + third highest rank. */ + else if ((mp->sequence)&& (mp->rank==posPoint->secondBest[suit].rank)) - weight=suitWeightDelta+42; + weight=suitWeightDelta+44/*42*/; else if (mp->sequence) - weight=suitWeightDelta+32-rRank; + weight=suitWeightDelta+31/*32*/-rRank; else weight=suitWeightDelta+12+rRank; + /* Encourage playing cards that previously caused search cutoff + or was stored as the best move in a transposition table entry match. */ + if ((bestMove[depth].suit==suit)&& (bestMove[depth].rank==mp->rank)) weight+=47/*45*//*39*//*38*/; else if ((bestMoveTT[depth].suit==suit)&& (bestMoveTT[depth].rank==mp->rank)) - weight+=15/*16*//*19*//*14*/; + weight+=13/*15*//*16*//*19*//*14*/; } break; @@ -3601,8 +3634,8 @@ int WeightAllocNT(struct pos * posPoint, struct moveType * mp, int depth, leadSuit=posPoint->move[depth+1].suit; if (leadSuit==suit) { if (bitMapRank[mp->rank]> - (bitMapRank[posPoint->move[depth+1].rank] | - posPoint->rankInSuit[partner[first]][suit])) + (bitMapRank[posPoint->move[depth+1].rank] | + posPoint->rankInSuit[partner[first]][suit])) winMove=TRUE; else if (posPoint->rankInSuit[rho[first]][suit]> (bitMapRank[posPoint->move[depth+1].rank] | @@ -3610,57 +3643,67 @@ int WeightAllocNT(struct pos * posPoint, struct moveType * mp, int depth, winMove=TRUE; } else { - /* Side with - highest rank in leadSuit wins */ + /* Side with highest rank in leadSuit wins */ + if (posPoint->rankInSuit[rho[first]][leadSuit] > - (posPoint->rankInSuit[partner[first]][leadSuit] | - bitMapRank[posPoint->move[depth+1].rank])) + (posPoint->rankInSuit[partner[first]][leadSuit] | + bitMapRank[posPoint->move[depth+1].rank])) winMove=TRUE; } if (winMove) { if (!notVoidInSuit) { suitCount=posPoint->length[q][suit]; - suitAdd=(suitCount<<6)/(23/*20*//*21*//*24*//*30*//*35*/); + suitAdd=(suitCount<<6)/(23/*20*//*21*//*24*//*30*//*35*/); if (posPoint->secondBest[suit].hand==q) { + /* Discourage suit discard if 2nd highest card becomes singleton. */ + if (suitCount==2) suitAdd-=3; } + /* Discourage suit discard of highest card. */ + else if ((suitCount==1)&&(posPoint->winner[suit].hand==q)) suitAdd-=3; - - weight=/*60*/-(mp->rank)+suitAdd; + + /*Encourage discard of low cards in long suits. */ + weight=/*60*/-(mp->rank)+suitAdd; } - else { + else { weight=80+rRank; } } else { if (!notVoidInSuit) { suitCount=posPoint->length[q][suit]; - suitAdd=(suitCount<<6)/33; + suitAdd=(suitCount<<6)/33; + + /* Discourage suit discard if 2nd highest card becomes singleton. */ if ((suitCount==2)&&(posPoint->secondBest[suit].hand==q)) - suitAdd-=7; + suitAdd-=7; + + /* Discourage suit discard of highest card. */ else if ((suitCount==1)&&(posPoint->winner[suit].hand==q)) suitAdd-=10; + /*Encourage discard of low cards in long suits. */ weight=-(mp->rank)+suitAdd; } else { + + /* If lowest rank for either partner to leading hand + or rho is higher than played card for lho, + lho should play as low card as possible */ + kk=posPoint->rankInSuit[partner[first]][leadSuit]; ll=posPoint->rankInSuit[rho[first]][leadSuit]; - k=kk & (-kk); l=ll & (-ll); /* Only least significant 1 bit */ - if ((k > bitMapRank[mp->rank])|| - (l > bitMapRank[mp->rank])) - weight=-3+rRank; - /* If lowest rank for either partner to leading hand - or rho is higher than played card for lho, - lho should play as low card as possible */ + k=kk & (-kk); l=ll & (-ll); /* Only least significant 1 bit of + bit map ranks for partner and RHO. */ + + if ((k > bitMapRank[mp->rank])||(l > bitMapRank[mp->rank])) + weight=-3+rRank; else if (mp->rank > posPoint->move[depth+1].rank) { - /*if ((mp->sequence)&& - (mp->rank==posPoint->secondBest[suit].rank)) - weight=15+rRank; - else */if (mp->sequence) { + if (mp->sequence) { weight=/*0*/10+rRank; } else { @@ -3670,7 +3713,7 @@ int WeightAllocNT(struct pos * posPoint, struct moveType * mp, int depth, } else { weight=-15+rRank; - } + } } } @@ -3680,20 +3723,15 @@ int WeightAllocNT(struct pos * posPoint, struct moveType * mp, int depth, leadSuit=posPoint->move[depth+2].suit; if (WinningMove(mp, &(posPoint->move[depth+1]))) { - if (1/*suit==leadSuit*/) { - if (bitMapRank[mp->rank] > - posPoint->rankInSuit[rho[first]][suit]) - winMove=TRUE; - } + if (bitMapRank[mp->rank] > + posPoint->rankInSuit[rho[first]][suit]) + winMove=TRUE; } else if (posPoint->high[depth+1]==first) { - if (1/*posPoint->length[rho[first]][leadSuit]!=0*/) { - if (posPoint->rankInSuit[rho[first]][leadSuit] + if (posPoint->rankInSuit[rho[first]][leadSuit] < bitMapRank[posPoint->move[depth+2].rank]) - winMove=TRUE; - } - else winMove=TRUE; + } if (winMove) { @@ -3701,6 +3739,7 @@ int WeightAllocNT(struct pos * posPoint, struct moveType * mp, int depth, suitCount=posPoint->length[q][suit]; suitAdd=(suitCount<<6)/(17/*27*//*30*//*35*/); + /* Discourage suit discard if 2nd highest card becomes singleton. */ if ((suitCount==2)&&(posPoint->secondBest[suit].hand==q)) suitAdd-=(6/*2*//*5*/); weight=-(mp->rank)+suitAdd; @@ -3714,15 +3753,15 @@ int WeightAllocNT(struct pos * posPoint, struct moveType * mp, int depth, suitCount=posPoint->length[q][suit]; suitAdd=(suitCount<<6)/(24/*26*//*29*//*35*/); if ((suitCount==2)&&(posPoint->secondBest[suit].hand==q)) - suitAdd-=(4/*5*/); + suitAdd-=(4/*5*/); + /* Discourage suit discard of highest card. */ else if ((suitCount==1)&&(posPoint->winner[suit].hand==q)) suitAdd-=(4/*5*/); - weight=-(mp->rank)+suitAdd; /* Insensitive */ + weight=-(mp->rank)+suitAdd; } else { - /*weight=20-(mp->rank);*/ k=posPoint->rankInSuit[rho[first]][suit]; if ((k & (-k)) > bitMapRank[mp->rank]) @@ -3777,7 +3816,7 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, int weight=0, k, l, kk, ll, suit, suitAdd=0, leadSuit; int suitWeightDelta, first, q, rRank, thirdBestHand; int suitBonus=0; - int winMove=FALSE; + int winMove=FALSE; /* If winMove is true, current move can win the current trick. */ unsigned short suitCount, suitCountLH, suitCountRH, aggr; int countLH, countRH; @@ -3796,36 +3835,47 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, suitCountLH=posPoint->length[lho[q]][suit]; suitCountRH=posPoint->length[rho[q]][suit]; + /* Discourage suit if LHO or RHO can ruff. */ + if ((suit!=trump) && - (((posPoint->rankInSuit[lho[q]][suit]==0) && + (((posPoint->rankInSuit[lho[q]][suit]==0) && (posPoint->rankInSuit[lho[q]][trump]!=0)) || ((posPoint->rankInSuit[rho[q]][suit]==0) && (posPoint->rankInSuit[rho[q]][trump]!=0)))) suitBonus=-17/*20*//*-10*/; + + /* Encourage suit if partner can ruff. */ if ((suit!=trump)&&(posPoint->length[partner[q]][suit]==0)&& - (posPoint->length[partner[q]][trump]>0)&&(suitCountRH>0)) + (posPoint->length[partner[q]][trump]>0)&&(suitCountRH>0)) suitBonus+=26/*28*/; + /* Discourage suit if RHO has high card. */ + if ((posPoint->winner[suit].hand==rho[q])|| (posPoint->secondBest[suit].hand==rho[q])) { if (suitCountRH!=1) suitBonus-=11/*12*//*13*//*18*/; } + + /* Try suit if LHO has winning card and partner second best. + Exception: partner has singleton. */ + else if ((posPoint->winner[suit].hand==lho[q])&& (posPoint->secondBest[suit].hand==partner[q])) { + /* This case was suggested by Joël Bradmetz. */ + if (posPoint->length[partner[q]][suit]!=1) suitBonus+=30/*28*//*22*/; } - /*else if ((posPoint->secondBest[suit].hand==lho[q])&& - (posPoint->winner[suit].hand==partner[q])) - suitBonus+=10;*/ - + + /* Encourage play of suit where partner wins and + returns the suit for a ruff. */ if ((suit!=trump)&&(suitCount==1)&& - (posPoint->length[q][trump]>0)&& - (posPoint->length[partner[q]][suit]>1)&& - (posPoint->winner[suit].hand==partner[q])) + (posPoint->length[q][trump]>0)&& + (posPoint->length[partner[q]][suit]>1)&& + (posPoint->winner[suit].hand==partner[q])) suitBonus+=23/*24*//*19*//*16*/; if (suitCountLH!=0) @@ -3837,6 +3887,10 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, else countRH=depth+4; + /* Discourage a suit selection where the search tree appears larger than for the + altenative suits: the search is estimated to be small when the added number of + alternative cards to play for the opponents is small. */ + suitWeightDelta=suitBonus- ((countLH+countRH)<<5)/(12/*15*/); @@ -3904,24 +3958,39 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, } if (winMove) { - if (((suitCountLH==1)&&(posPoint->winner[suit].hand==lho[first])) + + /* Encourage ruffing LHO or RHO singleton, highest card. */ + + if (((suitCountLH==1)&&(posPoint->winner[suit].hand==lho[first])) ||((suitCountRH==1)&&(posPoint->winner[suit].hand==rho[first]))) weight=suitWeightDelta+39+rRank; + + /* Lead hand has the highest card. */ + else if (posPoint->winner[suit].hand==first) { + + /* Also, partner has second highest card. */ + if (posPoint->secondBest[suit].hand==partner[first]) weight=suitWeightDelta+46+rRank; - else if (posPoint->winner[suit].rank==mp->rank) + else if (posPoint->winner[suit].rank==mp->rank) + + /* If the current card to play is the highest card. */ + weight=suitWeightDelta+31; else weight=suitWeightDelta-2+rRank; } else if (posPoint->winner[suit].hand==partner[first]) { - /* If partner has winning card */ + /* If partner has highest card */ if (posPoint->secondBest[suit].hand==first) weight=suitWeightDelta+35/*35*//*46*//*50*/+rRank; else weight=suitWeightDelta+24/*35*/+rRank; } + /* Encourage playing second highest rank if hand also has + third highest rank. */ + else if ((mp->sequence)&& (mp->rank==posPoint->secondBest[suit].rank)) weight=suitWeightDelta+41; @@ -3930,6 +3999,9 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, else weight=suitWeightDelta+11+rRank; + /* Encourage playing cards that previously caused search cutoff + or was stored as the best move in a transposition table entry match. */ + if ((bestMove[depth].suit==suit)&& (bestMove[depth].rank==mp->rank)) weight+=53/*50*//*52*/; @@ -3938,41 +4010,56 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, weight+=14/*15*//*12*//*11*/; } else { + + /* Encourage playing the suit if the hand together with partner have both the 2nd highest + and the 3rd highest cards such that the side of the hand has the highest card in the + next round playing this suit. */ + if ((posPoint->secondBest[suit].hand==partner[first])&&(partner[first]==thirdBestHand)) suitWeightDelta+=20/*22*/; - else if(((posPoint->secondBest[suit].hand==first)&&(partner[first]==thirdBestHand)&& + else if(((posPoint->secondBest[suit].hand==first)&&(partner[first]==thirdBestHand)&& (posPoint->length[partner[first]][suit]>1))|| ((posPoint->secondBest[suit].hand==partner[first])&& (first==thirdBestHand)&&(posPoint->length[partner[first]][suit]>1))) suitWeightDelta+=20/*24*/; + /* Higher weight if LHO or RHO has the highest (winning) card as a singleton. */ + if (((suitCountLH==1)&&(posPoint->winner[suit].hand==lho[first])) ||((suitCountRH==1)&&(posPoint->winner[suit].hand==rho[first]))) weight=suitWeightDelta+rRank-2; else if (posPoint->winner[suit].hand==first) { - if ((posPoint->secondBest[suit].rank!=0)&& - (posPoint->secondBest[suit].hand==partner[first])) + if (posPoint->secondBest[suit].hand==partner[first]) + + /* Opponents win by ruffing */ + weight=suitWeightDelta+33+rRank; else if (posPoint->winner[suit].rank==mp->rank) + + /* Opponents win by ruffing */ + weight=suitWeightDelta+36; else weight=suitWeightDelta-17+rRank; } else if (posPoint->winner[suit].hand==partner[first]) { - /* If partner has winning card */ - /*if (posPoint->secondBest[suit].hand==first)*/ + + /* Opponents win by ruffing */ + weight=suitWeightDelta+33+rRank; - /*else - weight=suitWeightDelta+28+rRank;*/ } + /* Encourage playing second highest rank if hand also has + third highest rank. */ + else if ((mp->sequence)&& (mp->rank==posPoint->secondBest[suit].rank)) weight=suitWeightDelta+31; - /*else if (mp->sequence) - weight=suitWeightDelta+25-rRank;*/ else weight=suitWeightDelta+13-(mp->rank); + /* Encourage playing cards that previously caused search cutoff + or was stored as the best move in a transposition table entry match. */ + if ((bestMove[depth].suit==suit)&& (bestMove[depth].rank==mp->rank)) weight+=17; @@ -4038,7 +4125,9 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, } } else { + /* Leading suit differs from suit played by LHO */ + if (suit==trump) { if (posPoint->length[partner[first]][leadSuit]!=0) winMove=TRUE; @@ -4052,7 +4141,9 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, winMove=TRUE; } else if (leadSuit!=trump) { + /* Neither suit nor leadSuit is trump */ + if (posPoint->length[partner[first]][leadSuit]!=0) { if (posPoint->rankInSuit[rho[first]][leadSuit] > (posPoint->rankInSuit[partner[first]][leadSuit] | @@ -4062,7 +4153,9 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, &&(posPoint->length[rho[first]][trump]!=0)) winMove=TRUE; } + /* Partner to leading hand is void in leading suit */ + else if ((posPoint->length[rho[first]][leadSuit]==0) &&(posPoint->rankInSuit[rho[first]][trump]> posPoint->rankInSuit[partner[first]][trump])) @@ -4082,42 +4175,52 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, } } + kk=posPoint->rankInSuit[partner[first]][leadSuit]; ll=posPoint->rankInSuit[rho[first]][leadSuit]; - k=kk & (-kk); l=ll & (-ll); /* Only least significant 1 bit */ + k=kk & (-kk); l=ll & (-ll); /* Only least significant 1 bit of + bit map ranks for partner and RHO. */ + if (winMove) { if (!notVoidInSuit) { suitCount=posPoint->length[q][suit]; suitAdd=(suitCount<<6)/(43/*36*/); + + /* Discourage suit discard if 2nd highest card becomes singleton. */ + if ((suitCount==2)&&(posPoint->secondBest[suit].hand==q)) suitAdd-=2; if (suit==trump) - weight=25/*23*/-(mp->rank)+suitAdd; + weight=25/*23*/-(mp->rank)+suitAdd; else weight=60-(mp->rank)+suitAdd; /* Better discard than ruff since rho wins anyway */ - } + } else if (k > bitMapRank[mp->rank]) weight=40/*41*/+rRank; - /* If lowest card for partner to leading hand - is higher than lho played card, playing as low as - possible will give the cheapest win */ + + /* If lowest card for partner to leading hand + is higher than lho played card, playing as low as + possible will give the cheapest win */ + else if ((ll > bitMapRank[posPoint->move[depth+1].rank])&& (posPoint->rankInSuit[first][leadSuit] > ll)) - weight=37/*40*/+rRank; + weight=37/*40*/+rRank; + /* If rho has a card in the leading suit that is higher than the trick leading card but lower than the highest rank of the leading hand, then lho playing the lowest card will be the cheapest win */ + else if (mp->rank > posPoint->move[depth+1].rank) { if (bitMapRank[mp->rank] < ll) weight=75-(mp->rank); /* If played card is lower than any of the cards of rho, it will be the cheapest win */ else if (bitMapRank[mp->rank] > kk) weight=70-(mp->rank); /* If played card is higher than any cards at partner - of the leading hand, rho can play low, under the + of the leading hand, rho can play low, under the condition that he has a lower card than lho played */ else { if (mp->sequence) @@ -4134,12 +4237,15 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, weight=45-(mp->rank); } else - weight=43/*45*/-(mp->rank); + weight=43/*45*/-(mp->rank); } else { if (!notVoidInSuit) { suitCount=posPoint->length[q][suit]; - suitAdd=(suitCount<<6)/(33/*36*/); + suitAdd=(suitCount<<6)/(33/*36*/); + + /* Discourage suit discard if 2nd highest card becomes singleton. */ + if ((suitCount==2)&&(posPoint->secondBest[suit].hand==q)) suitAdd-=(4/*2*/); @@ -4153,9 +4259,11 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, else if ((k > bitMapRank[mp->rank])|| (l > bitMapRank[mp->rank])) weight=-7/*-9*/+rRank; + /* If lowest rank for either partner to leading hand - or rho is higher than played card for lho, - lho should play as low card as possible */ + or rho is higher than played card for lho, + lho should play as low card as possible */ + else if (mp->rank > posPoint->move[depth+1].rank) { if (mp->sequence) weight=19/*19*/-(mp->rank); @@ -4165,7 +4273,6 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, else weight=-17+rRank; } - break; case 2: @@ -4175,7 +4282,7 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, if (suit==leadSuit) { if (leadSuit!=trump) { if (((posPoint->length[rho[first]][suit]!=0)|| - (posPoint->length[rho[first]][trump]==0))&& + (posPoint->length[rho[first]][trump]==0))&& (bitMapRank[mp->rank] > posPoint->rankInSuit[rho[first]][suit])) winMove=TRUE; @@ -4211,6 +4318,9 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, if (!notVoidInSuit) { suitCount=posPoint->length[q][suit]; suitAdd=(suitCount<<6)/(48/*36*/); + + /* Discourage suit discard if 2nd highest card becomes singleton. */ + if ((suitCount==2)&&(posPoint->secondBest[suit].hand==q)) suitAdd-=(3/*2*/); @@ -4221,7 +4331,9 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, weight=60-(mp->rank)+suitAdd; } else if (WinningMove(mp, &(posPoint->move[depth+1]))) + /* Own hand on top by ruffing */ + weight=70-(mp->rank)+suitAdd; } else @@ -4231,14 +4343,21 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, if (!notVoidInSuit) { suitCount=posPoint->length[q][suit]; suitAdd=(suitCount<<6)/36; + + /* Discourage suit discard if 2nd highest card becomes singleton. */ + if ((suitCount==2)&&(posPoint->secondBest[suit].hand==q)) suitAdd-=(4/*2*/); if (WinningMove(mp, &(posPoint->move[depth+1]))) + /* Own hand on top by ruffing */ + weight=40-(mp->rank)+suitAdd; else if (suit==trump) + /* Discard a trump but still losing */ + weight=-/*33*/36+rRank+suitAdd; else weight=-(mp->rank)+suitAdd; @@ -4247,9 +4366,15 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, k=posPoint->rankInSuit[rho[first]][suit]; if ((k & (-k)) > bitMapRank[mp->rank]) + /* If least bit map rank of RHO to lead hand is higher than bit map rank + of current card move. */ + weight=-(mp->rank); else if (WinningMove(mp, &(posPoint->move[depth+1]))) { + + /* If current card move is highest so far. */ + if (mp->rank==posPoint->secondBest[leadSuit].rank) weight=25; else if (mp->sequence) @@ -4272,15 +4397,21 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, suitAdd-=(2/*0*//*2*/); if ((posPoint->high[depth+1])==lho[first]) { + /* If the current winning move is given by the partner */ + if (suit==trump) + /* Ruffing partners winner? */ + weight=2/*17*/-(mp->rank)+suitAdd; else weight=25-(mp->rank)+suitAdd; } else if (WinningMove(mp, &(posPoint->move[depth+1]))) + /* Own hand ruffs */ + weight=33/*27*/+rRank+suitAdd; else if (suit==trump) weight=-13+rRank; @@ -4288,22 +4419,32 @@ int WeightAllocTrump(struct pos * posPoint, struct moveType * mp, int depth, weight=14-(mp->rank)+suitAdd; } else if ((posPoint->high[depth+1])==(lho[first])) { + /* If the current winning move is given by the partner */ + if (suit==trump) + /* Ruffs partners winner */ + weight=11+rRank; else weight=17+rRank; } else if (WinningMove(mp, &(posPoint->move[depth+1]))) + /* If present move is superior to current winning move and the current winning move is not given by the partner */ + weight=22+rRank; else { + /* If present move is not superior to current winning move and the current winning move is not given by the partner */ + if (suit==trump) + /* Ruffs but still loses */ + weight=-13+rRank; else weight=1+rRank; diff --git a/dll.h b/dll.h index 7cbc4db6..63ca7bd2 100644 --- a/dll.h +++ b/dll.h @@ -31,7 +31,7 @@ /* end of portability-macros section */ -#define DDS_VERSION 10117 /* Version 1.1.17. Allowing for 2 digit +#define DDS_VERSION 10118 /* Version 1.1.18. Allowing for 2 digit minor versions */ /*#define BENCH*/ diff --git a/release_notes.txt b/release_notes.txt index 09cad7ce..541610b9 100644 --- a/release_notes.txt +++ b/release_notes.txt @@ -391,6 +391,11 @@ faster DLLs and does not require any supporting DLLs. Also, the move ordering has been slighly improved. A total speed increase of 4% is achieved compared to 1.1.16. +Release Notes DDS 1.1.18 +------------------------ +Change of license from GPL to Apache 2.0. +Some minor changes in the WeightAlloc functions. +