Skip to content

Stockfish FAQ

dav1312 edited this page Dec 6, 2022 · 21 revisions

Download Stockfish

Note: Stockfish is a command line program. You may want to use it in your own UCI-compatible chess GUI.

Official

Latest release

Latest development builds

  1. Log in to Github
  2. Navigate our Actions
  3. Click on the first workflow run
  4. Scroll to the bottom of the page
  5. Select the corresponding binary

Unofficial

Latest development builds

Note: You can also compile from source the latest commit. TODO: Compile from source wiki page

Choosing a binary

BMI2

  • Intel: 4th Gen and newer.
  • AMD: Zen 3 and newer.

AVX2

  • AMD: Zen, Zen+ and Zen 2.

Download a Chess GUI

TODO


Play against Stockfish

TODO


Analyze with Stockfish

TODO


Optimal settings

To get the best possible evaluation or the strongest move for a given position, the key thing is to let Stockfish analyze long enough, using a recent release (or development version), properly selected for the CPU architecture.

The following settings are important as well:

Threads

tl;dr: Maximum - 1 or 2.

Set the number of threads to the maximum available, possibly leaving 1 or 2 threads free for other tasks. SMT or Hyper-threading is beneficial, so normally the number of threads available is twice the number of cores available. Consumer hardware typically has at least 4-8 threads, Stockfish supports hundreds of threads.

Hash

tl;dr: Maximum - 1 or 2GiB.

Set the hash to nearly the maximum amount of memory (RAM) available, leaving some memory free for other tasks. The Hash can be any value, not just powers of two. The value is specified in MiB, and typical consumer hardware will have GiB of RAM. For a system with 8GiB of RAM one could use 6000 as a reasonable value for the Hash.

MultiPV

tl;dr: 1.

A higher value weakens the quality of the best move computed, as resources are used to compute other moves.


Stockfish crashed

Stockfish may crash if fed incorrect fens, or fens with illegal positions. Full validation code is complex to write, and there is no established mechanism to communicate such an error back to the GUI.

On the other hand, the GUI must carefully check fens. If you find a GUI through which you can crash Stockfish or any other engine, then by all means report it to that GUI's developers.


Contribute to Stockfish

New commits to stockfish can mostly be categorised in 2 categories:

  • Non functional changes
  • Functional changes

Non functional changes

Changes that don't change the search behaviour, for example:

  1. Code cleanups
  2. Comments
  3. New commands

Functional changes

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.

You can follow the steps described in our Fishtest wiki, to create your first test.
https://github.com/glinscott/fishtest/wiki/Creating-my-first-test

Clone this wiki locally