Home | History | Download | only in sjeng
      1 What is Sjeng ?
      2 ---------------
      3 
      4 Sjeng is a chessprogram that plays many variants. 
      5 
      6 In addition to that, it can also play normal chess
      7 quite well and is fully compatible with the standard 
      8 XBoard/WinBoard protocol (version 1 and 2). Sjeng
      9 also supports some broken WinBoard implementations,
     10 such as the one present in the ChessBase/Fritz WinBoard
     11 adapter.
     12 
     13 Technically, Sjeng is a highly advanced alpha-beta searcher, 
     14 using modern techniques like history and killer moves, 
     15 transposition tables, SEE move ordering and pruning, and 
     16 search enhancements like selective extensions, Aspiration 
     17 Principal Variation Search, Adaptive nullmove pruning, 
     18 Extended Futility Pruning and Limited Razoring. Sjeng can 
     19 use an opening book and learns from the games it plays. 
     20 
     21 In it's suicide and losers mode, Sjeng use proof-number 
     22 searches to quickly find forced wins. Sjeng plays at the 
     23 same level that the best humans are capable of.
     24 
     25 On 14th of October 2000, Sjeng won it's first title
     26 by becoming the World Computer Crazyhouse Chess Champion.
     27 
     28 On December 31th 2000, Sjeng became the first computer
     29 program to reach the #1 spot on the crazyhouse rating list
     30 on the Free Internet Chess Server. It had been #1 on the
     31 Internet Chess Club before.
     32 
     33 Early 2001 Sjeng became the #1 losers/giveaway player
     34 on the Internet Chess Club.
     35 
     36 
     37 What variants are supported ?
     38 -----------------------------
     39 
     40 Sjeng currently plays standard chess, crazyhouse, bughouse,
     41 suicide (aka giveaway or anti-chess) and losers. It can also
     42 play variants which have the same rules as normal chess, but
     43 a different starting position.
     44 
     45 
     46 How 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 
    175 Generating endgame databases
    176 -------------------------
    177 
    178 Sjeng support endgame databases for the suicide
    179 variant. You can generate them as follows:
    180 
    181 1) Make a subdirectory named 'stb' in Sjeng's
    182    directory
    183 2) Start Sjeng form the command line and issue
    184    the command 'buildegtb'
    185 
    186 This will take an hour or so, depending on the
    187 speed of your computer.
    188 
    189 
    190 Tuning Sjeng
    191 ------------
    192 
    193 A great deal Sjeng's workings can be customized without 
    194 recompiling it. You should take a look at sjeng.rc and
    195 adjust the parameters to your likings. Especially the
    196 first three are imporant because they control how much
    197 memory Sjeng will use for transposition tables and caches.
    198 If those are set too big for your RAM, Sjeng will crash.
    199 
    200 
    201 Benchmarking
    202 ------------
    203 
    204 As a little test of your computer's speed, you can start
    205 Sjeng and give the 'speed' command. This will run a little
    206 benchmark of the most commonly-used functions in Sjeng.
    207 
    208 
    209 Running testsuites
    210 ------------------
    211 
    212 Sjeng can automatically run testsuites by use of the 'test'
    213 command. Input data is expected to be in EPD format with
    214 either a 'best move' (bm) or 'avoid move' (am) tag. 
    215 Some testsuites are included in the 'tests' directory of the
    216 Sjeng distribution.
    217 
    218 
    219 Getting more info
    220 -----------------
    221 
    222 For more info about Sjeng, you can visit the homepage
    223 
    224 http://www.sjeng.org/
    225 
    226 If you are in need of info about Sjeng's internal 
    227 workings, send me a mail at
    228 
    229 gcp (a] sjeng.org
    230 
    231 
    232 Reporting bugs
    233 --------------
    234 
    235 If you spot a bug, or Sjeng crashes on you, please
    236 send email to
    237 
    238 gcp (a] sjeng.org
    239 
    240 Please try to provide an accurate description of the 
    241 problem and, if possible, how to reproduce it. Starting
    242 XBoard/WinBoard with the -debug option will produce debug
    243 output (either on screen or in a winboard.debug file) that
    244 can help a lot in tracking down the problem.
    245 
    246 
    247 Copying/Distribution
    248 --------------------
    249 
    250 Sjeng is Free Software and is licensed under the GNU General
    251 Public License. For more details see the file COPYING that
    252 comes with Sjeng. 
    253 
    254 If this file is missing, write to the Free Software Foundation,
    255 Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    256 
    257 Sjeng should have come with source code, or you should have
    258 been given the possibility to obtain it for a charge no more 
    259 than the cost of physically performing the source distribution.
    260 If not, please contact gcp (a] sjeng.org.
    261 
    262 Sjeng includes tablebase accessing code written by Andrew Kadatch
    263 and Eugene Nalimov. This code is contained in the files tbindex.cpp
    264 and tbdecode.h and is copyrighted by them, all rights reserved.
    265 This code does _not_ fall under the GPL. You are hereby given the
    266 additional right to compile and link Sjeng with this code, as well
    267 as to distribute the resulting executable and code under the 
    268 conditions of the GPL, except for the files tbindex.cpp and 
    269 tbdecode.h, which do not fall under the GPL, but may also be 
    270 distributed together with Sjeng.
    271 
    272 The author regrets having to include this non-free code with
    273 Sjeng, but no free replacement of the same quality is availble
    274 yet.
    275 
    276 
    277 What is bughouse ?
    278 ------------------
    279 
    280 Bughouse is a form of chess which is played with 2 teams, 
    281 each consisting of 2 players. Each player plays his opponent
    282 on a seperate board. If a piece is captured, the capturing 
    283 player can pass it on to his partner, who can then drop the 
    284 piece into his game and use it.
    285 
    286 If you have never played bughouse before, you are really
    287 missing out on something. Try it, you'll like it.
    288 
    289 for a more complete description of the rules:
    290 
    291 http://matador.unige.ch/nabla/Bug/rules.html
    292 
    293 
    294 What is crazyhouse ?
    295 --------------------
    296 
    297 Crazyhouse is similar to bughouse, but is played
    298 with only 2 players, on 1 board.
    299 
    300 
    301 What is suicide/giveaway/anti-chess ?
    302 -------------------------------------
    303 
    304 Suicide is a form of chess where the goal is to
    305 lose all your pieces. Your king acts like a normal
    306 piece and can be captured, and you can promote
    307 pawns to a king. If you can capture, you must.
    308 
    309 Suicide is sometimes referred to as giveaway or anti-chess,
    310 although there are minor differences between variants.
    311 
    312 In suicide, castling is not allowed, but in giveaway
    313 it is. If a player is stalemated, he loses in giveaway,
    314 but in suicide he wins if he has less material than his 
    315 opponent.
    316 
    317 
    318 What is losers ?
    319 ----------------
    320 
    321 Losers is similar to suicide with the exception
    322 that the king may not be captured, you cannot
    323 promote pawns to kings, and if you are checkmated
    324 you win.
    325 
    326 
    327 Where can I play bughouse ?
    328 ----------------------------
    329 
    330 The most common place to play bughouse is the Free Internet
    331 Chess Server (FICS). Most important chess servers also offer
    332 it, like the Internet Chess Club. 
    333 
    334 http://www.freechess.org
    335 http://www.chessclub.com
    336 
    337 Or even better, gather a few friends, 2 chessboards, 2 clocks,
    338 some beer, and have fun beating each other ;)
    339 
    340 -- last revised 2001-12-27 -- gcp (a] sjeng.org --
    341