![]() Use ralpha instead of rbeta * rbeta is confusing people. It took THREE attempts to code razoring at PV nodes correctly in a recent test, because of the rbeta trick. Unnecessary tricks should be avoided. * The more correct and self-documenting way of doing this, is to say that we use a zero window around alpha-margin, not beta-margin. The fact that, because we only do it at PV nodes, alpha happens to be beta-1 and that the current stuff with rbeta works, may be correct, but is confusing. Remove the misleading and partially erroneous comment about returning v + margin: * comments should explain what the code does, not what it could have done. * this comment is partially wrong in saying that v+margin is "logical", and that it is "surprising" that is doesn't work. From a theoretical perspective, at least 3 ways of doing this are equally defendable: 1/ fail hard: return alpha: The most conservative. We bet that the search will fail low, but we don't know by how much and don't want to take risks. 2/ aggressive fail soft: return v (what the current code does). This corresponds to normal fail soft, with the added assumption that we don't care about the reduction effect (see below point 3/) 3/ conservative fail soft: return v + margin. If the reduced search (qsearch) gives us a score <= v, we bet that the non reduced search will give us a score <= v + margin. * Saying that 2/ is "logical" implies that 1/ and 3/ are not, which is arguably wrong. Besides, experimental results tell us that 2/ beats 3/, and that's not something we can argue against: experimental results are the only trusted metric. * Also, with the benefit of hindsight, I don't think the fact that 2/ is better than 3/ is surprising at all. The point is that it is YOUR turn to move, and you are assuming that by NOT playing (and letting the opponent capture your hanging pieces in QS) you cannot generally GAIN razor_margin(depth). No functional change. |
||
---|---|---|
src | ||
Copying.txt | ||
polyglot.ini | ||
Readme.md |
Overview
Stockfish is a free UCI chess engine derived from Glaurung 2.1. It is not a complete chess program and requires some UCI-compatible GUI (e.g. 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 it.
This version of Stockfish supports up to 64 CPUs. The engine defaults to one search thread, so 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.
Files
This distribution of Stockfish consists of the following files:
-
Readme.md, 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 below.
-
polyglot.ini, for using Stockfish with Fabien Letouzey's PolyGlot adapter.
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 Book File UCI parameter.
Compiling it yourself
On Unix-like systems, it should be possible to compile Stockfish directly from the source code with the included Makefile.
Stockfish has support for 32 or 64-bit CPUs, the hardware POPCNT instruction, big-endian machines such as Power PC, and other platforms.
In general it is recommended to run make help
to see a list of make
targets with corresponding descriptions. When not using the Makefile to
compile (for instance with Microsoft MSVC) you need to manually
set/unset some switches in the compiler command line; see file types.h
for a quick reference.
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