]> git.sesse.net Git - stockfish/blob - Readme.md
Use popcount intrinsic with Interl compiler
[stockfish] / Readme.md
1 ### Overview
2
3 [![Build Status](https://travis-ci.org/official-stockfish/Stockfish.svg?branch=master)](https://travis-ci.org/official-stockfish/Stockfish)
4
5 Stockfish is a free UCI chess engine derived from Glaurung 2.1. It is
6 not a complete chess program and requires some UCI-compatible GUI
7 (e.g. XBoard with PolyGlot, eboard, Arena, Sigma Chess, Shredder, Chess
8 Partner or Fritz) in order to be used comfortably. Read the
9 documentation for your GUI of choice for information about how to use
10 Stockfish with it.
11
12 This version of Stockfish supports up to 128 cores. The engine defaults
13 to one search thread, so it is therefore recommended to inspect the value of
14 the *Threads* UCI parameter, and to make sure it equals the number of CPU
15 cores on your computer.
16
17 This version of Stockfish has support for Syzygybases.
18
19
20 ### Files
21
22 This distribution of Stockfish consists of the following files:
23
24   * Readme.md, the file you are currently reading.
25
26   * Copying.txt, a text file containing the GNU General Public License.
27
28   * src, a subdirectory containing the full source code, including a Makefile
29     that can be used to compile Stockfish on Unix-like systems.
30
31
32 ### Syzygybases
33
34 **Configuration**
35
36 Syzygybases are configured using the UCI options "SyzygyPath",
37 "SyzygyProbeDepth", "Syzygy50MoveRule" and "SyzygyProbeLimit".
38
39 The option "SyzygyPath" should be set to the directory or directories that
40 contain the .rtbw and .rtbz files. Multiple directories should be
41 separated by ";" on Windows and by ":" on Unix-based operating systems.
42 **Do not use spaces around the ";" or ":".**
43
44 Example: `C:\tablebases\wdl345;C:\tablebases\wdl6;D:\tablebases\dtz345;D:\tablebases\dtz6`
45
46 It is recommended to store .rtbw files on an SSD. There is no loss in
47 storing the .rtbz files on a regular HD.
48
49 Increasing the "SyzygyProbeDepth" option lets the engine probe less
50 aggressively. Set this option to a higher value if you experience too much
51 slowdown (in terms of nps) due to TB probing.
52
53 Set the "Syzygy50MoveRule" option to false if you want tablebase positions
54 that are drawn by the 50-move rule to count as win or loss. This may be useful
55 for correspondence games (because of tablebase adjudication).
56
57 The "SyzygyProbeLimit" option should normally be left at its default value.
58
59 **What to expect**
60 If the engine is searching a position that is not in the tablebases (e.g.
61 a position with 7 pieces), it will access the tablebases during the search.
62 If the engine reports a very large score (typically 123.xx), this means
63 that it has found a winning line into a tablebase position.
64
65 If the engine is given a position to search that is in the tablebases, it
66 will use the tablebases at the beginning of the search to preselect all
67 good moves, i.e. all moves that preserve the win or preserve the draw while
68 taking into account the 50-move rule.
69 It will then perform a search only on those moves. **The engine will not move
70 immediately**, unless there is only a single good move. **The engine likely
71 will not report a mate score even if the position is known to be won.**
72
73 It is therefore clear that behaviour is not identical to what one might
74 be used to with Nalimov tablebases. There are technical reasons for this
75 difference, the main technical reason being that Nalimov tablebases use the
76 DTM metric (distance-to-mate), while Syzygybases use a variation of the
77 DTZ metric (distance-to-zero, zero meaning any move that resets the 50-move
78 counter). This special metric is one of the reasons that Syzygybases are
79 more compact than Nalimov tablebases, while still storing all information
80 needed for optimal play and in addition being able to take into account
81 the 50-move rule.
82
83
84 ### Compiling it yourself
85
86 On Unix-like systems, it should be possible to compile Stockfish
87 directly from the source code with the included Makefile.
88
89 Stockfish has support for 32 or 64-bit CPUs, the hardware POPCNT
90 instruction, big-endian machines such as Power PC, and other platforms.
91
92 In general it is recommended to run `make help` to see a list of make
93 targets with corresponding descriptions. When not using the Makefile to
94 compile (for instance with Microsoft MSVC) you need to manually
95 set/unset some switches in the compiler command line; see file *types.h*
96 for a quick reference.
97
98
99 ### Terms of use
100
101 Stockfish is free, and distributed under the **GNU General Public License**
102 (GPL). Essentially, this means that you are free to do almost exactly
103 what you want with the program, including distributing it among your
104 friends, making it available for download from your web site, selling
105 it (either by itself or as part of some bigger software package), or
106 using it as the starting point for a software project of your own.
107
108 The only real limitation is that whenever you distribute Stockfish in
109 some way, you must always include the full source code, or a pointer
110 to where the source code can be found. If you make any changes to the
111 source code, these changes must also be made available under the GPL.
112
113 For full details, read the copy of the GPL found in the file named
114 *Copying.txt*.