Stockfish NN release (NNUE)

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

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Raphexon
Posts: 271
Joined: Sun Mar 17, 2019 11:00 am
Full name: Henk Drost

Re: Stockfish NN release (NNUE)

Post by Raphexon » Mon Jun 15, 2020 7:48 am

cdani wrote:
Sun Jun 14, 2020 8: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)

pohl4711
Posts: 1306
Joined: Sat Sep 03, 2011 5:25 am
Location: Berlin, Germany
Contact:

Re: Stockfish NN release (NNUE)

Post by pohl4711 » Mon Jun 15, 2020 8:20 am

pohl4711 wrote:
Sun Jun 14, 2020 12:46 pm
pohl4711 wrote:
Sun Jun 14, 2020 12: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: 271
Joined: Sun Mar 17, 2019 11:00 am
Full name: Henk Drost

Re: Stockfish NN release (NNUE)

Post by Raphexon » Mon Jun 15, 2020 8:31 am

pohl4711 wrote:
Mon Jun 15, 2020 8:20 am
pohl4711 wrote:
Sun Jun 14, 2020 12:46 pm
pohl4711 wrote:
Sun Jun 14, 2020 12: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.

pohl4711
Posts: 1306
Joined: Sat Sep 03, 2011 5:25 am
Location: Berlin, Germany
Contact:

Re: Stockfish NN release (NNUE)

Post by pohl4711 » Mon Jun 15, 2020 8:50 am

Raphexon wrote:
Mon Jun 15, 2020 8: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: 4
Joined: Tue May 19, 2020 5:41 pm
Full name: Ian Hodges

Re: Stockfish NN release (NNUE)

Post by muppetmuppet » Mon Jun 15, 2020 12: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.

User avatar
cdani
Posts: 2166
Joined: Sat Jan 18, 2014 9:24 am
Location: Andorra
Contact:

Re: Stockfish NN release (NNUE)

Post by cdani » Mon Jun 15, 2020 9:09 pm

muppetmuppet wrote:
Mon Jun 15, 2020 12: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: 2166
Joined: Sat Jan 18, 2014 9:24 am
Location: Andorra
Contact:

Re: Stockfish NN release (NNUE)

Post by cdani » Mon Jun 15, 2020 9:12 pm

cdani wrote:
Mon Jun 15, 2020 9:09 pm
muppetmuppet wrote:
Mon Jun 15, 2020 12: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: 271
Joined: Sun Mar 17, 2019 11:00 am
Full name: Henk Drost

Re: Stockfish NN release (NNUE)

Post by Raphexon » Tue Jun 16, 2020 6:04 pm

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 3:23 pm

Re: Stockfish NN release (NNUE)

Post by Dariusz Orzechowski » Wed Jun 17, 2020 12:04 am

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: 37
Joined: Wed Oct 24, 2018 5:37 am
Full name: Roman Zhukov

Re: Stockfish NN release (NNUE)

Post by Rom77 » Wed Jun 17, 2020 3:30 am

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/

Post Reply