This PR updates the internal WDL model, using data from 2.6M games played by the revisions sincef3bfce3531. Note that the normalizing constant increases only moderately from 372 to 377. ``` > ./updateWDL.sh --firstrevf3bfce3531Running: ./updateWDL.sh --firstrevf3bfce3531--lasttrev HEAD --materialMin 17 --EloDiffMax 5 started at: Sat 22 Mar 11:02:14 CET 2025 Look recursively in directory pgns for games with max nElo difference 5 using books matching "UHO_Lichess_4852_v..epd" for SF revisions betweenf3bfce3531(from 2025-02-28 09:50:59 +0100) and HEAD (from 2025-03-21 11:22:59 +0100). Based on 138253430 positions from 2579360 games, NormalizeToPawnValue should change from 372 to 377. ended at: Sat 22 Mar 11:04:00 CET 2025 ``` ``` > cat scoreWDL.log Converting evals with NormalizeData = {'momType': 'material', 'momMin': 17, 'momMax': 78, 'momTarget': 58, 'as': [-37.45051876, 121.19101539, -132.78783573, 420.70576692]}. Reading eval stats from updateWDL.json. Retained (W,D,L) = (33794348, 69943262, 34515820) positions. Saved distribution plot to updateWDLdistro.png. Fit WDL model based on material. Initial objective function: 0.3648260131692729 Final objective function: 0.36482338611818094 Optimization terminated successfully. const int NormalizeToPawnValue = 377; Corresponding spread = 71; Corresponding normalized spread = 0.1879431202530567; Draw rate at 0.0 eval at material 58 = 0.9902694872976331; Parameters in internal value units: p_a = ((-13.500 * x / 58 + 40.928) * x / 58 + -36.828) * x / 58 + 386.830 p_b = ((96.534 * x / 58 + -165.791) * x / 58 + 90.897) * x / 58 + 49.296 constexpr double as[] = {-13.50030198, 40.92780883, -36.82753545, 386.83004070}; constexpr double bs[] = {96.53354896, -165.79058388, 90.89679019, 49.29561889}; Preparing plots. Saved graphics to updateWDL.png. Total elapsed time = 46.92s. ``` Only affects displayed `cp` and `wdl` values. closes https://github.com/official-stockfish/Stockfish/pull/5939 No functional change
Stockfish
A free and strong UCI chess engine.
Explore Stockfish docs »
Report bug
·
Open a discussion
·
Discord
·
Blog
Overview
Stockfish is a free and strong UCI chess engine derived from Glaurung 2.1 that analyzes chess positions and computes the optimal moves.
Stockfish does not include a graphical user interface (GUI) that is required to display a chessboard and to make it easy to input moves. These GUIs are developed independently from Stockfish and are available online. Read the documentation for your GUI of choice for information about how to use Stockfish with it.
See also the Stockfish documentation for further usage help.
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 version 3.
-
AUTHORS, a text file with the list of authors for the project.
-
src, a subdirectory containing the full source code, including a Makefile that can be used to compile Stockfish on Unix-like systems.
-
a file with the .nnue extension, storing the neural network for the NNUE evaluation. Binary distributions will have this file embedded.
Contributing
See Contributing Guide.
Donating hardware
Improving Stockfish requires a massive amount of testing. You can donate your hardware resources by installing the Fishtest Worker and viewing the current tests on Fishtest.
Improving the code
In the chessprogramming wiki, many techniques used in Stockfish are explained with a lot of background information. The section on Stockfish describes many features and techniques used by Stockfish. However, it is generic rather than focused on Stockfish's precise implementation.
The engine testing is done on Fishtest. If you want to help improve Stockfish, please read this guideline first, where the basics of Stockfish development are explained.
Discussions about Stockfish take place these days mainly in the Stockfish Discord server. This is also the best place to ask questions about the codebase and how to improve it.
Compiling Stockfish
Stockfish has support for 32 or 64-bit CPUs, certain hardware instructions, big-endian machines such as Power PC, and other platforms.
On Unix-like systems, it should be easy to compile Stockfish directly from the
source code with the included Makefile in the folder src. In general, it is
recommended to run make help to see a list of make targets with corresponding
descriptions. An example suitable for most Intel and AMD chips:
cd src
make -j profile-build
Detailed compilation instructions for all platforms can be found in our documentation. Our wiki also has information about the UCI commands supported by Stockfish.
Terms of use
Stockfish is free and distributed under the GNU General Public License version 3 (GPL v3). Essentially, this means 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 website, 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 license and the full source code (or a pointer to where the source code can be found) to generate the exact binary you are distributing. If you make any changes to the source code, these changes must also be made available under GPL v3.
Acknowledgements
Stockfish uses neural networks trained on data provided by the Leela Chess Zero project, which is made available under the Open Database License (ODbL).