diff options
author | jlam <jlam@pkgsrc.org> | 2002-09-11 10:52:09 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-09-11 10:52:09 +0000 |
commit | 709fc4ab28ee4027bd7ea7fb8cd85a114a6e6dd9 (patch) | |
tree | 8f2016bae6ab4e791c81b943e95a48e0f40523bd /games/crafty/patches | |
parent | 143f87dee07d0f5f3b05c4e68a90a270a2ab2219 (diff) | |
download | pkgsrc-709fc4ab28ee4027bd7ea7fb8cd85a114a6e6dd9.tar.gz |
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.
Diffstat (limited to 'games/crafty/patches')
-rw-r--r-- | games/crafty/patches/patch-aa | 67 | ||||
-rw-r--r-- | games/crafty/patches/patch-ab | 32 |
2 files changed, 16 insertions, 83 deletions
diff --git a/games/crafty/patches/patch-aa b/games/crafty/patches/patch-aa deleted file mode 100644 index 48027b0eceb..00000000000 --- a/games/crafty/patches/patch-aa +++ /dev/null @@ -1,67 +0,0 @@ -$NetBSD: patch-aa,v 1.5 2001/03/09 19:55:58 jlam Exp $ - ---- Makefile.orig Mon Feb 5 16:20:35 2001 -+++ Makefile -@@ -135,7 +135,7 @@ - dos: - $(MAKE) target=DOS \ - CC=gcc CXX='$$(CC)' \ -- CFLAGS='$(CFLAGS) -fomit-frame-pointer -m486 -O3' \ -+ CFLAGS='$(CFLAGS) -fomit-frame-pointer -O3' \ - LDFLAGS='$(LDFLAGS)' \ - opt='$(opt) -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS \ - -DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B' \ -@@ -145,7 +145,7 @@ - freebsd: - $(MAKE) target=FreeBSD \ - CC=gcc CXX='$$(CC)' \ -- CFLAGS='$(CFLAGS) -fomit-frame-pointer -m486 -O3 -Wall' \ -+ CFLAGS='$(CFLAGS) -fomit-frame-pointer -O3 -Wall' \ - LDFLAGS='$(LDFLAGS)' \ - opt='$(opt) -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS \ - -DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B -DFAST' \ -@@ -243,7 +243,7 @@ - netbsd: - $(MAKE) target=NetBSD \ - CC=gcc CXX=g++ \ -- CFLAGS='$(CFLAGS) -D_REENTRANT -O3 -Wall \ -+ CFLAGS='$(CFLAGS) -D_REENTRANT -Wall \ - -fomit-frame-pointer -funroll-all-loops \ - -finline-functions -ffast-math' \ - LDFLAGS='$(LDFLAGS)' \ -@@ -253,7 +253,7 @@ - netbsd-i386: - $(MAKE) target=NetBSD \ - CC=gcc CXX=g++ \ -- CFLAGS='$(CFLAGS) -D_REENTRANT -O3 -Wall -m486 \ -+ CFLAGS='$(CFLAGS) -D_REENTRANT -Wall \ - -fomit-frame-pointer -funroll-all-loops \ - -finline-functions -ffast-math' \ - LDFLAGS='$(LDFLAGS)' \ -@@ -265,7 +265,7 @@ - netbsd-i386-elf: - $(MAKE) target=NetBSD \ - CC=gcc CXX=g++ \ -- CFLAGS='$(CFLAGS) -D_REENTRANT -O3 -Wall -m486 \ -+ CFLAGS='$(CFLAGS) -D_REENTRANT -Wall \ - -fomit-frame-pointer -funroll-all-loops \ - -finline-functions -ffast-math' \ - LDFLAGS='$(LDFLAGS)' \ -@@ -277,7 +277,7 @@ - netbsd-sparc: - $(MAKE) target=NetBSD \ - CC=gcc CXX=g++ \ -- CFLAGS='$(CFLAGS) -D_REENTRANT -O3 -Wall \ -+ CFLAGS='$(CFLAGS) -D_REENTRANT -Wall \ - -fomit-frame-pointer -funroll-all-loops \ - -finline-functions -ffast-math' \ - LDFLAGS='$(LDFLAGS)' \ -@@ -297,7 +297,7 @@ - os2: - $(MAKE) target=OS2 \ - CC=gcc CXX='$$(CC)' \ -- CFLAGS='$(CFLAGS) -fomit-frame-pointer -m486 -O3 -Wall' \ -+ CFLAGS='$(CFLAGS) -fomit-frame-pointer -O3 -Wall' \ - LDFLAGS='$(LDFLAGS) -Zexe -Zcrtdll -s' \ - opt='$(opt) -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS \ - -DUSE_ASSEMBLY_A -DUSE_ASSEMBLY_B -DFAST' \ diff --git a/games/crafty/patches/patch-ab b/games/crafty/patches/patch-ab index 9277af05ed2..bceff76c77d 100644 --- a/games/crafty/patches/patch-ab +++ b/games/crafty/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.3 2002/04/04 19:28:10 jmc Exp $ +$NetBSD: patch-ab,v 1.4 2002/09/11 10:52:10 jlam Exp $ ---- boolean.c.orig Thu Apr 4 07:18:52 2002 -+++ boolean.c Thu Apr 4 19:19:16 2002 -@@ -61,23 +61,49 @@ +--- boolean.c.orig Thu May 23 10:02:28 2002 ++++ boolean.c +@@ -61,23 +61,49 @@ int PopCnt(register BITBOARD a) { } int FirstOne(BITBOARD arg1) { @@ -10,13 +10,13 @@ $NetBSD: patch-ab,v 1.3 2002/04/04 19:28:10 jmc Exp $ + + j = k = 0; if (arg1>>48) -- return (first_ones[arg1>>48]); +- return (first_one[arg1>>48]); - if ((arg1>>32)&65535) -- return (first_ones[(arg1>>32)&65535]+16); +- return (first_one[(arg1>>32)&65535]+16); - if ((arg1>>16)&65535) -- return (first_ones[(arg1>>16)&65535]+32); -- return (first_ones[arg1&65535]+48); -+ i = ((BITBOARD)(arg1>>48)); +- 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; @@ -28,19 +28,19 @@ $NetBSD: patch-ab,v 1.3 2002/04/04 19:28:10 jmc Exp $ + j = 48; + } + while (i >>= 1) -+ k++; ++ k++; + k = 16 - k; + return (j + k - 1); } int LastOne(BITBOARD arg1) { - if (arg1&65535) -- return (last_ones[arg1&65535]+48); +- return (last_one[arg1&65535]+48); - if ((arg1>>16)&65535) -- return (last_ones[(arg1>>16)&65535]+32); +- return (last_one[(arg1>>16)&65535]+32); - if ((arg1>>32)&65535) -- return (last_ones[(arg1>>32)&65535]+16); -- return (last_ones[arg1>>48]); +- return (last_one[(arg1>>32)&65535]+16); +- return (last_one[arg1>>48]); + unsigned int i,j,k; + + j = k = 0; @@ -57,8 +57,8 @@ $NetBSD: patch-ab,v 1.3 2002/04/04 19:28:10 jmc Exp $ + i = arg1>>48; + + while ((i & 0x1) == 0) { -+ i >>= 1; -+ k++; ++ i >>= 1; ++ k++; + } + k = 16 - k; + return j + k - 1; |