NNUE

Home * Learning * Neural Networks * NNUE



NNUE, (&#398;U&#1048;&#1048; Efficiently Updatable Neural Networks) a Neural Network architecture intended to replace the evaluation of Shogi, chess and other board game playing alpha-beta searchers running on a CPU. NNUE was introduced in 2018 by Yu Nasu , and was used in Shogi adaptations of Stockfish such as YaneuraOu , and Kristallweizen, apparently with AlphaZero strength.

=Stockfish NNUE= As reported by Henk Drost , Nodchip incorporated NNUE into the chess playing Stockfish 10 as a proof of concept. Stockfish NNUE was born, and in summer 2020 the computer chess community bursts out enthusiastically due to its rapidly raising playing strength with different networks trained using a mixture of supervised and reinforcement learning methods - despite the approximately halved search speed, becoming stronger than its original.

=NNUE Engines= see Category:NNUE

Being tempted by the success of Stockfish NNUE and attracted by how easy the method and small the code is, many engine developers have started testing and applying NNUE. For quick trials and evaluating before going into serious development, some of them borrowed and/or rewrote NNUE code and use networks from Stockfish NNUE. Most of them reported positive results, such as David Carteau with Orion, Ehsan Rashid with DON , various Stockfish derivatives by Michael Byrne , and Volodymyr Shcherbyna with Igel using the Night Nurse NNUE net by Dietrich Kappe.

=NN Structure= The neural network consists of four layers, W1 through W4. The input layer W1 is heavily overparametrized, feeding in the board representation for various king configurations. The efficiency of the net is due to incremental update of W1 in make and unmake move, where only a fraction of its neurons need to be recalculated. The remaining three layers with 32x2x256, 32x32 and 32x1 weights are computational less expensive, best calculated using appropriate SIMD instructions like AVX2 on x86-64, or if available, AVX-512.

NNUE structure with incremental update

=See also=
 * NNUE Engines

=Publications=
 * Yu Nasu (2018). &#398;U&#1048;&#1048; Efficiently Updatable Neural-Network based Evaluation Functions for Computer Shogi. Ziosoft Computer Shogi Club, pdf (Japanese with English abstract)

=Forum Posts=

2020 ...

 * The Stockfish of shogi by Larry Kaufman, CCC, January 07, 2020 » Stockfish, Shogi
 * Re: The Stockfish of shogi by Gian-Carlo Pascutto, CCC, January 18, 2020


 * Stockfish NNUE by Henk Drost, CCC, May 31, 2020 » Stockfish
 * Stockfish NN release (NNUE) by Henk Drost, CCC, May 31, 2020

July

 * Can the sardine! NNUE clobbers SF by Henk Drost, CCC, July 16, 2020
 * NNUE accessible explanation by Martin Fierz, CCC, July 21, 2020
 * Re: NNUE accessible explanation by Jonathan Rosenthal, CCC, July 23, 2020
 * Re: NNUE accessible explanation by Jonathan Rosenthal, CCC, July 24, 2020
 * Re: NNUE accessible explanation by Jonathan Rosenthal, CCC, August 03, 2020


 * BrainLearn NNUE 1.0 by Andrea Manzo, FishCooking, July 25, 2020 » BrainLearn
 * ShashChess NNUE 1.0 by Andrea Manzo, FishCooking, July 25, 2020 » ShashChess
 * LC0 vs. NNUE - some tech details... by Srdja Matovic, CCC, July 29, 2020 » Lc0
 * What does NNUE actually mean by Paloma, CCC, July 29, 2020

August

 * Re: Minic version 2 by Vivien Clauzon, CCC, August 08, 2020 » Minic
 * Neural Networks weights type by Fabio Gobbato, CCC, August 13, 2020 » Stockfish NNUE
 * Re: Introducing Igel chess engine - Igel and NNUE by Volodymyr Shcherbyna, CCC, August 19, 2020 » Igel
 * Orion 0.7 : NNUE experiment by David Carteau, CCC, August 19, 2020 » Orion
 * Night Nurse 0.2 by Dietrich Kappe, CCC, August 19, 2020 » A0lite, Igel

September ...

 * Train a neural network evaluation by Fabio Gobbato, CCC, September 01, 2020 » Automated Tuning
 * RubiChess NNUE player implemented by Andreas Matthies, CCC, September 06, 2020 » RubiChess
 * Neural network quantization by Fabio Gobbato, CCC, September 08, 2020 » Neural Networks
 * AVX-512 and NNUE by Gian-Carlo Pascutto, CCC, September 08, 2020 » AVX-512
 * NNUE variation by Ed Schröder, CCC, September 29, 2020

=External Links=

NNUE

 * Efficiently updatable neural network | Wikipedia
 * GitHub - yaneurao/YaneuraOu: YaneuraOu is the World's Strongest Shogi engine(AI player), WCSC29 1st winner, educational and USI compliant engine
 * GitHub - Tama4649/Kristallweizen: 第29回世界コンピュータ将棋選手権 準優勝のKristallweizenです.
 * 次世代の将棋思考エンジン、NNUE関数を学ぼう（その１．ネットワーク構造編） - コンピュータ将棋 Qhapaq, June 02, 2018 (Japanese)
 * Learn Next Generation Shogi Thinking Engine, NNUE Function (Part 1. Network Structure) - Computer Shogi


 * 次世代の将棋思考エンジン、NNUE関数を学ぼう（その2．改造/学習編） - コンピュータ将棋 Qhapaq, July 08, 2018 (Japanese)
 * Let's Learn Next Generation Shogi Thinking Engine, NNUE Function (Part 2. Remodeling/Learning) - Computer Shogi


 * Stockfish NNUE – The Complete Guide, June 19, 2020 (Japanese and English)
 * GitHub - nodchip/Stockfish: UCI chess engine (Stockfish NNUE by Nodchip)
 * Stockfish NNUE Wiki

Misc

 * Nue from Wikipedia

=References= Up one Level