summaryrefslogtreecommitdiff
path: root/games/exchess
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2000-10-25 08:40:00 +0000
committerjlam <jlam@pkgsrc.org>2000-10-25 08:40:00 +0000
commitb89efb04df502053316a7c89f46fd9f5af2b5bf6 (patch)
treeb04f0009cb794a43051522e83b659c368bf170b9 /games/exchess
parent5b56ecc37d42fc577efb8dbd666204fd839548d7 (diff)
downloadpkgsrc-b89efb04df502053316a7c89f46fd9f5af2b5bf6.tar.gz
EXchess - experimental chess engine (capable of beating Crafty)
Diffstat (limited to 'games/exchess')
-rw-r--r--games/exchess/Makefile30
-rw-r--r--games/exchess/files/Makefile26
-rw-r--r--games/exchess/files/md53
-rw-r--r--games/exchess/files/patch-sum7
-rw-r--r--games/exchess/patches/patch-aa22
-rw-r--r--games/exchess/patches/patch-ab13
-rw-r--r--games/exchess/patches/patch-ac35
-rw-r--r--games/exchess/patches/patch-ad39
-rw-r--r--games/exchess/patches/patch-ae22
-rw-r--r--games/exchess/pkg/COMMENT1
-rw-r--r--games/exchess/pkg/DESCR11
-rw-r--r--games/exchess/pkg/PLIST6
12 files changed, 215 insertions, 0 deletions
diff --git a/games/exchess/Makefile b/games/exchess/Makefile
new file mode 100644
index 00000000000..ccbb994a662
--- /dev/null
+++ b/games/exchess/Makefile
@@ -0,0 +1,30 @@
+# $NetBSD: Makefile,v 1.1.1.1 2000/10/25 08:40:00 jlam Exp $
+
+DISTNAME= EXCH314S
+PKGNAME= exchess-3.14
+CATEGORIES= games
+MASTER_SITES= http://pc.astro.brandeis.edu/BRAG/people/dch/
+EXTRACT_SUFX= .zip
+
+MAINTAINER= jlam@netbsd.org
+HOMEPAGE= http://pc.astro.brandeis.edu/BRAG/people/dch/chess.html
+
+NO_WRKSUBDIR= # defined
+NO_CONFIGURE= # defined
+
+LIBDIR= ${PREFIX}/lib/exchess
+DOCDIR= ${PREFIX}/share/doc/exchess
+
+post-extract:
+ cd ${WRKSRC} && ${MV} search.par search.par.in
+ ${CP} ${FILESDIR}/Makefile ${WRKSRC}
+
+post-build:
+ ${SED} -e "s,@PREFIX@,${PREFIX},g" \
+ < ${WRKSRC}/search.par.in > ${WRKSRC}/search.par
+
+post-install:
+ ${INSTALL_DATA_DIR} ${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/readme.txt ${DOCDIR}
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/games/exchess/files/Makefile b/games/exchess/files/Makefile
new file mode 100644
index 00000000000..bc746ed77f9
--- /dev/null
+++ b/games/exchess/files/Makefile
@@ -0,0 +1,26 @@
+# $NetBSD: Makefile,v 1.1.1.1 2000/10/25 08:40:00 jlam Exp $
+
+BINDIR= ${PREFIX}/bin
+LIBDIR= ${PREFIX}/lib/exchess
+
+CPPFLAGS= -DEXCHESS_DIR=\"${LIBDIR}/\"
+
+OBJS= attacks.o book.o check.o exmove.o hash.o main.o movelist.o
+OBJS+= parse.o pcapts.o pmoves.o probe.o score.o search.o setup.o
+OBJS+= sort.o swap.o util.o
+
+all: exchess
+
+exchess: ${OBJS}
+ ${CXX} -o ${.TARGET} ${OBJS} -lm
+
+install: exchess
+ ${BSD_INSTALL_PROGRAM_DIR} ${BINDIR}
+ ${BSD_INSTALL_PROGRAM} exchess ${BINDIR}
+ ${BSD_INSTALL_DATA_DIR} ${LIBDIR}
+ ${BSD_INSTALL_DATA} search.par ${LIBDIR}
+
+.SUFFIXES: .cpp
+
+.cpp.o:
+ ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c ${.IMPSRC}
diff --git a/games/exchess/files/md5 b/games/exchess/files/md5
new file mode 100644
index 00000000000..e05c7a8859c
--- /dev/null
+++ b/games/exchess/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1.1.1 2000/10/25 08:40:00 jlam Exp $
+
+MD5 (EXCH314S.zip) = 36ac1ebff0f61b91fe4076a76fd4955b
diff --git a/games/exchess/files/patch-sum b/games/exchess/files/patch-sum
new file mode 100644
index 00000000000..41e3b3fbdf4
--- /dev/null
+++ b/games/exchess/files/patch-sum
@@ -0,0 +1,7 @@
+$NetBSD: patch-sum,v 1.1.1.1 2000/10/25 08:40:00 jlam Exp $
+
+MD5 (patch-aa) = 0239932bd835b3a30975dd9324f4faf9
+MD5 (patch-ab) = 8f1185e19a2c05e34299e9bad2214505
+MD5 (patch-ac) = 63fd37e3067b490fcf2270c339c14abd
+MD5 (patch-ad) = d84bc6cdf33588a7c67c53a8204a60e0
+MD5 (patch-ae) = a693341c00a78c346d901dd0c2777dcd
diff --git a/games/exchess/patches/patch-aa b/games/exchess/patches/patch-aa
new file mode 100644
index 00000000000..54aee032b5f
--- /dev/null
+++ b/games/exchess/patches/patch-aa
@@ -0,0 +1,22 @@
+$NetBSD: patch-aa,v 1.1.1.1 2000/10/25 08:40:00 jlam Exp $
+
+--- book.cpp.orig Sun Apr 30 09:56:26 2000
++++ book.cpp
+@@ -52,7 +52,7 @@
+ char outbook[100];
+ position temp_pos; // temporary position
+ move bmove; // book move under consideration
+- unsigned __int64 pcode; // hash code for position
++ u_int64_t pcode; // hash code for position
+ int i = -1, j = 0, k = 0, p; // loop variables
+ int count = 0, thresh, LINE_DEPTH; // control variables
+
+@@ -245,7 +245,7 @@
+ {
+ file_pos = 0;
+ int jump = int(file_size/2);
+- unsigned __int64 pcode = ZERO;
++ u_int64_t pcode = ZERO;
+
+ temporary_pos = p;
+ if(!exec_move(&temporary_pos, m, 1)) return 0;
diff --git a/games/exchess/patches/patch-ab b/games/exchess/patches/patch-ab
new file mode 100644
index 00000000000..03a4dd1f356
--- /dev/null
+++ b/games/exchess/patches/patch-ab
@@ -0,0 +1,13 @@
+$NetBSD: patch-ab,v 1.1.1.1 2000/10/25 08:40:00 jlam Exp $
+
+--- chess.h.orig Sat Feb 19 11:28:46 2000
++++ chess.h
+@@ -86,7 +86,7 @@
+ // Structure for position in the opening book
+
+ struct book_rec {
+- unsigned __int64 pos_code; // position hash code
++ u_int64_t pos_code; // position hash code
+ int score; // score for position
+ int gambit; // flag for gambit play
+ };
diff --git a/games/exchess/patches/patch-ac b/games/exchess/patches/patch-ac
new file mode 100644
index 00000000000..aaa1ef6f38e
--- /dev/null
+++ b/games/exchess/patches/patch-ac
@@ -0,0 +1,35 @@
+$NetBSD: patch-ac,v 1.1.1.1 2000/10/25 08:40:00 jlam Exp $
+
+--- define.h.orig Sun Apr 30 10:02:28 2000
++++ define.h
+@@ -4,25 +4,26 @@
+ #ifndef DEFINE_H
+ #define DEFINE_H
+
++#include <inttypes.h>
++
+ #define VERS 3.14 // program version number
+ #define MAXD 60 // max search depth
+ #define MATE 10000000 // mate score
+
+ // Compiler flags for different systems
+-#define BORLAND 1 // Selects a win95/NT compiler if set to 1
++#define BORLAND 0 // Selects a win95/NT compiler if set to 1
+ // this should work with MSVC and others as
+ // well
+ #define DEC 0 // Set to 1 for certain DEC Unix systems, not
+ // all will need it - some other unixes may
+ // need this if there are errors in "book.cpp"
+-#define UNIX 0 // Set to 1 for all Unix systems
++#define UNIX 1 // Set to 1 for all Unix systems
+ #define DOS 0 // Set to 1 for Auto232 DOS mode
+ #define DEBUG 0 // Set to 1 to debug mode... quite slow
+
+ // define 64 bit integers
+ #if !BORLAND
+- #define __int64 long long
+- #define ZERO 0ULL
++ #define ZERO 0
+ #else
+ #define ZERO 0ui64
+ #endif
diff --git a/games/exchess/patches/patch-ad b/games/exchess/patches/patch-ad
new file mode 100644
index 00000000000..c5b4672d1ea
--- /dev/null
+++ b/games/exchess/patches/patch-ad
@@ -0,0 +1,39 @@
+$NetBSD: patch-ad,v 1.1.1.1 2000/10/25 08:40:00 jlam Exp $
+
+--- main.cpp.orig Sat Apr 1 07:46:20 2000
++++ main.cpp
+@@ -17,6 +17,7 @@
+ #if UNIX
+ #include <sys/types.h>
+ #include <sys/time.h>
++ #include <unistd.h>
+ #else
+ #include <windows.h>
+ #include <time.h>
+@@ -56,7 +57,7 @@
+ extern int ponder, last_ponder, learn_count, learned;
+ extern unsigned long TAB_SIZE, PAWN_SIZE;
+
+-// executable directory
++// exchess opening book and search parameters directory
+ char exec_path[100];
+
+ // performance function
+@@ -93,16 +94,7 @@
+ learn_count = 0; learned = 0; learn_bk = 1; shout_book = 0;
+
+
+- strcpy(exec_path, argv[0]);
+- // parsing exec path
+- int last_slash = 0;
+- for(int j = 0; j < 100; j++) {
+- if(exec_path[j] == '\0') break;
+- if(exec_path[j] == '\\') last_slash = j;
+- if(exec_path[j] == '/') last_slash = j;
+- }
+-
+- exec_path[last_slash+1] = '\0';
++ strcpy(exec_path, EXCHESS_DIR);
+
+ /* initializing hash tables, check tables, scoring parameters,
+ and the random number seed and tablebases */
diff --git a/games/exchess/patches/patch-ae b/games/exchess/patches/patch-ae
new file mode 100644
index 00000000000..25b4ab71e2f
--- /dev/null
+++ b/games/exchess/patches/patch-ae
@@ -0,0 +1,22 @@
+$NetBSD: patch-ae,v 1.1.1.1 2000/10/25 08:40:00 jlam Exp $
+
+--- search.par.in.orig Sun Apr 30 09:59:16 2000
++++ search.par.in
+@@ -20,7 +20,7 @@
+
+ # Endgame Tablebases - if you have them installed
+
+-EGTB_PATH c:\projects\exchess\tb
++EGTB_PATH @PREFIX@/share/egtb
+ EGTB_CACHE_SIZE 2.0 # Tablebase cache size in megabytes
+
+ # Log File
+@@ -32,7 +32,7 @@
+
+ GAMBIT_SCORE 80 # Maximum gambit allowed
+ BOOK_FILE open_bk.dat # Name of the opening book file
+-BOOK_LEARNING 1 # Set to 0 for no book learning
++BOOK_LEARNING 0 # Set to 0 for no book learning
+
+ # Search Extensions
+ #
diff --git a/games/exchess/pkg/COMMENT b/games/exchess/pkg/COMMENT
new file mode 100644
index 00000000000..18c6cd63522
--- /dev/null
+++ b/games/exchess/pkg/COMMENT
@@ -0,0 +1 @@
+experimental chess engine
diff --git a/games/exchess/pkg/DESCR b/games/exchess/pkg/DESCR
new file mode 100644
index 00000000000..c20d628394e
--- /dev/null
+++ b/games/exchess/pkg/DESCR
@@ -0,0 +1,11 @@
+EXchess is an experimental chess engine supporting the following features:
+
+ * Support for Tim Mann's XBoard.
+ * Analysis features of XBoard.
+ * Brute force searches to 60 ply (1 ply = a move by one side).
+ * Hash tables for storing positions already visited in the search.
+ * Pondering. (Thinking on the opponent's time.)
+ * Recursive null move pruning.
+ * Quiescent capture search.
+ * Adjustable hash table size.
+ * Adjustable search and evaluation parameters.
diff --git a/games/exchess/pkg/PLIST b/games/exchess/pkg/PLIST
new file mode 100644
index 00000000000..0e1785ba3aa
--- /dev/null
+++ b/games/exchess/pkg/PLIST
@@ -0,0 +1,6 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2000/10/25 08:40:00 jlam Exp $
+bin/exchess
+lib/exchess/search.par
+share/doc/exchess/readme.txt
+@dirrm share/doc/exchess
+@dirrm lib/exchess