]> git.sesse.net Git - stockfish/blobdiff - Readme.txt
Rename square_empty() to is_empty()
[stockfish] / Readme.txt
index defd2fc86511c6e384f7dfaf3077887e60baf2de..6572adee0476b524dfc7c449412c8c87d8fc0b09 100644 (file)
-1. Introduction\r
----------------\r
-\r
-Glaurung is a free UCI chess engine.  It is not a complete chess\r
-program, but requires some UCI compatible GUI (like XBoard with\r
-PolyGlot, eboard, José, Arena, Sigma Chess, Shredder, Chess Partner,\r
-or Fritz) in order to be used comfortably.  Read the documentation for\r
-your GUI of choice for information about how to use Glaurung with your\r
-GUI.\r
-\r
-Glaurung 2 is a completely rewritten version of Glaurung.  Apart from\r
-the parallel search code, almost no code is shared with Glaurung\r
-1.2.1, the previous stable version.  The new program is clearly\r
-stronger than the old, but has a less attractive style of play,\r
-because there are still a few major holes in its evaluation function\r
-(most notably space and development).\r
-\r
-This version of Glaurung supports up to 8 CPUs, but has not been\r
-tested thoroughly with more than 2.  The program tries to detect the\r
-number of CPUs on your computer and set the number of search threads\r
-accordingly, but please be aware that the detection is not always\r
-correct.  It is therefore recommended to inspect the value of the\r
-"Threads" UCI parameter, and to make sure it equals the number of CPU\r
-cores on your computer.\r
-\r
-\r
-2. Files\r
---------\r
-\r
-This distribution of Glaurung consists of the following files:\r
-\r
-  * Readme.txt, the file you are currently reading.\r
-\r
-  * Copying.txt, a text file containing the GNU General Public\r
-    License.\r
-\r
-  * src/, a subdirectory containing the full source code, including a\r
-    Makefile that can be used to compile Glaurung on Unix-like\r
-    systems.  For further information about how to compile Glaurung\r
-    yourself, read section 4 below.\r
-\r
-  * MacOSX/, a subdirectory containing excutables for Apple Macintosh\r
-    computers running Mac OS X 10.4 (Tiger) and newer.  There are two\r
-    executables, one for OS X 10.4, and one for OS X 10.5.  The\r
-    executable for OS X 10.4 will work in 10.5 as well, but the one\r
-    for 10.5 is faster.\r
-\r
-  * LinuxX86/, a subdirectory containing 32-bit and 64-bit x86 GNU/Linux\r
-    executables.\r
-\r
-  * Windows/, a subdirectory containing 32-bit and 64-bit Windows\r
-    executables.\r
-\r
-  * polyglot.ini, for using Glaurung with Fabien Letouzey's PolyGlot\r
-    adapter.\r
-\r
-\r
-3. Opening books\r
-----------------\r
-\r
-This version of Glaurung has experimental support for PolyGlot opening\r
-books.  For information about how to create such books, consult the\r
-PolyGlot documentation.  The book file can be selected by setting the\r
-UCI parameter "Book File".\r
-\r
-A book file contributed by Salvo Spitaleri can be found on the\r
-Glaurung web page.\r
-\r
-\r
-4. Compiling it yourself\r
-------------------------\r
-\r
-On Unix-like systems, it should usually be possible to compile\r
-Glaurung directly from the source code with the included Makefile.\r
-The exception is computer with big-endian CPUs, like PowerPC\r
-Macintoshes.  Some of the bitboard routines in the current version of\r
-Glaurung are endianness-sensitive, and won't work on a big-endian CPU.\r
-Ensuring that the line with #define USE_32BIT_ATTACKS" near the top\r
-of bitboard.h is commented out should solve this problem.\r
-Commenting out the line with "#define USE_32BIT_ATTACKS" near the\r
-\r
-There is also a problem with compiling Glaurung on certain 64-bit \r
-systems, regardless of the endianness.  If Glaurung segfaults \r
-immediately after startup, try to comment out the line with \r
-"#define USE_FOLDED_BITSCAN" near the beginning of bitboard.h and\r
-recompile.\r
-\r
-Finally, even if Glaurung does work without any changes on your\r
-computer, it might be possible to improve the performance by changing\r
-some of the #define directives in bitboard.h.  The default settings\r
-are optimized for 64-bit CPUs.  On 32-bit CPUs, it is probably better\r
-to switch on USE_32BIT_ATTACKS, and to use BITCOUNT_SWAR_32 instead of\r
-BITCOUNT_SWAR_64.  For computers with very little memory (like\r
-handheld devices), it is possible to conserve memory by defining\r
-USE_COMPACT_ROOK_ATTACKS. \r
-\r
-\r
-\r
-5. History\r
-----------\r
-\r
-2007-05-06: Glaurung 2 - epsilon\r
---------------------------------\r
-\r
-The first public release, and the first version of my new program\r
-which is able to match the old Glaurung 1.2.1 on a single CPU.  Lots\r
-of features and chess knowledge is still missing.\r
-\r
-2007-05-10: Glaurung 2 - epsilon/2\r
-----------------------------------\r
-\r
-This version is very close to 2 - epsilon.  The major changes are:\r
-\r
-  * A number of compatibility problems which appeared when trying to\r
-    compile Glaurung 2 - epsilon on various operating systems and CPUs\r
-    have been solved.\r
-\r
-  * Fixed a major bug in the detection of rooks trapped inside a\r
-    friendly king.\r
-\r
-  * Added knowledge about several types of drawn endgames.\r
-\r
-  * Fixed a few FRC related bugs.  FRC now works, but because of\r
-    serious holes in the evaluation function the program plays very\r
-    badly.\r
-\r
-  * A slightly more sophisticated king safety evaluation.\r
-\r
-2007-06-07: Glaurung 2 - epsilon/3\r
-----------------------------------\r
-\r
-The first public version with support for multiple CPUs.  Unless you\r
-have a dual-core (or better) computer, use Glaurung with a PolyGlot\r
-book, or runs games with ponder on, you may want to skip this version,\r
-which is almost certainly no stronger than 2 - epsilon/2 when running\r
-on a single CPU.  The main changes compared to the previous version\r
-are:\r
-\r
-  * Parallel search, with support for 1-4 CPUs.  The program currently\r
-    always allocates a separate pawn hash table and material hash\r
-    table for four threads, which is a pure waste of RAM if your\r
-    computer has just a single CPU.  This will be fixed in a future\r
-    version.\r
-\r
-  * Fixed a bug in book randomization.  When using Polyglot books, the\r
-    previous version would always select exactly the same move in the\r
-    same position after a restart of the program.  Thanks to Pavel\r
-    Háse for pointing this out.\r
-\r
-  * Fixed a UCI pondering bug: Glaurung no longer instantly prints its\r
-    best move when the maximum depth is reached during a ponder\r
-    search, as the previous version did.  According to the UCI\r
-    protocol, it is not allowed to print the best move before the\r
-    engine has received the "stop" or "quit" command.\r
-\r
-  * Additional search information:  The new version displays hash\r
-    saturation and the current line(s) of search.\r
-\r
-  * Several minor bug fixes and optimizations in the search and\r
-    evaluation. \r
-\r
-2007-06-08: Glaurung 2 - epsilon/4\r
-----------------------------------\r
-\r
-A bugfix release, with only a single important change:\r
-\r
-   * Fixed a very serious pondering bug.  As pointed out by Marc\r
-     Lacrosse, the previous version would lose on time in almost every\r
-     single game with pondering enabled.  The new version handles\r
-     pondering correctly (or so I hope).  When playing with ponder\r
-     off, the new version is identical to version 2 - epsilon/3.\r
-\r
-2007-06-25: Glaurung 2 - epsilon/5\r
-----------------------------------\r
-\r
-Another minor update, including the following improvements and bug\r
-fixes:\r
-\r
-   * As Werner Schüle discovered, the previous version would sometimes\r
-     stop thinking and lose on time right before delivering checkmate\r
-     (which is of course a very unfortunate moment to lose on time).\r
-     I haven't been able to reproduce Werner's problem on my computer\r
-     (probably because I run a different OS), but I have fixed the bug\r
-     which I suspect caused the time losses.  I hope the time losses\r
-     will no longer occur with 2 - epsilon/5.\r
-\r
-   * The program is now slightly less resource-hungry on computers\r
-     with less than 4 CPU cores: The previous version would always\r
-     allocated separate pawn and material hash tables for four\r
-     threads, even when running on a single-core CPU.  The new version\r
-     only allocates pawn and material hash tables for the threads\r
-     which are actually used.\r
-\r
-   * A minor reorganization of the memory layout has made the parallel\r
-     search about 10% more efficient (at least on my computer, but the\r
-     results are likely to vary considerably on different systems).\r
-\r
-   * The Intel Mac OS X binary is much faster than before, thanks to\r
-     the Intel C++ compiler (previous versions were compiled with\r
-     GCC).\r
-\r
-   * A few other very minor bug fixes and enhancements.\r
-\r
-2007-11-21: Glaurung 2.0\r
-------------------------\r
-\r
-The first stable (or so I hope) and feature-complete version of\r
-Glaurung 2.  The following are the main changes compared to the\r
-previous version:\r
-\r
-   * The license has been changed from GPL version 2 to GPL version 3.\r
-\r
-   * MultiPV mode.\r
-\r
-   * Support for the "searchmoves" option in the UCI "go" command.\r
-     This means that it is possible to ask Glaurung to exclude some\r
-     moves from its analysis, or to restrict its analysis to just a\r
-     handful of moves selected by the user.  This feature must also be\r
-     supported by the GUI under which Glaurung is run.  Glaurung's own\r
-     GUI does currently not support this feature.\r
-\r
-   * Chess960 support now works.  The program still plays this game \r
-     very badly, because of lack of opening knowledge.\r
-\r
-   * Much more aggressive pruning in the last few plies of the main\r
-     search.\r
-\r
-   * Somewhat better scaling on multi-CPU systems, and support for up\r
-     to 8 CPUs.\r
-\r
-   * Lots of new UCI parameters.\r
-\r
-   * Improved time managment, especially in games with pondering on \r
-     (i.e. when the engine is allowed to think when it's the\r
-     opponent's turn to move).\r
-\r
-   * Some evaluation improvements, and some new basic endgame\r
-     patterns.\r
-\r
-   * The program should no longer crash if the game lasts longer than\r
-     1000 plies.\r
\r
-   * Many minor bug fixes and other tiny improvements throughout the\r
-     code.  \r
\r
-   * More generously commented code, and numerous cosmetic changes in\r
-     coding style.\r
-\r
-2007-11-22: Glaurung 2.0.1\r
---------------------------\r
-\r
-   * Fixed (or so I hope) a bug which would occasionally cause one of\r
-     the search threads to get stuck forever in its idle loop.\r
-\r
-2008-05-14: Glaurung 2.1\r
-------------------------\r
-\r
-This version contains far too many changes to list them all, but most\r
-of them are minor and cosmetic.  The most important and noticable\r
-changes are a lot of new UCI parameters, and many improvements in the\r
-evaluation function.  The highlights are:\r
-\r
-   * Extensive changes in the evaluation function.  The addition of\r
-     king safety is the most important improvement, but there are also\r
-     numerous little improvements elsewhere in the evaluation.  There\r
-     is still much work left to do in the evaluation function, though.\r
-     Space and development are still missing, and the tuning is likely\r
-     to be very poor.  Currently, the program is optimized for an\r
-     entertaining style rather than maximum strength.\r
-\r
-   * More accurate forward pruning.  The previous version used the\r
-     null move refutation move to improve the pruning accuracy by\r
-     means of a very simple trick: It did not allow pruning of any\r
-     moves with the piece captured by the null move refutation move.\r
-     In Glaurung 2.1, this has been enhanced: It does not allow\r
-     pruning of moves which defend the destination square of the null\r
-     move refutation move, nor of moves which block the ray of the\r
-     piece in the case that the moving piece in the null move\r
-     refutation move is a slider.\r
-\r
-   * More conservative use of LMR at PV nodes.  The previous version\r
-     searched the first 6 moves with full depth, 2.1 by default\r
-     searches the first 14 moves with full depth (but there is a new\r
-     UCI parameter for configuring this).  I am not at all sure\r
-     whether this is an improvement.  More thorough testing is\r
-     required. \r
-\r
-   * Feedback from the evaluation to the search.  The search passes an\r
-     object of type 'EvalInfo' to the eval, and the eval fills this\r
-     struct with various potentially useful information (like the sets\r
-     of squares attacked by each piece type, the middle game and\r
-     endgame components of the eval, etc.).  At the moment, almost\r
-     none of this information is actually used by the search.  The\r
-     only exception is that the evaluation function is now used to\r
-     adjust the futility pruning margin in the quiescence search.\r
-\r
-   * Less extensions.  This hurts the programs performance a lot in most\r
-     test suites, but I hope it improves the branching factor in deep\r
-     searches.\r
-\r
-   * A very long list of new UCI parameters, especially for tuning the\r
-     evaluation. \r
-\r
-\r
-6. Terms of use\r
----------------\r
-\r
-Glaurung is free, and distributed under the GNU General Public License\r
-(GPL).  Essentially, this means that you are free to do almost exactly\r
-what you want with the program, including distributing it among your\r
-friends, making it available for download from your web site, selling\r
-it (either by itself or as part of some bigger software package), or\r
-using it as the starting point for a software project of your own.\r
-\r
-The only real limitation is that whenever you distribute Glaurung in\r
-some way, you must always include the full source code, or a pointer\r
-to where the source code can be found.  If you make any changes to the\r
-source code, these changes must also be made available under the GPL.\r
-\r
-For full details, read the copy of the GPL found in the file named\r
-Copying.txt.\r
-\r
-\r
-7. Feedback\r
------------\r
-\r
-The author's e-mail address is tord@glaurungchess.com\r
-\r
+1. Introduction
+---------------
+
+Stockfish is a free UCI chess engine derived from Glaurung 2.1. It is not a
+complete chess program, but requires some UCI compatible GUI (like XBoard
+with PolyGlot, eboard, Arena, Sigma Chess, Shredder, Chess Partner or Fritz)
+in order to be used comfortably. Read the documentation for your GUI of choice
+for information about how to use Stockfish with your GUI.
+
+This version of Stockfish supports up to 32 CPUs, but has not been tested
+thoroughly with more than 4.  The program tries to detect the number of
+CPUs on your computer and set the number of search threads accordingly, but
+please be aware that the detection is not always correct. It is therefore
+recommended to inspect the value of the "Threads" UCI parameter, and to
+make sure it equals the number of CPU cores on your computer. If you are
+using more than eight threads, it is recommended to raise the value of
+"Min Split Depth" UCI parameter to 7.
+
+
+2. Files
+--------
+
+This distribution of Stockfish consists of the following files:
+
+  * Readme.txt, the file you are currently reading.
+
+  * Copying.txt, a text file containing the GNU General Public
+    License.
+
+  * src/, a subdirectory containing the full source code, including a
+    Makefile that can be used to compile Stockfish on Unix-like systems.
+    For further information about how to compile Stockfish yourself
+    read section 4 below.
+
+  * polyglot.ini, for using Stockfish with Fabien Letouzey's PolyGlot
+    adapter.
+
+
+3. Opening books
+----------------
+
+This version of Stockfish has support for PolyGlot opening books.
+For information about how to create such books, consult the PolyGlot
+documentation.  The book file can be selected by setting the UCI
+parameter "Book File".
+
+
+4. Compiling it yourself
+------------------------
+
+On Unix-like systems, it should usually be possible to compile Stockfish
+directly from the source code with the included Makefile.
+
+Stockfish has support for 32 or 64 bits CPUS, big-endian machines, like
+Power PC, hardware POPCNT instruction and other platforms.
+
+In general is recommended to run 'make help' to see a list of make targets
+with corresponding descriptions. When not using Makefile to compile, for
+instance with Microsoft MSVC, you need to manually set/unset in the compiler
+command line some swicthes, see file types.h for a quick reference.
+
+
+5. Terms of use
+---------------
+
+Stockfish is free, and distributed under the GNU General Public License
+(GPL). Essentially, this means that you are free to do almost exactly
+what you want with the program, including distributing it among your
+friends, making it available for download from your web site, selling
+it (either by itself or as part of some bigger software package), or
+using it as the starting point for a software project of your own.
+
+The only real limitation is that whenever you distribute Stockfish in
+some way, you must always include the full source code, or a pointer
+to where the source code can be found. If you make any changes to the
+source code, these changes must also be made available under the GPL.
+
+For full details, read the copy of the GPL found in the file named
+Copying.txt.