Stockfish NN release (NNUE)

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Raphexon
Posts: 476
Joined: Sun Mar 17, 2019 12:00 pm
Full name: Henk Drost

Re: Stockfish NN release (NNUE)

Post by Raphexon »

cdani wrote: Sun Jun 14, 2020 10:47 pm I'm curious. These nets how are comparable to Leela ones? In therms of size and speed, for example.

It plays very interesting! And different than Stockfish and Lc0 sometimes. Also sometimes it sees that a position is clearly wining before other engines.

Thanks for it!!
I'm glad you like the way it plays :D
I've also noticed it can sometimes find very interesting moves.

Comparing it to Leela is hard since all layers are connected, and the Japanese have specifically optimized it for CPU.
So I don't know how much (useful) information it holds compared to a Leela net of compareable size.
It's definitely a lot faster than Leela, the 20MB HalfKP is only 40% slower than SF. (the 400kb one is only slightly faster)
User avatar
pohl4711
Posts: 2435
Joined: Sat Sep 03, 2011 7:25 am
Location: Berlin, Germany
Full name: Stefan Pohl

Re: Stockfish NN release (NNUE)

Post by pohl4711 »

pohl4711 wrote: Sun Jun 14, 2020 2:46 pm
pohl4711 wrote: Sun Jun 14, 2020 2:05 pm
Sounds good. I started a 5000 games testrun for my Stockfish-testing ratinglist with that nn linked here in that post and that binary (stockfish.nnue-learn-use-blas.halfkp_256x2-32-32.exe). For testing conditions, look on my website:
https://www.sp-cc.de
Sorry, typo: meant stockfish.nnue.halfkp_256x2-32-32.exe binary.
570 games played (out of 5000): Score at the moment: 58.9% (vs. 5 opponents with average 3344 SPCC-Elo). So, at the moment the Elo-rating is 3407 (= same level as Komodo 13.1 in my ratinglist, slightly better than Stockfish 8, but still clearly weaker than Stockfish 9)
All games are OK (no crashes, timelosses or other problems).

Looks quite good so far.
Raphexon
Posts: 476
Joined: Sun Mar 17, 2019 12:00 pm
Full name: Henk Drost

Re: Stockfish NN release (NNUE)

Post by Raphexon »

pohl4711 wrote: Mon Jun 15, 2020 10:20 am
pohl4711 wrote: Sun Jun 14, 2020 2:46 pm
pohl4711 wrote: Sun Jun 14, 2020 2:05 pm
Sounds good. I started a 5000 games testrun for my Stockfish-testing ratinglist with that nn linked here in that post and that binary (stockfish.nnue-learn-use-blas.halfkp_256x2-32-32.exe). For testing conditions, look on my website:
https://www.sp-cc.de
Sorry, typo: meant stockfish.nnue.halfkp_256x2-32-32.exe binary.
570 games played (out of 5000): Score at the moment: 58.9% (vs. 5 opponents with average 3344 SPCC-Elo). So, at the moment the Elo-rating is 3407 (= same level as Komodo 13.1 in my ratinglist, slightly better than Stockfish 8, but still clearly weaker than Stockfish 9)
All games are OK (no crashes, timelosses or other problems).

Looks quite good so far.
I guess slowmover is still at default? (100)
It doesn't matter too much*, I should have a new net ready tomorrow and will then do some testing with slowmover. But currently I prefer a value between 40 and 50.

*NNUE likely benefits from the 5 piece adjudication.
User avatar
pohl4711
Posts: 2435
Joined: Sat Sep 03, 2011 7:25 am
Location: Berlin, Germany
Full name: Stefan Pohl

Re: Stockfish NN release (NNUE)

Post by pohl4711 »

Raphexon wrote: Mon Jun 15, 2020 10:31 am
I guess slowmover is still at default? (100)
It doesn't matter too much*, I should have a new net ready tomorrow and will then do some testing with slowmover. But currently I prefer a value between 40 and 50.
Yes, all options are default in my testrun.
muppetmuppet
Posts: 10
Joined: Tue May 19, 2020 7:41 pm
Full name: Ian Hodges

Re: Stockfish NN release (NNUE)

Post by muppetmuppet »

best we have so far I have at 3485. That is using 384 net size. Come to sf discord nnue to post where new nets are and results and ideas.
User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: Stockfish NN release (NNUE)

Post by cdani »

muppetmuppet wrote: Mon Jun 15, 2020 2:07 pm best we have so far I have at 3485. That is using 384 net size. Come to sf discord nnue to post where new nets are and results and ideas.
I don't know much about Discord. I try searching "sf nnue" or "nnue" and no channels appear. How do I enter there?
Thanks
User avatar
cdani
Posts: 2204
Joined: Sat Jan 18, 2014 10:24 am
Location: Andorra

Re: Stockfish NN release (NNUE)

Post by cdani »

cdani wrote: Mon Jun 15, 2020 11:09 pm
muppetmuppet wrote: Mon Jun 15, 2020 2:07 pm best we have so far I have at 3485. That is using 384 net size. Come to sf discord nnue to post where new nets are and results and ideas.
I don't know much about Discord. I try searching "sf nnue" or "nnue" and no channels appear. How do I enter there?
Thanks
I found it. Is a channel inside Stockfish Discord.
Thanks.
Raphexon
Posts: 476
Joined: Sun Mar 17, 2019 12:00 pm
Full name: Henk Drost

Re: Stockfish NN release (NNUE)

Post by Raphexon »

Could the Firefather enable these commands?

https://github.com/FireFather/Stockfish ... .cpp#L2456

https://github.com/FireFather/Stockfish ... .cpp#L2766

With this we should be able to convert .bin files to plain text with the "learn convert_plain output_file_name [output file name] [input file name]" command.

And convert .txt files to bin with: "learn convert_bin output_file_name [output file name] [input file name]"
Dariusz Orzechowski
Posts: 44
Joined: Thu May 02, 2013 5:23 pm

Re: Stockfish NN release (NNUE)

Post by Dariusz Orzechowski »

Some more results with two nets from this thread against the latest sf dev. 1 thread, tc 1m+1s, the same 100 short normal openings for both matches. Bigger net is more solid.

Code: Select all

sf dev 150620 - sf nnue halfkp256 : 116,5/200 +57-24=119
sf dev 150620 - sf nnue halfkp384 : 109,5/200 +41-22=137
Rom77
Posts: 45
Joined: Wed Oct 24, 2018 7:37 am
Full name: Roman Zhukov

Re: Stockfish NN release (NNUE)

Post by Rom77 »

I tried to draw a small diagram illustrating the structure of the NNUE neural network. It is based on Japanese publication and translations. The translation of the first part of this publication was done by Terje, the rest I translated using Google translate and DeepL.

If there are any errors both in English (I don’t speak English) and in my understanding of the NNUE structure, then please let me know:

Image


References:

Original publication (and translations):
https://dropmefiles.com/TH26I

Explanation of NNUE KP (not HalfKP !) in Japanese:
http://yaneuraou.yaneu.com/2019/01/29/n ... %E5%8A%B9/

An explanation of the old Bonanza KPP in Japanese:
http://yaneuraou.yaneu.com/2020/05/03/% ... e3%81%ae1/