EXchess - experimental chess engine (capable of beating Crafty)
This commit is contained in:
parent
5b56ecc37d
commit
b89efb04df
12 changed files with 215 additions and 0 deletions
30
games/exchess/Makefile
Normal file
30
games/exchess/Makefile
Normal file
|
@ -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"
|
26
games/exchess/files/Makefile
Normal file
26
games/exchess/files/Makefile
Normal file
|
@ -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}
|
3
games/exchess/files/md5
Normal file
3
games/exchess/files/md5
Normal file
|
@ -0,0 +1,3 @@
|
|||
$NetBSD: md5,v 1.1.1.1 2000/10/25 08:40:00 jlam Exp $
|
||||
|
||||
MD5 (EXCH314S.zip) = 36ac1ebff0f61b91fe4076a76fd4955b
|
7
games/exchess/files/patch-sum
Normal file
7
games/exchess/files/patch-sum
Normal file
|
@ -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
|
22
games/exchess/patches/patch-aa
Normal file
22
games/exchess/patches/patch-aa
Normal file
|
@ -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;
|
13
games/exchess/patches/patch-ab
Normal file
13
games/exchess/patches/patch-ab
Normal file
|
@ -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
|
||||
};
|
35
games/exchess/patches/patch-ac
Normal file
35
games/exchess/patches/patch-ac
Normal file
|
@ -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
|
39
games/exchess/patches/patch-ad
Normal file
39
games/exchess/patches/patch-ad
Normal file
|
@ -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 */
|
22
games/exchess/patches/patch-ae
Normal file
22
games/exchess/patches/patch-ae
Normal file
|
@ -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
|
||||
#
|
1
games/exchess/pkg/COMMENT
Normal file
1
games/exchess/pkg/COMMENT
Normal file
|
@ -0,0 +1 @@
|
|||
experimental chess engine
|
11
games/exchess/pkg/DESCR
Normal file
11
games/exchess/pkg/DESCR
Normal file
|
@ -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.
|
6
games/exchess/pkg/PLIST
Normal file
6
games/exchess/pkg/PLIST
Normal file
|
@ -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
|
Loading…
Reference in a new issue