在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:stockfish开源软件地址:https://gitee.com/mirrors/stockfish开源软件介绍:OverviewStockfish is a free, powerful UCI chess enginederived from Glaurung 2.1. Stockfish is not a complete chess program and requires aUCI-compatible graphical user interface (GUI) (e.g. XBoard with PolyGlot, Scid,Cute Chess, eboard, Arena, Sigma Chess, Shredder, Chess Partner or Fritz) in orderto be used comfortably. Read the documentation for your GUI of choice for informationabout how to use Stockfish with it. The Stockfish engine features two evaluation functions for chess. The efficientlyupdatable neural network (NNUE) based evaluation is the default and by far the strongest.The classical evaluation based on handcrafted terms remains available. The strongestnetwork is integrated in the binary and downloaded automatically during the build process.The NNUE evaluation benefits from the vector intrinsics available on most CPUs (sse2,avx2, neon, or similar). FilesThis distribution of Stockfish consists of the following files:
The UCI protocol and available optionsThe Universal Chess Interface (UCI) is a standard protocol used to communicate witha chess engine, and is the recommended way to do so for typical graphical user interfaces(GUI) or chess tools. Stockfish implements the majority of its options as describedin the UCI protocol. Developers can see the default values for UCI options available in Stockfish by typing
For developers the following non-standard commands might be of interest, mainly useful for debugging:
A note on classical evaluation versus NNUE evaluationBoth approaches assign a value to a position that is used in alpha-beta (PVS) searchto find the best move. The classical evaluation computes this value as a functionof various chess concepts, handcrafted by experts, tested and tuned using fishtest.The NNUE evaluation computes this value with a neural network based on basicinputs (e.g. piece positions only). The network is optimized and trainedon the evaluations of millions of positions at moderate search depth. The NNUE evaluation was first introduced in shogi, and ported to Stockfish afterward.It can be evaluated efficiently on CPUs, and exploits the fact that only partsof the neural network need to be updated after a typical chess move.The nodchip repository provided the firstversion of the needed tools to train and develop the NNUE networks. Today, moreadvanced training tools are available inthe nnue-pytorch repository,while data generation tools are available ina dedicated branch. On CPUs supporting modern vector instructions (avx2 and similar), the NNUE evaluationresults in much stronger playing strength, even if the nodes per second computed bythe engine is somewhat lower (roughly 80% of nps is typical). Notes:
https://tests.stockfishchess.org/api/nn/[filename] replacing What to expect from the Syzygy tablebases?If the engine is searching a position that is not in the tablebases (e.g.a position with 8 pieces), it will access the tablebases during the search.If the engine reports a very large score (typically 153.xx), this meansit has found a winning line into a tablebase position. If the engine is given a position to search that is in the tablebases, itwill use the tablebases at the beginning of the search to preselect allgood moves, i.e. all moves that preserve the win or preserve the draw whiletaking into account the 50-move rule.It will then perform a search only on those moves. The engine will not moveimmediately, unless there is only a single good move. The engine likelywill not report a mate score, even if the position is known to be won. It is therefore clear that this behaviour is not identical to what one mightbe used to with Nalimov tablebases. There are technical reasons for thisdifference, the main technical reason being that Nalimov tablebases use theDTM metric (distance-to-mate), while the Syzygy tablebases use a variation of theDTZ metric (distance-to-zero, zero meaning any move that resets the 50-movecounter). This special metric is one of the reasons that the Syzygy tablebases aremore compact than Nalimov tablebases, while still storing all informationneeded for optimal play and in addition being able to take into accountthe 50-move rule. Large PagesStockfish supports large pages on Linux and Windows. Large pages makethe hash access more efficient, improving the engine speed, especiallyon large hash sizes. Typical increases are 5..10% in terms of nodes persecond, but speed increases up to 30% have been measured. The support isautomatic. Stockfish attempts to use large pages when available andwill fall back to regular memory allocation when this is not the case. Support on LinuxLarge page support on Linux is obtained by the Linux kerneltransparent huge pages functionality. Typically, transparent huge pagesare already enabled, and no configuration is needed. Support on WindowsThe use of large pages requires "Lock Pages in Memory" privilege. SeeEnable the Lock Pages in Memory Option (Windows)on how to enable this privilege, then run RAMMapto double-check that large pages are used. We suggest that you rebootyour computer after you have enabled large pages, because long Windowssessions suffer from memory fragmentation, which may prevent Stockfishfrom getting large pages: a fresh session is better in this regard. Compiling Stockfish yourself from the sourcesStockfish has support for 32 or 64-bit CPUs, certain hardwareinstructions, big-endian machines such as Power PC, and other platforms. On Unix-like systems, it should be easy to compile Stockfishdirectly from the source code with the included Makefile in the folder cd src make help make net make build ARCH=x86-64-modern When not using the Makefile to compile (for instance, with Microsoft MSVC) youneed to manually set/unset some switches in the compiler command line; seefile types.h for a quick reference. When reporting an issue or a bug, please tell us which Stockfish versionand which compiler you used to create your executable. This informationcan be found by typing the following command in a console: ./stockfish compiler Understanding the code base and participating in the projectStockfish's improvement over the last decade has been a great communityeffort. There are a few ways to help contribute to its growth. Donating hardwareImproving Stockfish requires a massive amount of testing. You can donateyour hardware resources by installing the Fishtest Workerand view the current tests on Fishtest. Improving the codeIf you want to help improve the code, there are several valuable resources:
Terms of useStockfish is free, and distributed under the GNU General Public License version 3(GPL v3). Essentially, this means you are free to do almost exactlywhat you want with the program, including distributing it among yourfriends, making it available for download from your website, sellingit (either by itself or as part of some bigger software package), orusing it as the starting point for a software project of your own. The only real limitation is that whenever you distribute Stockfish insome way, you MUST always include the license and the full source code(or a pointer to where the source code can be found) to generate theexact binary you are distributing. If you make any changes to thesource code, these changes must also be made available under the GPL v3. For full details, read the copy of the GPL v3 found in the file namedCopying.txt. |
请发表评论