What Is NNUE? The Neural Network Inside Stockfish, Explained Simply
NNUE is the small, very fast neural network that judges positions inside Stockfish and most other top chess engines today. It came from computer shogi, arrived in Stockfish in 2020 and made the engine much stronger overnight. Here is what the letters mean, how it works and why it matters, in plain English.
NNUE stands for "Efficiently Updatable Neural Network" (the letters were first written as a mirrored "ƎUИИ"). It is a neural network that gives a chess position a score. Its trick: after a move, only a few of its inputs change, so the engine updates the network's first layer instead of computing it again. That makes it fast enough to run on a normal CPU millions of times a second. Yu Nasu invented it for computer shogi in 2018; Stockfish made it official in Stockfish 12 (2 September 2020), and dropped its old hand-written evaluation completely in Stockfish 16.1 (February 2024).
What NNUE means
A chess engine has two jobs. It searches ahead through possible moves, and it evaluates the positions it reaches: who is better, and by how much? For decades the evaluation was written by hand: so many points for a pawn, a bonus for a rook on an open file, a penalty for a weak king. NNUE replaced that hand-written formula with a neural network that learned what good positions look like from billions of examples.
The name says what is special about it:
- Neural network: a set of numbers ("weights") that turns a description of the position into a score.
- Efficiently updatable: when one move is played, the network does not start from zero. It only adjusts for the few pieces that moved.
The idea was published in 2018 by the Japanese programmer Yu Nasu for computer shogi (Japanese chess). Shogi engines became much stronger with it, and in 2019 a shogi programmer known as nodchip ported it to Stockfish as "Stockfish NNUE". In August 2020 it was merged into the official Stockfish.
How NNUE works, step by step
- Describe the position as inputs. Each input is a simple yes/no fact such as "a white knight is on f3", counted relative to where the king stands. Stockfish's first NNUE (called HalfKP) had 41,024 such inputs for each side.
- Add up the first layer (the "accumulator"). Every input that is "on" adds its own list of weights. The sum is a few hundred numbers that summarise the position. This is the big, expensive part.
- Run a few small layers. The summary goes through a few much smaller layers. The first Stockfish network was written as 256x2-32-32-1: two halves of 256 numbers (one for each side), then 32, then 32, then one final score.
- Get one number. That number is the evaluation the search uses to compare positions.
Why "efficiently updatable" is the key idea
Most moves change very little. A quiet move switches off one input (the piece on its old square) and switches on one other (the piece on its new square). A capture changes three inputs, castling four. So instead of adding up tens of thousands of inputs again, the engine takes the accumulator from the position before, subtracts the weights of the inputs that turned off and adds the weights of the inputs that turned on. When a king moves, the inputs that depend on that king change, and that side's sum is rebuilt.
Because of this, NNUE needs no graphics card. The Stockfish team wrote when Stockfish 12 came out that it "remains a CPU-only engine, since the NNUE networks can be very efficiently evaluated on CPUs". That is the big difference from AlphaZero and Leela Chess Zero, whose much larger networks need a GPU or TPU and can only look at tens of thousands of positions per second. The full comparison is in neural network chess engines.
How much stronger NNUE made Stockfish
When the Stockfish team announced NNUE on 7 August 2020, it was "currently on > 80 Elo on fishtest", the engine's own testing system. In two of their test runs, the gain was measured at about 93 Elo (fast games, 1 thread) and 90 Elo (8 threads). Stockfish 12, released on 2 September 2020, would "typically win at least ten times more game pairs than it loses" against Stockfish 11.
| Date | Step |
|---|---|
| 2018 | Yu Nasu publishes NNUE for computer shogi |
| 2019 | nodchip builds "Stockfish NNUE" as a test |
| August 2020 | NNUE merged into official Stockfish (>80 Elo in tests) |
| 2 September 2020 | Stockfish 12: the first release with NNUE |
| August 2021 | The input set "HalfKAv2_hm" (king squares mirrored, fewer inputs) is used from now on |
| 24 February 2024 | Stockfish 16.1: the hand-written evaluation is removed completely; a second, smaller network is added |
| 31 January 2026 | Stockfish 18: network SFNNv10 with new "Threat Inputs" |
| 5 September 2026 | Stockfish 19: network SFNNv16; the small second network is retired |
Rating lists show the long climb: see Stockfish Elo by version and what changed in Stockfish 19 vs 18.
How an NNUE network is trained
A network only knows what it has been shown. NNUE networks are trained on huge numbers of positions, each labelled with a score and the game result. For its newest releases the Stockfish team says the training data were positions rescored with Leela Chess Zero networks: hundreds of billions of positions for Stockfish 19. So the two rival engines now help each other: Leela's big network teaches Stockfish's small, fast one.
Which engines use NNUE?
After Stockfish showed the gain, NNUE-style networks spread to almost every top alpha-beta engine. Most of the engines near the top of the 2026 engine ranking now use an efficiently updatable network of their own. Each engine trains its own net, and their profiles are on our chess engine pages. Leela Chess Zero is the big exception: it uses a large network with a different kind of search. NNUE engines also fight each other: see Torch vs Stockfish and how often they sacrifice material in our chess engine sacrifice statistics.
Play these engines yourself. Stockfish 19, Obsidian and Stormphrax are free to play; Reckless, PlentyChess, Viridithas, Berserk, Caissa, Koivisto and Ethereal are Premium bots. They run right in your browser. All engine bots · licences and source code.
Frequently asked questions
What does NNUE stand for?
NNUE stands for Efficiently Updatable Neural Network. Its inventor, Yu Nasu, first wrote it as a mirrored "ƎUИИ", which reads backwards as NNUE.
When did Stockfish start using NNUE?
NNUE was merged into Stockfish in August 2020, and Stockfish 12, released on 2 September 2020, was the first official version with it. The old hand-written evaluation was removed in Stockfish 16.1 in February 2024.
Does NNUE need a GPU?
No. NNUE is built to run fast on an ordinary CPU, because after each move only a few inputs change and the engine updates its first layer instead of recomputing it.
How much Elo did NNUE add to Stockfish?
The Stockfish team reported more than 80 Elo in its own tests when NNUE was introduced in August 2020, with about 90 Elo measured in two test runs.
Is NNUE the same as AlphaZero or Leela?
No. AlphaZero and Leela use a very large network and a Monte Carlo style search on GPUs or TPUs. NNUE is a small network inside a classic alpha-beta search on a CPU, so it can check millions of positions per second.
Who invented NNUE?
Yu Nasu invented NNUE in 2018 for computer shogi. A shogi programmer known as nodchip ported it to Stockfish in 2019.
Sources and checks
- Stockfish blog: "Introducing NNUE Evaluation" (7 August 2020), "Stockfish 12" (2 September 2020), "Stockfish 16.1" (24 February 2024), "Stockfish 18" (31 January 2026), "Stockfish 19" (5 September 2026), stockfishchess.org.
- Chess Programming Wiki: NNUE, Stockfish NNUE (HalfKP 41,024 inputs, 256x2-32-32-1; input changes per move).
- Stockfish nnue-pytorch documentation on source (HalfKAv2_hm, used since August 2021).
- Yu Nasu, "Efficiently Updatable Neural-Network-based Evaluation Functions for Computer Shogi" (2018). All checked 16 October 2026.
- Refresh 12 November 2026: Stockfish 19 is still the newest official Stockfish release (Stockfish GitHub releases page).
Keep learning on Rama Chess
Watch on YouTube
Prefer video? Our channels show real games move by move, with clear explanations.
Play the chess bots from this article on Rama Chess: Stockfish 18 (free), Leela Chess Zero.