Efficiently updatable neural network
This article is part of the series on |
Chess programming |
---|
![]() |
In computer strategy games like in shogi and chess, an efficiently updatable neural network (NNUE, a Japanese wordplay on Nue, sometimes stylised as ƎUИИ) is a neural network-based evaluation function whose inputs are piece-square tables, or variants thereof like the king-piece-square table.[1] NNUE relies on the tendency in these games for the game state to change only slightly between moves.
NNUE was invented by Yu Nasu and introduced to computer shogi in 2018.[2][3] On 6 August 2020, NNUE was for the first time ported to a chess engine, Stockfish 12, resulting in a major increase in playing strength for that engine.[4][5] As of 2025, NNUE is the dominant evaluation function paradigm used by top alpha–beta chess engines like Komodo Dragon.
NNUE are designed to run efficiently on central processing units (CPU).[6][7] They use used incremental computation and single instruction multiple data (SIMD) techniques along with appropriate intrinsic instructions.[2] In contrast, deep neural network-based chess engines such as Leela Chess Zero rely on without a requirement for a graphics processing unit GPUs for efficient inference.[8][9]
The neural network used for the original 2018 computer shogi implementation consists of four weight layers: W1 (16-bit integers) and W2, W3 and W4 (8-bit). It has 4 fully-connected layers, ReLU activation functions, and outputs a single number, being the score of the board. As of 2025, Stockfish has introduced several optimizations to the NNUE architecture, but the overall architecture remains similar.[10]
See also
[edit]- elmo (shogi engine)
- Stockfish chess engine - The chapter about NNUE features a visualization of NNUE.
- List of chess software
References
[edit]- ^ Gary Linscott (April 30, 2021). "NNUE". GitHub. Retrieved December 12, 2020.
- ^ a b Yu Nasu (April 28, 2018). "Efficiently Updatable Neural-Network-based Evaluation Function for computer Shogi" (PDF) (in Japanese).
- ^ Yu Nasu (April 28, 2018). "Efficiently Updatable Neural-Network-based Evaluation Function for computer Shogi (Unofficial English Translation)" (PDF). GitHub.
- ^ "Introducing NNUE Evaluation". 6 August 2020.
- ^ Joost VandeVondele (July 25, 2020). "official-stockfish / Stockfish, NNUE merge". GitHub.
- ^ "Stockfish FAQ: Can Stockfish use my GPU?". Stockfish. Retrieved 19 January 2025.
- ^ "nnue-pytorch/docs/nnue.md". GitHub.
- ^ Dominik Klein (2022), Neural Networks for Chess, p. 49, arXiv:2209.01506
- ^ Monroe, Daniel; Chalmers, Philip A. (2024). "Mastering Chess with a Transformer Model". arXiv:2409.12272 [cs.LG].
- ^ "NNUE | Stockfish Docs". Stockfish documentation. 2025-06-12. Retrieved 2025-06-23.
External links
[edit]- NNUE on the Chess Programming Wiki.
- NNUE evaluation functions for computer shogi on github.com