head 1.7; access; symbols pkgsrc-2022Q3:1.6.0.116 pkgsrc-2022Q3-base:1.6 pkgsrc-2022Q2:1.6.0.114 pkgsrc-2022Q2-base:1.6 pkgsrc-2022Q1:1.6.0.112 pkgsrc-2022Q1-base:1.6 pkgsrc-2021Q4:1.6.0.110 pkgsrc-2021Q4-base:1.6 pkgsrc-2021Q3:1.6.0.108 pkgsrc-2021Q3-base:1.6 pkgsrc-2021Q2:1.6.0.106 pkgsrc-2021Q2-base:1.6 pkgsrc-2021Q1:1.6.0.104 pkgsrc-2021Q1-base:1.6 pkgsrc-2020Q4:1.6.0.102 pkgsrc-2020Q4-base:1.6 pkgsrc-2020Q3:1.6.0.100 pkgsrc-2020Q3-base:1.6 pkgsrc-2020Q2:1.6.0.96 pkgsrc-2020Q2-base:1.6 pkgsrc-2020Q1:1.6.0.76 pkgsrc-2020Q1-base:1.6 pkgsrc-2019Q4:1.6.0.98 pkgsrc-2019Q4-base:1.6 pkgsrc-2019Q3:1.6.0.94 pkgsrc-2019Q3-base:1.6 pkgsrc-2019Q2:1.6.0.92 pkgsrc-2019Q2-base:1.6 pkgsrc-2019Q1:1.6.0.90 pkgsrc-2019Q1-base:1.6 pkgsrc-2018Q4:1.6.0.88 pkgsrc-2018Q4-base:1.6 pkgsrc-2018Q3:1.6.0.86 pkgsrc-2018Q3-base:1.6 pkgsrc-2018Q2:1.6.0.84 pkgsrc-2018Q2-base:1.6 pkgsrc-2018Q1:1.6.0.82 pkgsrc-2018Q1-base:1.6 pkgsrc-2017Q4:1.6.0.80 pkgsrc-2017Q4-base:1.6 pkgsrc-2017Q3:1.6.0.78 pkgsrc-2017Q3-base:1.6 pkgsrc-2017Q2:1.6.0.74 pkgsrc-2017Q2-base:1.6 pkgsrc-2017Q1:1.6.0.72 pkgsrc-2017Q1-base:1.6 pkgsrc-2016Q4:1.6.0.70 pkgsrc-2016Q4-base:1.6 pkgsrc-2016Q3:1.6.0.68 pkgsrc-2016Q3-base:1.6 pkgsrc-2016Q2:1.6.0.66 pkgsrc-2016Q2-base:1.6 pkgsrc-2016Q1:1.6.0.64 pkgsrc-2016Q1-base:1.6 pkgsrc-2015Q4:1.6.0.62 pkgsrc-2015Q4-base:1.6 pkgsrc-2015Q3:1.6.0.60 pkgsrc-2015Q3-base:1.6 pkgsrc-2015Q2:1.6.0.58 pkgsrc-2015Q2-base:1.6 pkgsrc-2015Q1:1.6.0.56 pkgsrc-2015Q1-base:1.6 pkgsrc-2014Q4:1.6.0.54 pkgsrc-2014Q4-base:1.6 pkgsrc-2014Q3:1.6.0.52 pkgsrc-2014Q3-base:1.6 pkgsrc-2014Q2:1.6.0.50 pkgsrc-2014Q2-base:1.6 pkgsrc-2014Q1:1.6.0.48 pkgsrc-2014Q1-base:1.6 pkgsrc-2013Q4:1.6.0.46 pkgsrc-2013Q4-base:1.6 pkgsrc-2013Q3:1.6.0.44 pkgsrc-2013Q3-base:1.6 pkgsrc-2013Q2:1.6.0.42 pkgsrc-2013Q2-base:1.6 pkgsrc-2013Q1:1.6.0.40 pkgsrc-2013Q1-base:1.6 pkgsrc-2012Q4:1.6.0.38 pkgsrc-2012Q4-base:1.6 pkgsrc-2012Q3:1.6.0.36 pkgsrc-2012Q3-base:1.6 pkgsrc-2012Q2:1.6.0.34 pkgsrc-2012Q2-base:1.6 pkgsrc-2012Q1:1.6.0.32 pkgsrc-2012Q1-base:1.6 pkgsrc-2011Q4:1.6.0.30 pkgsrc-2011Q4-base:1.6 pkgsrc-2011Q3:1.6.0.28 pkgsrc-2011Q3-base:1.6 pkgsrc-2011Q2:1.6.0.26 pkgsrc-2011Q2-base:1.6 pkgsrc-2011Q1:1.6.0.24 pkgsrc-2011Q1-base:1.6 pkgsrc-2010Q4:1.6.0.22 pkgsrc-2010Q4-base:1.6 pkgsrc-2010Q3:1.6.0.20 pkgsrc-2010Q3-base:1.6 pkgsrc-2010Q2:1.6.0.18 pkgsrc-2010Q2-base:1.6 pkgsrc-2010Q1:1.6.0.16 pkgsrc-2010Q1-base:1.6 pkgsrc-2009Q4:1.6.0.14 pkgsrc-2009Q4-base:1.6 pkgsrc-2009Q3:1.6.0.12 pkgsrc-2009Q3-base:1.6 pkgsrc-2009Q2:1.6.0.10 pkgsrc-2009Q2-base:1.6 pkgsrc-2009Q1:1.6.0.8 pkgsrc-2009Q1-base:1.6 pkgsrc-2008Q4:1.6.0.6 pkgsrc-2008Q4-base:1.6 pkgsrc-2008Q3:1.6.0.4 pkgsrc-2008Q3-base:1.6 cube-native-xorg:1.6.0.2 cube-native-xorg-base:1.6 pkgsrc-2008Q2:1.5.0.2 pkgsrc-2008Q2-base:1.5 pkgsrc-2008Q1:1.4.0.38 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.36 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.34 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.32 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.30 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.28 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.4.0.26 pkgsrc-2006Q3-base:1.4 pkgsrc-2006Q2:1.4.0.24 pkgsrc-2006Q2-base:1.4 pkgsrc-2006Q1:1.4.0.22 pkgsrc-2006Q1-base:1.4 pkgsrc-2005Q4:1.4.0.20 pkgsrc-2005Q4-base:1.4 pkgsrc-2005Q3:1.4.0.18 pkgsrc-2005Q3-base:1.4 pkgsrc-2005Q2:1.4.0.16 pkgsrc-2005Q2-base:1.4 pkgsrc-2005Q1:1.4.0.14 pkgsrc-2005Q1-base:1.4 pkgsrc-2004Q4:1.4.0.12 pkgsrc-2004Q4-base:1.4 pkgsrc-2004Q3:1.4.0.10 pkgsrc-2004Q3-base:1.4 pkgsrc-2004Q2:1.4.0.8 pkgsrc-2004Q2-base:1.4 pkgsrc-2004Q1:1.4.0.6 pkgsrc-2004Q1-base:1.4 pkgsrc-2003Q4:1.4.0.4 pkgsrc-2003Q4-base:1.4 netbsd-1-6-1:1.4.0.2 netbsd-1-6-1-base:1.4 netbsd-1-6:1.3.0.8 netbsd-1-6-RELEASE-base:1.3 pkgviews:1.3.0.4 pkgviews-base:1.3 buildlink2:1.3.0.2 buildlink2-base:1.3 netbsd-1-5-PATCH003:1.3 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.7 date 2022.12.25.09.00.36; author wiz; state dead; branches; next 1.6; commitid YBK7GI8H1FFwYU6E; 1.6 date 2008.08.17.21.00.20; author dholland; state Exp; branches; next 1.5; 1.5 date 2008.05.25.15.56.02; author joerg; state dead; branches; next 1.4; 1.4 date 2002.09.11.10.52.10; author jlam; state Exp; branches; next 1.3; 1.3 date 2002.04.04.19.28.10; author jmc; state Exp; branches; next 1.2; 1.2 date 2000.11.10.17.34.11; author jlam; state dead; branches; next 1.1; 1.1 date 2000.10.15.02.06.27; author jlam; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2000.10.15.02.06.27; author jlam; state Exp; branches; next ; desc @@ 1.7 log @crafty*: remove sources from 2008; homepage says 'Crafty has been retired for some time' It still built, but dumped core when building its books. @ text @$NetBSD: patch-ab,v 1.6 2008/08/17 21:00:20 dholland Exp $ --- egtb.cpp~ 2008-04-15 18:41:49.000000000 -0400 +++ egtb.cpp 2008-08-17 16:21:19.000000000 -0400 @@@@ -332,7 +332,7 @@@@ static void* PvMalloc pv = malloc (cb); if (NULL == pv) { - printf ("*** Cannot allocate %d bytes of memory\n", cb); + printf ("*** Cannot allocate %zu bytes of memory\n", cb); exit (1); } cbAllocated += cb; @@@@ -1268,24 +1268,24 @@@@ static void VInitEnumerations (void) if (fPrint) { for (pi1 = x_pieceNone; pi1 <= x_pieceQueen; pi1 = (piece) (pi1 + 1)) - printf ("%c - %d enumerated positions\n", "pPNBRQ"[pi1], rgcSinglePawnPresent[pi1]); + printf ("%c - %ld enumerated positions\n", "pPNBRQ"[pi1], rgcSinglePawnPresent[pi1]); for (pi1 = x_pieceNone; pi1 <= x_pieceQueen; pi1 = (piece) (pi1 + 1)) { if (0 != rgcSinglePawnless[pi1]) - printf ("pawnless %c - %d enumerated positions\n", "pPNBRQ"[pi1], rgcSinglePawnless[pi1]); + printf ("pawnless %c - %ld enumerated positions\n", "pPNBRQ"[pi1], rgcSinglePawnless[pi1]); } for (pi1 = x_pieceNone; pi1 <= x_pieceQueen; pi1 = (piece) (pi1 + 1)) for (pi2 = x_pieceNone; pi2 <= pi1; pi2 = (piece) (pi2 + 1)) { if (0 != rgcPairPawnPresent[pi1][pi2]) - printf ("%c%c - %d enumerated positions\n", "pPNBRQ"[pi1], "pPNBRQ"[pi2], + printf ("%c%c - %ld enumerated positions\n", "pPNBRQ"[pi1], "pPNBRQ"[pi2], rgcPairPawnPresent[pi1][pi2]); } for (pi1 = x_pieceNone; pi1 <= x_pieceQueen; pi1 = (piece) (pi1 + 1)) for (pi2 = x_pieceNone; pi2 <= pi1; pi2 = (piece) (pi2 + 1)) { if (0 != rgcPairPawnless[pi1][pi2]) - printf ("pawnless %c%c - %d enumerated positions\n", "pPNBRQ"[pi1], "pPNBRQ"[pi2], + printf ("pawnless %c%c - %ld enumerated positions\n", "pPNBRQ"[pi1], "pPNBRQ"[pi2], rgcPairPawnless[pi1][pi2]); } #if defined (T41_INCLUDE) || defined (T42_INCLUDE) @@@@ -1294,7 +1294,7 @@@@ static void VInitEnumerations (void) for (pi3 = x_pieceNone; pi3 <= pi2; pi3 = (piece) (pi3 + 1)) { if (0 != rgcTriplePawnPresent[pi1][pi2][pi3]) - printf ("%c%c%c - %d enumerated positions\n", + printf ("%c%c%c - %ld enumerated positions\n", "pPNBRQ"[pi1], "pPNBRQ"[pi2], "pPNBRQ"[pi3], rgcTriplePawnPresent[pi1][pi2][pi3]); } @@@@ -1303,12 +1303,12 @@@@ static void VInitEnumerations (void) for (pi3 = x_pieceNone; pi3 <= pi2; pi3 = (piece) (pi3 + 1)) { if (0 != rgcTriplePawnless[pi1][pi2][pi3]) - printf ("pawnless %c%c%c - %d enumerated positions\n", + printf ("pawnless %c%c%c - %ld enumerated positions\n", "pPNBRQ"[pi1], "pPNBRQ"[pi2], "pPNBRQ"[pi3], rgcTriplePawnless[pi1][pi2][pi3]); } #endif - printf ("\nAllocated %dk\n\n", (cbAllocated + 1023)/1024); + printf ("\nAllocated %zuk\n\n", (cbAllocated + 1023)/1024); } } @ 1.6 log @Fix some 64-bit issues and a y2038 bug I noticed in passing. Also, round size of shmget() requests to be page-aligned; at least on amd64 -current this seems to be required to run at all. PKGREVISION++. @ text @d1 1 a1 1 $NetBSD$ @ 1.5 log @Update to crafty 22.1. Always use the NetBSD rules, we can fixup issues if they happen. Don't install the ECO classification as opening book, it is essentially useful. No detailed ChangeLog, but this fixes some crashes with invalid games, brings SMP support and increases to the strength of crafty. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.4 2002/09/11 10:52:10 jlam Exp $ d3 63 a65 4 --- boolean.c.orig Thu May 23 10:02:28 2002 +++ boolean.c @@@@ -61,23 +61,49 @@@@ int PopCnt(register BITBOARD a) { } a66 60 int FirstOne(BITBOARD arg1) { + unsigned int i, j, k; + + j = k = 0; if (arg1>>48) - return (first_one[arg1>>48]); - if ((arg1>>32)&65535) - return (first_one[(arg1>>32)&65535]+16); - if ((arg1>>16)&65535) - return (first_one[(arg1>>16)&65535]+32); - return (first_one[arg1&65535]+48); + i = ((BITBOARD)(arg1>>48)); + else if ((arg1>>32)&65535) { + i = ((arg1>>32)&65535); + j = 16; + } else if ((arg1>>16)&65535) { + i = (arg1>>16)&65535; + j = 32; + } else { + i = arg1&65535; + j = 48; + } + while (i >>= 1) + k++; + k = 16 - k; + return (j + k - 1); } int LastOne(BITBOARD arg1) { - if (arg1&65535) - return (last_one[arg1&65535]+48); - if ((arg1>>16)&65535) - return (last_one[(arg1>>16)&65535]+32); - if ((arg1>>32)&65535) - return (last_one[(arg1>>32)&65535]+16); - return (last_one[arg1>>48]); + unsigned int i,j,k; + + j = k = 0; + if (arg1&65535) { + i = arg1&65535; + j = 48; + } else if ((arg1>>16)&65535) { + i = (arg1>>16)&65535; + j = 32; + } else if ((arg1>>32)&65535) { + i = (arg1>>32)&65535; + j = 16; + } else + i = arg1>>48; + + while ((i & 0x1) == 0) { + i >>= 1; + k++; + } + k = 16 - k; + return j + k - 1; } #endif #endif @ 1.4 log @Update games/crafty to 18.15. Changes from version 18.13 include: 18.14 Minor bug in ResignOrDraw() code caused Crafty to not offer draws although it would accept them when appropriate. Rook vs Minor is now evaluated as "neither side can win" an oversight in the EvaluateWinner() code. minor bug in ResignOrDraw() would fail to offer draws due to the +0.01/-0.01 draw scores returned by the EGTB probe code. 18.15 change in endgame draw recognition to handle the case where one side appears to be in a lost ending but is stalemated. the code now evaluates such positions as "DrawScore()" instead. the code to accept/decline draws has been modified. when a draw offer is received, a global variable "draw_offer_pending" is set to 1. when the search for a move for crafty terminates, crafty then uses this value to decide whether to accept or decline the draw. this means that the accept/decline won't happen until _after_ the search has a chance to see if something good is happening that should cause the draw to be declined, closing a timing hole that used to exist that let a few "suspects" get away with draws that should not have happened (ie crafty has - scores for a long time, the opponent suddenly fails low and sees he is losing and offers a draw quickly. Crafty would accept before doing a search and noticing that it was suddenly winning.) minor evaluation change to notice that K+B+right RP vs K+B is not necessarily won if the weaker side has a bishop of the right color. @ text @d1 1 a1 1 $NetBSD$ @ 1.3 log @Provide a FirstOne and LastOne implemention for archs without hand crafted assembly substitutes. @ text @d3 3 a5 3 --- boolean.c.orig Thu Apr 4 07:18:52 2002 +++ boolean.c Thu Apr 4 19:19:16 2002 @@@@ -61,23 +61,49 @@@@ d13 1 a13 1 - return (first_ones[arg1>>48]); d15 1 a15 1 - return (first_ones[(arg1>>32)&65535]+16); d17 3 a19 3 - return (first_ones[(arg1>>16)&65535]+32); - return (first_ones[arg1&65535]+48); + i = ((BITBOARD)(arg1>>48)); d31 1 a31 1 + k++; d38 1 a38 1 - return (last_ones[arg1&65535]+48); d40 1 a40 1 - return (last_ones[(arg1>>16)&65535]+32); d42 2 a43 2 - return (last_ones[(arg1>>32)&65535]+16); - return (last_ones[arg1>>48]); d60 2 a61 2 + i >>= 1; + k++; @ 1.2 log @Update crafty to 17.14. The author kindly accepted all patches back into the main source tree, so no more pkgsrc patches. Changes from version 17.13: another endgame evaluation problem fixed. the outside passed pawn code worked well, up until the point the pawn had to be given up to decoy the other side's king away from the remainder of the pawns. Crafty now understands the king being closer to the pawns than the enemy king, and therefore transitions from outside passer to won king-pawn ending much cleaner. new command "selective" as requested by S. Lim, which allows the user to set the min/max null move R values (default=2/3). they can be set to 0 which disables null-move totally, or they can be set larger than the default for testing. minor changes to init.c sent by Eugene Nalimov to handle 64 bit pointer declarations for win64 executable compilation. NetBSD changes included along with a new Makefile that requires no editing to use for any known configuration ("make help" will explain how to use it). this was submitted by Johnny Lam. serious changes to the outside passed pawn code. the evaluator now understands that outside passers on _both_ sides of the board is basically winning. same goes for candidate passers. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.1 2000/10/15 02:06:27 jlam Exp $ d3 4 a6 5 --- chess.h.orig Sun Aug 13 23:59:55 2000 +++ chess.h @@@@ -54,6 +54,12 @@@@ #define CDECL #define STDCALL d8 2 a9 4 +/* Provide reasonable defaults for UNIX systems. */ +#undef HAS_64BITS /* machine has 64-bit integers / operators */ +#define HAS_LONGLONG /* machine has 32-bit/64-bit integers */ +#define UNIX /* system is unix-based */ d11 55 a65 7 +/* Architecture-specific definitions */ #if defined(AIX) # undef HAS_64BITS /* machine has 64-bit integers / operators */ # define HAS_LONGLONG /* machine has 32-bit/64-bit integers */ @@@@ -99,6 +105,17 @@@@ # define HAS_LONGLONG /* machine has 32-bit/64-bit integers */ # define UNIX /* system is unix-based */ a66 54 +#if defined(NetBSD) +# if defined(__alpha__) +# define HAS_64BITS /* machine has 64-bit integers / operators */ +# undef HAS_LONGLONG /* machine has 32-bit/64-bit integers */ +# define UNIX /* system is unix-based */ +# else +# undef HAS_64BITS /* machine has 64-bit integers / operators */ +# define HAS_LONGLONG /* machine has 32-bit/64-bit integers */ +# define UNIX /* system is unix-based */ +# endif +#endif #if defined(NEXT) # undef HAS_64BITS /* machine has 64-bit integers / operators */ # define HAS_LONGLONG /* machine has 32-bit/64-bit integers */ @@@@ -156,16 +173,34 @@@@ # define COMPACT_ATTACKS # define USE_ATTACK_FUNCTIONS +#endif -# define BOOKDIR "Books" -# define LOGDIR "Logs" -# define TBDIR "TB" -# define RCDIR "." +#if defined(MACOS) +# if !defined(BOOKDIR) +# define BOOKDIR "Books" +# endif +# if !defined(LOGDIR) +# define LOGDIR "Logs" +# endif +# if !defined(TBDIR) +# define TBDIR "TB" +# endif +# if !defined(RCDIR) +# define RCDIR "." +# endif #else -# define BOOKDIR "." -# define LOGDIR "." -# define TBDIR "./TB" -# define RCDIR "." +# if !defined(BOOKDIR) +# define BOOKDIR "." +# endif +# if !defined(LOGDIR) +# define LOGDIR "." +# endif +# if !defined(TBDIR) +# define TBDIR "./TB" +# endif +# if !defined(RCDIR) +# define RCDIR "." +# endif a67 11 # define EGTB_CACHE_DEFAULT 1024*1024 @@@@ -195,7 +230,7 @@@@ extension is exactly one ply. */ -#define INCPLY 60 /* 1.00 */ +#define INCPLY 60 /* 1.00 */ #define NULL_MOVE_DEPTH 120 /* 2.00 */ #define RAZORING_DEPTH 60 /* 1.00 */ @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD$ @ 1.1.1.1 log @crafty: chess engine -- plays a MUCH better game of chess than GNU Chess. @ text @@