-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Developers
- https://www.msys2.org/
- Download the installer
In the MSYS2 Installer change the installation folder to:
C:\tools\msys64
In the URTC64
Shell run:
pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain
From https://github.com/llvm/llvm-project/releases/tag/llvmorg-17.0.3 download LLVM-17.0.3-win64.exe
Run the executable and in the installer choose:
Add LLVM to the system PATH for current user
Finally rename mingw32-make
to make
in C:\tools\msys64\ucrt64\bin
Stockfish's improvement over the last decade has been a great community effort. Nowadays most development talk takes place on Discord.
There are many ways to contribute to Stockfish:
- Stockfish (C++)
- Fishtest (Python)
- nnue-pytorch (C++ and Python)
- Donating hardware
If you want to contribute to Stockfish directly, you can do so in a couple of ways. Follow the steps described in our Fishtest wiki, and enjoy creating your first test.
New commits to stockfish can mostly be categorised in 2 categories:
These are changes that don't change the search behaviour and can be directly submitted as pull requests, for example:
- Code cleanups
- Comments
- New commands
These change the search behaviour and lead to a different search tree.
Every functional patch (commit) has to be verified by
Fishtest, our testing framework.
NNUE Pytorch is the trainer for Stockfish's neural network. Usually changes here are tested by training a new network and testing it against the current network via Fishtest.
Improving Stockfish requires a massive amount of testing. You can donate your hardware resources by installing the Fishtest Worker and view the current tests on Fishtest.
Place the following file into .git/hooks/pre-push
and make it executable.
chmod +x .git/hooks/pre-push
. This will prevent you from pushing commits that
do not contain a Bench or 'No functional change' in the commit message.
Only really useful for maintainers.
#!/bin/bash
while read local_ref local_sha remote_ref remote_sha; do
if [[ "$remote_ref" == "refs/heads/master" ]]; then
# Iterate through commits
for commit in $(git rev-list --no-merges $remote_sha..$local_sha); do
# Get the commit message
commit_msg=$(git log --format=%B -n 1 $commit)
# Check for the bench regex
bench_regex='\b[Bb]ench[ :]+[1-9][0-9]{5,7}\b'
if echo "$commit_msg" | grep -m 1 -o -x -E "$bench_regex" >/dev/null; then
continue
fi
# Check for the "No functional change" regex
no_functional_change_regex='\b[Nn]o[[:space:]][Ff]unctional[[:space:]][Cc]hange\b'
if echo "$commit_msg" | grep -o -x -E "$no_functional_change_regex" >/dev/null; then
continue
fi
echo "Commit $commit does not contain a Bench or 'No functional change'"
exit 1
done
fi
done
exit 0
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. This also means that you can distribute Stockfish alongside your proprietary system, but to do this validly, you must make sure that Stockfish and your program communicate at arm's length, that they are not combined in a way that would make them effectively a single program.
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.