• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

books/H03-May-2022-321235

tests/H03-May-2022-1,3361,278

AUTHORSH A D03-May-2022125 32

BUGSH A D03-May-2022467 1912

COPYINGH A D03-May-202217.6 KiB341281

ChangeLogH A D03-May-20229.5 KiB352220

INSTALLH A D03-May-20222.4 KiB5341

Makefile.amH A D03-May-2022396 98

Makefile.inH A D03-May-202213 KiB432338

NEWSH A D03-May-20226.2 KiB240202

READMEH A D03-May-202210.4 KiB341237

THANKSH A D03-May-2022417 1211

TODOH A D03-May-2022121 74

aclocal.m4H A D03-May-20224.3 KiB128113

attacks.cH A D03-May-202213.4 KiB544413

blob2.cH A D03-May-2022509 2722

book.cH A D03-May-20226.4 KiB256174

config.h.inH A D03-May-20221.1 KiB4831

configureH A D03-May-202262.2 KiB2,0441,652

configure.inH A D03-May-2022658 3021

crazy.cH A D03-May-20227 KiB335244

draw.cH A D03-May-20223.4 KiB10343

ecache.cH A D03-May-20222.1 KiB9755

epd.cH A D03-May-20227.8 KiB334232

eval.cH A D03-May-202220.7 KiB759602

extvars.hH A D03-May-20224.6 KiB195121

install-shH A D03-May-20224.7 KiB239152

learn.cH A D03-May-20223.2 KiB13996

leval.cH A D03-May-20229.5 KiB428291

missingH A D03-May-20226.1 KiB191154

mkinstalldirsH A D03-May-2022649 3318

moves.cH A D03-May-202251.1 KiB2,2661,719

neval.cH A D03-May-202241.4 KiB1,8061,279

newbook.cH A D03-May-202214.5 KiB701508

partner.cH A D03-May-202220.8 KiB804652

probe.cH A D03-May-20226 KiB299233

proof.cH A D03-May-202228.9 KiB1,6541,281

protos.hH A D03-May-20225.1 KiB175119

rcfile.cH A D03-May-20225 KiB191127

search.cH A D03-May-202244.9 KiB2,0671,502

see.cH A D03-May-20227.3 KiB301208

segtb.cH A D03-May-202220.6 KiB995728

seval.cH A D03-May-202211.8 KiB569405

sjeng.cH A D03-May-202225.6 KiB978807

sjeng.hH A D03-May-20223.3 KiB157103

sjeng.rcH A D03-May-20224 KiB145144

squares.hH A D03-May-20221.8 KiB9464

stamp-h.inH A D03-May-202210 21

ttable.cH A D03-May-20228.2 KiB384277

utils.cH A D03-May-202230.6 KiB1,4051,008

README

