Changes

Jump to: navigation, search

NNUE

7,440 bytes added, 15:16, 23 October 2020
no edit summary
'''[[Main Page|Home]] * [[Learning]] * [[Neural Networks]] * NNUE'''
 
[[FILE:SekienNue.jpg|border|right|thumb|250px| [[:Category:Toriyama Sekien|Toriyama Sekien]] - Nue (鵺) <ref>[https://en.wikipedia.org/wiki/Nue Nue] (鵺) from the [https://en.wikipedia.org/wiki/Konjaku_Gazu_Zoku_Hyakki Konjaku Gazu Zoku Hyakki] (今昔画図続百鬼) by [[:Category:Toriyama Sekien|Toriyama Sekien]], circa 1779, [https://en.wikipedia.org/wiki/Wikimedia_Commons Wikimedia Commons]</ref> <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=2&t=74611&start=2 Re: What does NNUE actually mean] by [[ Henk Drost]], [[CCC]], July 29, 2020</ref> ]]
'''NNUE''', (&#398;U&#1048;&#1048; Efficiently Updatable Neural Networks)<br/>
NNUE was introduced in 2018 by [[Yu Nasu]] <ref>[[Yu Nasu]] ('''2018'''). ''&#398;U&#1048;&#1048; Efficiently Updatable Neural-Network based Evaluation Functions for Computer Shogi''. Ziosoft Computer Shogi Club, [https://github.com/ynasu87/nnue/blob/master/docs/nnue.pdf pdf] (Japanese with English abstract)</ref>,
and was used in Shogi adaptations of [[Stockfish]] such as [[YaneuraOu]] <ref>[https://github.com/yaneurao/YaneuraOu GitHub - yaneurao/YaneuraOu: YaneuraOu is the World's Strongest Shogi engine(AI player), WCSC29 1st winner, educational and USI compliant engine]</ref>,
and [[Kristallweizen-kai]] <ref>[https://github.com/Tama4649/Kristallweizen/ GitHub - Tama4649/Kristallweizen: 第29回世界コンピュータ将棋選手権 準優勝のKristallweizenです。]</ref>, apparently with [[AlphaZero]] strength <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=2&t=72754 The Stockfish of shogi] by [[Larry Kaufman]], [[CCC]], January 07, 2020</ref>. NNUE chess engines could be considered as hybrids between [[Neural Networks]] engines and [[AlphaBeta]] engines.
==[[Stockfish NNUE=]]=As reported by [[Henk Drost]] <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=72&t=74058 74059 Stockfish NN release (NNUE)] by [[Henk Drost]], [[CCC]], May 31, 2020</ref>, [[Hisayori Noda|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|playing strength]] with different networks trained using a mixture of [[Supervised Learning|supervised]] and [[Reinforcement Learning|reinforcement learning]] methods -
despite the approximately halved search speed, seemingly becoming stronger than its original <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=2&t=74484 Can the sardine! NNUE clobbers SF] by [[Henk Drost]], [[CCC]], July 16, 2020</ref>. In July 2020, the playing code of  =NNUE is put into the official Stockfish repository as a branch for further development and examination. However, the training code still remains in Engines=''see [[Nodchip]]'s repo <ref>[https://github.com/official-stockfish/Stockfish/issues/2823 Category:NNUE merge · Issue #2823 · official-stockfish/Stockfish · GitHub] by [[Joost VandeVondele]], July 25, 2020</ref>.''
===Strong points Being tempted by the success of [[Stockfish NNUE===* Reuses ]] and attracted by how easy the method and gets benefits from small the very optimized search function 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 well as almost all Stockfish's code* Run [[David Carteau]] with CPU only[[Orion]] <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=2&t=74828 Orion 0.7 : NNUE experiment] by [[David Carteau]], doesn'[[CCC]], August 19, 2020</ref>, [[Ehsan Rashid]] with [[DON]] <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=2&t require expensive video cards=72613&start=320#p856640 Re: New engine releases 2020...Don NNUE 2020?] by supersharp77, [[CCC]], delete August 19, 2020</ref>, various [[Stockfish#Derivatives|Stockfish derivatives]] by [[Michael Byrne]] <ref>[http://talkchess.com/forum3/viewtopic.php?f=2&t=74825 ... the need of installing video drivers last shall be first ...] by [[Michael Byrne|MikeB]], [[CCC]], 19 Aug 2020</ref>, and specific libraries, thus it becomes much easier to install (compare [[Volodymyr Shcherbyna]] with other NN engines such as [[Leela Chess ZeroIgel]]) for users and can run in almost all modern computers* Require much smaller training sets<ref>[http://talkchess.com/forum3/viewtopic. Some high score networks can be built with php?f=2&t=67890&start=10#p856742 Introducing Igel chess engine] by [[Volodymyr Shcherbyna]], [[CCC]], 20 Aug 2020</ref> using the effort ''Night Nurse'' NNUE net by [[Dietrich Kappe]] <ref>[http://talkchess.com/forum3/viewtopic.php?f=2&t=74837 Night Nurse 0.2] by [[Dietrich Kappe]], [[CCC]], August 19, 2020</ref>. In October 2020, [[Daniel Shawul]] added NNUE support à la [[CFish]] into his [[Scorpio#Bitbases|egbbdll]] probing library of one or a few people[[Scorpio]] <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75400&start=22 Re: Hacking around CFish NNUE] by [[Daniel Shawul]], [[CCC]], October 15, 2020</ref> <ref>[http://www.talkchess.com/forum3/viewtopic. It doesn'php?f=7&t require the massive computing from a supercomputer and=75415&start=3 Re: How to scale stockfish NNUE score?] by [[Daniel Shawul]], [[CCC]], October 17, 2020</or from communityref>.
=NN Structure=
The neural network consists of four layers, W1 through W4. The input layer W1 is heavily overparametrized, feeding in the [[Board Representation|board representation]] for various king configurations.
The efficiency of the net is due to [[Incremental Updates|incremental update]] of W1 in [[Make Move|make]] and [[Unmake Move|unmake move]],
where only a fraction of its neurons need to be recalculated. The remaining three layers with 256x2x32-32x2x256, 32x32-and 32x1 neurons weights are computational less expensive, best calculated using appropriate [[SIMD and SWAR Techniques|SIMD instructions]] like [[AVX2]] on [[x86-64]], or if available, [[AVX-512]].
[[FILE:NNUE.jpg|none|border|text-bottom]]
=Forum Posts=
==2020 ...==
* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=72754 The Stockfish of shogi] by [[Larry Kaufman]], [[CCC]], January 07, 2020 » [[Stockfish]], [[Shogi]]
: [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=72754&start=18 Re: The Stockfish of shogi] by [[Gian-Carlo Pascutto]], [[CCC]], January 18, 2020
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=74058 Stockfish NNUE] by [[Henk Drost]], [[CCC]], May 31, 2020 » [[Stockfish]]
* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=74059 Stockfish NN release (NNUE)] by [[Henk Drost]], [[CCC]], May 31, 2020
===July===
* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=74484 Can the sardine! NNUE clobbers SF] by [[Henk Drost]], [[CCC]], July 16, 2020
* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=74520 Sergio Vieri second net is out] by Sylwy, [[CCC]], July 21, 2020
* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=74531 NNUE accessible explanation] by [[Martin Fierz]], [[CCC]], July 21, 2020
: [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=74531&start=1 Re: NNUE accessible explanation] by [[Jonathan Rosenthal]], [[CCC]], July 23, 2020
: [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=74531&start=5 Re: NNUE accessible explanation] by [[Jonathan Rosenthal]], [[CCC]], July 24, 2020
: [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=74531&start=8 Re: NNUE accessible explanation] by [[Jonathan Rosenthal]], [[CCC]], August 03, 2020* [https://groups.google.com/d/msg/fishcooking/Wpk-9COzk64/ez643VTkAAAJ BrainLearn NNUE 1.0] by [[Andrea Manzo]], [[Computer Chess Forums|FishCooking]], July 25, 2020 » [[BrainLearn]]* [https://groups.google.com/d/msg/fishcooking/yWtpz_FY5_Y/RMTG56fkAAAJ ShashChess NNUE 1.0] by [[Andrea Manzo]], [[Computer Chess Forums|FishCooking]], July 25, 2020 » [[ShashChess ]]* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=74607 LC0 vs. NNUE - some tech details...] by [[Srdja Matovic]], [[CCC]], July 29, 2020 » [[Leela Chess Zero#Lc0|Lc0]]* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=74565 74611 What does NNUE actually mean] by Paloma, [[CCC]], July 29, 2020===August===* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=73521&start=59 Re: Minic version 2] by [[Vivien Clauzon]], [[CCC]], August 08, 2020 » [[Minic]]* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=74777 Neural Networks weights type] by [[Fabio Gobbato]], [[CCC]], August 13, 2020 » [[Stockfish NNUE]] * [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=67890&start=17 Re: Introducing Igel chess engine - Igel and NNUE] by Lion[[Volodymyr Shcherbyna]], [[CCC]], July 25August 19, 2020 » [[Igel]]* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=74828 Orion 0.7 : NNUE experiment] by [[David Carteau]], [[CCC]], August 19, 2020 » [[Orion]]* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=74837 Night Nurse 0.2] by [[Dietrich Kappe]], [[CCC]], August 19, 2020 » [[A0lite]], [[Igel]]===September===* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=74955 Train a neural network evaluation] by [[Fabio Gobbato]], [[CCC]], September 01, 2020 » [[Automated Tuning]]* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=75016 RubiChess NNUE player implemented] by [[Andreas Matthies]], [[CCC]], September 06, 2020 » [[RubiChess]]* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75042 Neural network quantization] by [[Fabio Gobbato]], [[CCC]], September 08, 2020 » [[Neural Networks]]* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=75049 AVX-512 and NNUE] by [[Gian-Carlo Pascutto]], [[CCC]], September 08, 2020 » [[AVX-512]]* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=75241 Nemorino 6 (NNUE)] by [[Christian Günther|Florentino]], [[CCC]], September 28, 2020 » [[Nemorino]]* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=75247 A Crossroad in Computer Chess; Or Desperate Flailing for Relevance] by [[Andrew Grant]], [[CCC]], September 29, 2020* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=75248 NNUE variation] by [[Ed Schroder|Ed Schröder]], [[CCC]], September 29, 2020===October ...===* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75296 BONA_PIECE_ZERO] by [[Marco Belli|elcabesa]], [[CCC]], October 04, 2020* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=75335&start=91 Re: Final Release of Ethereal, V12.75] by [[Andrew Grant]], [[CCC]], October 09, 2020 » [[Ethereal]]* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75345 Request for someone to train an NNUE for Ethereal] by [[Andrew Grant]], [[CCC]], October 09, 2020 * [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75350 Ethereal Tuning - Data Dump] by [[Andrew Grant]], [[CCC]], October 10, 2020* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=75358 Dangerous turn] by [[Dann Corbit]], [[CCC]], October 10, 2020* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75393 Black crushing white, weird ?] by [[Vivien Clauzon]], [[CCC]], October 14, 2020 » [[Minic#MinicNNUE|MinicNNUE]]* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75400 Hacking around CFish NNUE] by [[Maksim Korzh]], [[CCC]], October 15, 2020 » [[CFish]]: [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75400&start=22 Re: Hacking around CFish NNUE] by [[Daniel Shawul]], [[CCC]], October 15, 2020 » [[Scorpio]]* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75415 How to scale stockfish NNUE score?] by [[Maksim Korzh]], [[CCC]], October 17, 2020: [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75415&start=3 Re: How to scale stockfish NNUE score?] by [[Daniel Shawul]], [[CCC]], October 17, 2020* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=75418 Embedding Stockfish NNUE to ANY CHESS ENGINE: YouTube series] by [[Maksim Korzh]], [[CCC]], October 17, 2020 » [[BBC]]* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=75433 Seer] by [[Gerd Isenberg]], [[CCC]], October 18, 2020 » [[Seer]]* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=75482 BBC 1.3 + Stockfish NNUE released!] by [[Maksim Korzh]], [[CCC]], October 21, 2020» [[BBC]]* [http://www.talkchess.com/forum3/viewtopic.php?f=2&t=74585 SF75500 Mayhem NNUE -New NN engine] by [[Toni Helminen|JohnWoe]], [[CCC]], October 22, 2020 » [[Mayhem NNUE]]* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75501 Centipawns vs Millipawns with NNUE going forward] by Madeleine Birchfield, [[CCC]], October 23, 2020 » [[Centipawns]], [[Millipawns]]* [http://www.talkchess.com/forum3/viewtopic.php?f=7&t=75506 NNUE Question - King Placements] by Zenmastur[[Andrew Grant]], [[CCC]], July 27October 23, 2020» [[Stockfish NNUE#NNUE Structure|Stockfish NNUE - NNUE Structure]]
=External Links=
==NNUE==
* [https://en.wikipedia.org/wiki/Efficiently_updatable_neural_network Efficiently updatable neural network | Wikipedia]
* [https://github.com/yaneurao/YaneuraOu GitHub - yaneurao/YaneuraOu: YaneuraOu is the World's Strongest Shogi engine(AI player), WCSC29 1st winner, educational and USI compliant engine]
* [https://github.com/Tama4649/Kristallweizen/ GitHub - Tama4649/Kristallweizen: 第29回世界コンピュータ将棋選手権 準優勝のKristallweizenです。]
* [http://qhapaq.hatenablog.com/entry/2018/06/02/221612 次世代の将棋思考エンジン、NNUE関数を学ぼう(その1.ネットワーク構造編) - コンピュータ将棋 Qhapaq], June 02, 2018 (Japanese)
: Learn Next Generation Shogi Thinking Engine, NNUE Function (Part 1. Network Structure) - Computer Shogi
* [http://qhapaq.hatenablog.com/entry/2018/07/08/193316 次世代の将棋思考エンジン、NNUE関数を学ぼう(その2.改造/学習編) - コンピュータ将棋 Qhapaq], July 08, 2018 (Japanese)
: Let's Learn Next Generation Shogi Thinking Engine, NNUE Function (Part 2. Remodeling/Learning) - Computer Shogi
* [http://yaneuraou.yaneu.com/2020/06/19/stockfish-nnue-the-complete-guide/ Stockfish NNUE – The Complete Guide], June 19, 2020 (Japanese and English)
* [http://yaneuraou.yaneu.com/2020/08/21/3-technologies-in-shogi-ai-that-could-be-used-for-chess-ai/ 3 technologies in shogi AI that could be used for chess AI] by [[Motohiro Isozaki]], August 21, 2020 » [[Stockfish NNUE]]* [https://github.com/nodchip/Stockfish GitHub - nodchip/Stockfish: UCI chess engine] ([[Stockfish NNUE]] by [[Hisayori Noda|Nodchip]])
* [https://www.qhapaq.org/shogi/shogiwiki/stockfish-nnue/ Stockfish NNUE Wiki]
* [https://github.com/official-stockfish/Stockfish/issues/2823 NNUE merge · Issue #2823 · official-stockfish/Stockfish · GitHub] by [[Joost VandeVondele]], July 25, 2020 <ref>[http://www.talkchess.com/forum3/viewtopic.php?f=2&t=74560 An info] by Sylwy, [[CCC]], July 25, 2020</ref>Misc==* [https://www.comp.nusen.eduwikipedia.sg/~sergio-v/nnue/ Index of org/~sergio-vwiki/nnue] by [[Sergio Vieri]Nue Nue from Wikipedia]
=References=
<references />
'''[[Neural Networks|Up one Level]]'''
[[Category:Toriyama Sekien]]

Navigation menu