Stockfish: The Open-Source King

What you’ll learn: Everything about the world’s strongest engine—its history, how NNUE works, and optimal settings. Reading time: 10 minutes

The strongest chess player in the world is free software. The latest Stockfish version plays at roughly 3600 Elo—about 800 points stronger than Magnus Carlsen at his peak. It dominates the Top Chess Engine Championship (TCEC). It’s available on every platform. And anyone can download the source code, modify it, or contribute improvements.

This is the story of how a community project outcompeted every commercial chess engine on the market.


Origins: From Glaurung to Stockfish

Stockfish began life as Glaurung, written by Norwegian programmer Tord Romstad starting in 2004. Glaurung was open-source from the start, licensed under the GPL. In 2008, Marco Costalba forked Glaurung and renamed it Stockfish—the name is a play on “stock” (common, available to everyone) and “fish” (a nod to Glaurung’s Scandinavian origins; stockfish is a traditional Norwegian dried cod).

The early years were steady progress. Stockfish climbed the rating lists, competing with commercial engines like Rybka, Houdini, and Komodo. By the early 2010s, it was clearly among the top three engines. By 2016, it had pulled ahead of the commercial competition.

Then came NNUE, and Stockfish left everyone else behind.

Stockfish timeline


The NNUE revolution

In August 2020, Stockfish integrated NNUE (Efficiently Updatable Neural Network), a technology originally developed for Shogi engines by Yu Nasu. This was controversial at the time—Stockfish had always prided itself on traditional, hand-tuned evaluation. Some worried that adding neural networks would make the engine slower or less predictable.

Those worries proved unfounded. NNUE gave Stockfish roughly 100 Elo overnight, one of the biggest single jumps in the engine’s history.

Here’s what makes NNUE different from other neural network approaches: it’s designed to work with traditional alpha-beta search, not replace it. Pure neural network engines like Leela Chess Zero evaluate positions using a large network that runs on a GPU. This is slow—maybe a few thousand positions per second. Stockfish with NNUE evaluates millions of positions per second on an ordinary CPU, because NNUE is specifically designed to be cheap to update incrementally as pieces move on the board.

The hybrid approach—NNUE’s learned evaluation combined with Stockfish’s battle-tested search—turns out to be better than either alone. NNUE provides positional understanding that the old hand-crafted evaluation couldn’t match. Stockfish’s deep, pruned search provides tactical precision that pure neural engines can’t replicate without massive hardware.

For more on how this works, see our NNUE explainer.


How Stockfish searches

Stockfish uses alpha-beta search with a sophisticated set of enhancements developed over two decades.

Principal Variation Search (PVS): The engine searches the most promising move first, then checks whether other moves can beat it with a narrower search window.

Late Move Reductions (LMR): Moves that seem unlikely to be good get searched to reduced depth. If they turn out to be surprising, the engine re-searches at full depth.

Null Move Pruning: The engine tries “passing” (making no move) to quickly establish a lower bound on the position’s evaluation. If passing still leaves you winning, the position must be very good.

Futility Pruning: Near the leaves of the search tree, moves that can’t possibly improve the evaluation get cut immediately.

Transposition Tables: A hash table stores previously calculated positions, so the engine doesn’t recalculate the same position multiple times.

These techniques let Stockfish examine only a tiny fraction of the possible moves while still finding the best one. In a complex middlegame position, the engine might reach depth 35-40 in a few seconds on modern hardware—that’s looking 17-20 moves ahead.


Stockfish vs the competition

Against Leela Chess Zero: At equal hardware, Stockfish usually wins. Leela needs GPU power to compete; on CPU only, it’s dramatically slower. When Leela does have good GPU resources (a high-end NVIDIA card), matches are closer. In long-thinking games, Leela’s deep positional understanding sometimes prevails. In tactical positions, Stockfish’s speed advantage dominates.

Against Komodo: Komodo Dragon, the latest version, uses MCTS (Monte Carlo Tree Search) and neural networks. It’s strong—certainly super-GM level—but in direct competition, Stockfish consistently wins. Komodo’s main value is offering a different perspective for analysis.

Against commercial engines: There are no serious commercial competitors anymore. Engines like Fritz and Shredder still exist but haven’t kept pace. The last commercial engine to seriously compete was Houdini, which stopped development years ago. Open-source won.


Settings for different use cases

For analysis

Hash: 4096 (or about half your RAM in MB)
Threads: (number of CPU cores, or cores - 1)
MultiPV: 1 (for deepest analysis) or 3-4 (to compare alternatives)
Contempt: 0

Maximise hash and threads for speed. Keep contempt at 0 so the engine evaluates positions objectively rather than trying to avoid draws.

For playing games

Hash: 1024-2048 (more isn't usually needed at game time controls)
Threads: (number of cores)
MultiPV: 1
Contempt: 10-24 (optional, makes engine prefer active play)

Slight positive contempt can make games more interesting by reducing the engine’s willingness to go for drawn positions.

For weaker sparring

UCI_LimitStrength: true
UCI_Elo: (desired rating, 1320-3190)

This makes Stockfish play at approximately the specified rating. It won’t just make random bad moves—it’ll play reasonable chess with occasional mistakes appropriate to that level.


The Fishtest community

One of the things that makes Stockfish exceptional is its development process. Anyone can propose a patch. Every change gets tested through Fishtest, a distributed testing framework where thousands of games are played to determine whether the change actually improves the engine.

This isn’t subjective evaluation—it’s statistics. A proposed change has to demonstrate a measurable Elo gain across thousands of games to be accepted. The threshold is strict: changes need to show improvement with 95% confidence.

This scientific approach means Stockfish improves steadily without regressing. Every accepted change has been proven to make the engine stronger.

The Fishtest volunteers donate CPU time to run tests. At any moment, dozens of patches are being tested across hundreds of computers worldwide. It’s one of the most impressive examples of open-source collaboration in any field.


Why open source won

The commercial engine model died because it couldn’t compete with thousands of developers working in the open.

Rybka, the dominant engine of the late 2000s, was closed-source and eventually disqualified from competition for incorporating code from other engines without attribution. Houdini followed a similar trajectory. These engines were developed by small teams or individuals, and when those developers moved on, development stopped.

Stockfish has no single point of failure. Tord Romstad hasn’t been actively involved for years. Marco Costalba stepped back. But the project continued, maintained by a rotating cast of contributors. The strongest contributions have come from people who showed up, wrote good code, and earned trust.

The NNUE integration itself came from the community. The technology was borrowed from Shogi; the implementation was contributed by multiple developers; the testing and refinement happened through Fishtest. No individual genius—just a good process and an open codebase.

Open source also means transparency. When Stockfish makes a decision, you can see why. The evaluation function, the search parameters, the pruning heuristics—it’s all in the code. When a commercial engine makes a surprising move, you can only guess at the reason.


Versions and downloads

Stockfish is available for Windows, macOS, Linux, iOS, and Android. The official site is stockfishchess.org.

The version number reflects the year of release: Stockfish 16 came out in 2023, Stockfish 17 in 2024. Between major versions, there are ongoing improvements through the development branch. Check stockfishchess.org for the current version.

For analysis, you’ll usually want to run Stockfish through a GUI or application rather than directly. Most chess software—including Chessmate—supports Stockfish as an analysis engine.


Summary

Stockfish is the strongest chess engine ever made. It’s free, it’s open-source, and it’s still improving. If you’re analysing games, preparing openings, or just curious what a 3600-Elo player would do in your position, Stockfish is the default choice.

The only reason to use something else is for a second opinion—and even then, Stockfish is probably right.