1What is Sjeng ?
2---------------
3
4Sjeng is a chessprogram that plays many variants.
5
6In addition to that, it can also play normal chess
7quite well and is fully compatible with the standard
8XBoard/WinBoard protocol (version 1 and 2). Sjeng
9also supports some broken WinBoard implementations,
10such as the one present in the ChessBase/Fritz WinBoard
11adapter.
12
13Technically, Sjeng is a highly advanced alpha-beta searcher,
14using modern techniques like history and killer moves,
15transposition tables, SEE move ordering and pruning, and
16search enhancements like selective extensions, Aspiration
17Principal Variation Search, Adaptive nullmove pruning,
18Extended Futility Pruning and Limited Razoring. Sjeng can
19use an opening book and learns from the games it plays.
20
21In it's suicide and losers mode, Sjeng use proof-number
22searches to quickly find forced wins. Sjeng plays at the
23same level that the best humans are capable of.
24
25On 14th of October 2000, Sjeng won it's first title
26by becoming the World Computer Crazyhouse Chess Champion.
27
28On December 31th 2000, Sjeng became the first computer
29program to reach the #1 spot on the crazyhouse rating list
30on the Free Internet Chess Server. It had been #1 on the
31Internet Chess Club before.
32
33Early 2001 Sjeng became the #1 losers/giveaway player
34on the Internet Chess Club.
35
36
37What variants are supported ?
38-----------------------------
39
40Sjeng currently plays standard chess, crazyhouse, bughouse,
41suicide (aka giveaway or anti-chess) and losers. It can also
42play variants which have the same rules as normal chess, but
43a different starting position.
44
45
46How do I get it to work ?
47-------------------------
48
49 Building it
50 -----------
51
52    GNU/Linux, FreeBSD, other Un*x variants:
53    ----------------------------------------
54
55    Building Sjeng should be as simple as:
56
57    ./configure
58    make
59    (su to root if needed)
60    make install
61
62    If you notice Sjeng is only reporting time in full second
63    increments, edit config.h and change #define HAVE_FTIME
64    into #undef HAVE_FTIME.
65
66    Windows
67    -------
68
69    I have succesfully compiled Sjeng with Microsoft Visual C++.
70    Other compilers are not tested, but may also work.
71
72    The easiest way is to locate a Windows port of Sjeng's
73    sources, which you can compile out-of-the-box. If those
74    are not available, follow these instructions:
75
76    You need to find a Windows port of the GDBM library.
77    There are several (free) ones available on the internet.
78
79    You will have to create a config.h file which contains
80
81    #define HAVE_SYS_TIMEB_H
82    #define HAVE_FTIME
83    #define VERSION "11.2"
84
85    You may have to define _WIN32 also, if your compiler
86    doesn't already do so.
87
88    You also need an implementation of the strcasecmp
89    function. An implementation is available in the file
90    strcasec.c in the DJGPP distribution.
91
92    Alternatively you can use the Cygnus utilities. I have
93    never used them myself so I cannot help you there, but
94    I have had reports from users which successfully built
95    Sjeng with it.
96
97
98 The opening books
99 -----------------
100
101 Sjeng uses two kind of books: .opn books and binary books
102
103 The .opn books are intended to be created manually, and
104 are ideal for getting Sjeng to play your favorite openings.
105 Some examples are in the books directory.
106
107 To use a .opn book, just copy it to the same directory
108 where you are running Sjeng from. Sjeng will always look
109 in the .opn book first and will never apply learning to
110 it.
111
112 The binary books are created automatically from PGN databases,
113 by a built-in bookbuilder.
114
115 To use it, just start Sjeng and enter 'book'. To generate
116 a crazyhouse/bughouse book, first type 'variant crazyhouse',
117 then type 'book'. ('losers' and 'suicide' are also supported)
118 Be sure to make the keycache large enough or the book-generation
119 will be slow and you will end up with very large files. One
120 byte in the keycache is enough for one position. The keycache
121 is stored in RAM, so do not make it bigger than the actual
122 amount of RAM you have.
123
124 You need about 12 bytes diskspace per position that will be
125 stored.
126
127 You must use a pure PGN database. PGN derivates like BPGN
128 are not (yet) supported, nor is the psuedo-PGN that some
129 other programs output.
130
131 I recommend running your PGN database through the 'Extract'
132 program by David Barnes first. It has options to strip
133 variantions, comments and NAG's and to suppress duplicates
134 which will significantly speed up the bookbuilding process,
135 as well as getting rid of any psuedo-SAN.
136
137 A PGN database of some high-quality crazyhouse games is
138 available at
139 ftp://sjeng.sourceforge.net/pub/sjeng/zhbook.pgn
140
141
142 Getting an interface
143 --------------------
144
145 You can start Sjeng now by typing 'sjeng', but you will probably
146 find the text-based interface unpleasant.
147
148 The recommended interface for playing standard chess with Sjeng
149 is WinBoard/XBoard, by Tim Mann.
150
151 http://www.tim-mann.org/xboard.html
152
153 You will need to start WinBoard/xboard with the -variant
154 option to play bughouse, crazyhouse, suicide or losers. If
155 you need more help with WinBoard/xboard read its documentation.
156 If you want to let Sjeng play on a chess server, be sure to
157 read zippy.README
158
159 Zon Juan Jan wrote a Windows interface for crazyhouse-playing
160 programs that can be used with Sjeng. Go to
161
162 http://bughouse.net
163
164 and look in the downloads section. The program is called
165 Zhouse Challenger. It works nicely and I can recommend
166 it a lot! There is an alternate download at:
167
168 http://www.d2d4.de/download/zchall-sfx.exe
169
170 EBoard is a chess interface for POSIX systems (GNU/Linux, FreeBSD,
171 etc.) based on the GTK+ GUI toolkit. It is available on
172 http://eboard.sourceforge.net/ and has extensive support for Sjeng.
173
174
175Generating endgame databases
176-------------------------
177
178Sjeng support endgame databases for the suicide
179variant. You can generate them as follows:
180
1811) Make a subdirectory named 'stb' in Sjeng's
182   directory
1832) Start Sjeng form the command line and issue
184   the command 'buildegtb'
185
186This will take an hour or so, depending on the
187speed of your computer.
188
189
190Tuning Sjeng
191------------
192
193A great deal Sjeng's workings can be customized without
194recompiling it. You should take a look at sjeng.rc and
195adjust the parameters to your likings. Especially the
196first three are imporant because they control how much
197memory Sjeng will use for transposition tables and caches.
198If those are set too big for your RAM, Sjeng will crash.
199
200
201Benchmarking
202------------
203
204As a little test of your computer's speed, you can start
205Sjeng and give the 'speed' command. This will run a little
206benchmark of the most commonly-used functions in Sjeng.
207
208
209Running testsuites
210------------------
211
212Sjeng can automatically run testsuites by use of the 'test'
213command. Input data is expected to be in EPD format with
214either a 'best move' (bm) or 'avoid move' (am) tag.
215Some testsuites are included in the 'tests' directory of the
216Sjeng distribution.
217
218
219Getting more info
220-----------------
221
222For more info about Sjeng, you can visit the homepage
223
224http://www.sjeng.org/
225
226If you are in need of info about Sjeng's internal
227workings, send me a mail at
228
229gcp@sjeng.org
230
231
232Reporting bugs
233--------------
234
235If you spot a bug, or Sjeng crashes on you, please
236send email to
237
238gcp@sjeng.org
239
240Please try to provide an accurate description of the
241problem and, if possible, how to reproduce it. Starting
242XBoard/WinBoard with the -debug option will produce debug
243output (either on screen or in a winboard.debug file) that
244can help a lot in tracking down the problem.
245
246
247Copying/Distribution
248--------------------
249
250Sjeng is Free Software and is licensed under the GNU General
251Public License. For more details see the file COPYING that
252comes with Sjeng.
253
254If this file is missing, write to the Free Software Foundation,
255Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
256
257Sjeng should have come with source code, or you should have
258been given the possibility to obtain it for a charge no more
259than the cost of physically performing the source distribution.
260If not, please contact gcp@sjeng.org.
261
262Sjeng includes tablebase accessing code written by Andrew Kadatch
263and Eugene Nalimov. This code is contained in the files tbindex.cpp
264and tbdecode.h and is copyrighted by them, all rights reserved.
265This code does _not_ fall under the GPL. You are hereby given the
266additional right to compile and link Sjeng with this code, as well
267as to distribute the resulting executable and code under the
268conditions of the GPL, except for the files tbindex.cpp and
269tbdecode.h, which do not fall under the GPL, but may also be
270distributed together with Sjeng.
271
272The author regrets having to include this non-free code with
273Sjeng, but no free replacement of the same quality is availble
274yet.
275
276
277What is bughouse ?
278------------------
279
280Bughouse is a form of chess which is played with 2 teams,
281each consisting of 2 players. Each player plays his opponent
282on a seperate board. If a piece is captured, the capturing
283player can pass it on to his partner, who can then drop the
284piece into his game and use it.
285
286If you have never played bughouse before, you are really
287missing out on something. Try it, you'll like it.
288
289for a more complete description of the rules:
290
291http://matador.unige.ch/nabla/Bug/rules.html
292
293
294What is crazyhouse ?
295--------------------
296
297Crazyhouse is similar to bughouse, but is played
298with only 2 players, on 1 board.
299
300
301What is suicide/giveaway/anti-chess ?
302-------------------------------------
303
304Suicide is a form of chess where the goal is to
305lose all your pieces. Your king acts like a normal
306piece and can be captured, and you can promote
307pawns to a king. If you can capture, you must.
308
309Suicide is sometimes referred to as giveaway or anti-chess,
310although there are minor differences between variants.
311
312In suicide, castling is not allowed, but in giveaway
313it is. If a player is stalemated, he loses in giveaway,
314but in suicide he wins if he has less material than his
315opponent.
316
317
318What is losers ?
319----------------
320
321Losers is similar to suicide with the exception
322that the king may not be captured, you cannot
323promote pawns to kings, and if you are checkmated
324you win.
325
326
327Where can I play bughouse ?
328----------------------------
329
330The most common place to play bughouse is the Free Internet
331Chess Server (FICS). Most important chess servers also offer
332it, like the Internet Chess Club.
333
334http://www.freechess.org
335http://www.chessclub.com
336
337Or even better, gather a few friends, 2 chessboards, 2 clocks,
338some beer, and have fun beating each other ;)
339
340-- last revised 2001-12-27 -- gcp@sjeng.org --
341