Stockfish NN release (NNUE)

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

Moderator: Ras

User avatar
pohl4711
Posts: 2802
Joined: Sat Sep 03, 2011 7:25 am
Location: Berlin, Germany
Full name: Stefan Pohl

Re: Stockfish NN release (NNUE)

Post by pohl4711 »

Joerg Oster wrote: Sat Jun 06, 2020 12:59 pm
Try issuing an 'ucinewgame' and 'isready' command to make the engine load the net.
Without this it didn't work for me, either.
You are right - in FritzGUI, the engines runs fine. Strange behaviour, that "go infinite" in console mode do not work...

Thanks for help.
User avatar
Master Om
Posts: 452
Joined: Wed Nov 24, 2010 10:57 am
Location: INDIA

Re: Stockfish NN release (NNUE)

Post by Master Om »

Raphexon wrote: Sat Jun 06, 2020 11:12 am
pohl4711 wrote: Sat Jun 06, 2020 10:33 am
Master Om wrote: Sat Jun 06, 2020 7:32 am
hi,
The BMI2 compiles are not running on AMD Ryzen box. Also I am not able to figure out how to use the nn.bin
Please give a detailed instruction and popcnt compiles.
On my Haswell CPU i7-6700HQ (mobile CPU), it does not run, too. I can start the engine in console-mode, but when I type "go infinite", it closes immediately. All other engines start thinking, then (Lc0, Stockfish, Komodo etc.)
The "...halfkp_256x2-32-32" binary needs the 20MB eval in the eval folder:

This is Chickenlogic's big net, that's afaik the strongest yet:


Do use the latest binaries with it:
https://github.com/nodchip/Stockfish/re ... 2020-06-04

The "...k-p_256x2-32-32" binary needs the 400 kb eval in the eval folder: (and also needs the latest binaries)
Use this net with it:
http://talkchess.com/forum3/viewtopic.p ... 50#p845988

Also the nn file has to be called nn.bin, or it won't load.

Does it work now?
I added the eval folder. Now working fine.
I am using the halfkp with 20 mb chickenlogic nn.bin. But its playing/analysisng weird.
Its suggesting weird moves.
Always Expect the Unexpected
ChickenLogic
Posts: 154
Joined: Sun Jan 20, 2019 11:23 am
Full name: kek w

Re: Stockfish NN release (NNUE)

Post by ChickenLogic »

For analysing and playing I recommend this release: https://github.com/nodchip/Stockfish/re ... 2020-06-04
Use the blas compile for maximum nps.
This net was trained with the sped-up binary so it needs at least this release. The later one has the shallow depth pruning disabled so the fixed depth is stronger but in normal play it will cost a lot of elo - about 170 to 200. It might also be possible that it scales better on multiple cores. For me this net plays very good chess. It drew Leela already and even held against SF dev as white in a KGA. Let me know if this doesn't help.
kranium
Posts: 2129
Joined: Thu May 29, 2008 10:43 am

Re: Stockfish NN release (NNUE)

Post by kranium »

Code: Select all

   # PLAYER                           : RATING  ERROR   POINTS  PLAYED    (%)
   1 Stockfish.nnue.halfkp_256x2-3    : 2526.5   24.8     57.5     100   57.5%
   2 Stockfish_9_x64_bmi2             : 2473.5   24.8     42.5     100   42.5%
   
1) Stockfish.nnue.halfkp_256x2-3  2526 :    100 (+25,=65,-10),  57.5 %
   vs.                                 :  games (  +,  =,  -),   (%) :   Diff,  SD, CFS (%)
   Stockfish_9_x64_bmi2                :    100 ( 25, 65, 10),  57.5 :    +53,  23,   99.0

2) Stockfish_9_x64_bmi2           2474 :    100 (+10,=65,-25),  42.5 %
   vs.                                 :  games (  +,  =,  -),   (%) :   Diff,  SD, CFS (%)
   Stockfish.nnue.halfkp_256x2-3       :    100 ( 10, 65, 25),  42.5 :    -53,  23,    1.0

Code: Select all

   # PLAYER                               : RATING  ERROR   POINTS  PLAYED    (%)
   1 Stockfish_10                         : 2503.4   26.2     53.0     104   51.0%
   2 Stockfish.nnue.halfkp_256x2-32-32    : 2496.6   26.2     51.0     104   49.0%
   
1) Stockfish_10                       2503 :    104 (+20,=66,-18),  51.0 %
   vs.                                     :  games (  +,  =,  -),   (%) :   Diff,  SD, CFS (%)
   Stockfish.nnue.halfkp_256x2-32-32       :    104 ( 20, 66, 18),  51.0 :     +7,  24,   61.1

2) Stockfish.nnue.halfkp_256x2-32-32  2497 :    104 (+18,=66,-20),  49.0 %
   vs.                                     :  games (  +,  =,  -),   (%) :   Diff,  SD, CFS (%)
   Stockfish_10                            :    104 ( 18, 66, 20),  49.0 :     -7,  24,   38.9    
Thx ChickenLogic-

I had some time to run some games, it plays awesome chess and appears to be somewhere around SF 10 strength...only 30-40 elo short of SF11.
Those games are 1+1 with 8 threads and 2048 Mb Hash each, on an intel i9-990k.

Looks like it has enormous potential...let's hope the SF team puts some resources into trying it.
The extra code needed is quite small, the system simply uses existing SF with the newly created NN evaluation.
Last edited by kranium on Sun Jun 07, 2020 1:03 pm, edited 1 time in total.
Joerg Oster
Posts: 979
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany
Full name: Jörg Oster

Re: Stockfish NN release (NNUE)

Post by Joerg Oster »

ChickenLogic wrote: Sat Jun 06, 2020 5:21 pm
Joerg Oster wrote: Sat Jun 06, 2020 1:58 pm Generating fens now might take a little bit more time,
but the scores should be more reliable now.
So, I'd like to compile it on Linux. What do I have to do to make it work? And are there benefits using openMP? On Windows I get a warning that it is disabled but it still works.
See https://github.com/nodchip/Stockfish/co ... 31f03128ba
Jörg Oster
Alayan
Posts: 550
Joined: Tue Nov 19, 2019 8:48 pm
Full name: Alayan Feh

Re: Stockfish NN release (NNUE)

Post by Alayan »

Is this latest SF-NNUe executable still using SF10's search ?
Chessqueen
Posts: 5685
Joined: Wed Sep 05, 2018 2:16 am
Location: Moving
Full name: Jorge Picado

Re: Stockfish NN release (NNUE)

Post by Chessqueen »

Alayan wrote: Sun Jun 07, 2020 2:49 pm Is this latest SF-NNUe executable still using SF10's search ?
No this is the Latest Stockfish playing versus GM Foreest on chess.com LIVE, since the NN is not yet available to the public https://www.chess.com/live#g=4965565629
Joerg Oster
Posts: 979
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany
Full name: Jörg Oster

Re: Stockfish NN release (NNUE)

Post by Joerg Oster »

ChickenLogic wrote: Sun Jun 07, 2020 12:18 pm The later one has the shallow depth pruning disabled so the fixed depth is stronger but in normal play it will cost a lot of elo - about 170 to 200.
That's outright nonsense!

This patch only disables the pruning for the very first 4 iterations of the search,
which avoids outright blunders and strange scores.
It doesn't cost any elo even at very fast games.

Code: Select all

And still competitive at ultrafast 1"+0.01" time control:

    Finished game 500 (SF-Master vs SF-LowPlies4a): 1/2-1/2 {Draw by 3-fold repetition}
    Score of SF-LowPlies4a vs SF-Master: 196 - 173 - 131 [0.523] 500
    Elo difference: 16.0 +/- 26.2, LOS: 88.4 %, DrawRatio: 26.2 %
    Finished match
Jörg Oster
Joerg Oster
Posts: 979
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany
Full name: Jörg Oster

Re: Stockfish NN release (NNUE)

Post by Joerg Oster »

Alayan wrote: Sun Jun 07, 2020 2:49 pm Is this latest SF-NNUe executable still using SF10's search ?
Yes, SF-NNUE is based on Stockfish 10.
Jörg Oster
ChickenLogic
Posts: 154
Joined: Sun Jan 20, 2019 11:23 am
Full name: kek w

Re: Stockfish NN release (NNUE)

Post by ChickenLogic »

Joerg Oster wrote: Sun Jun 07, 2020 3:00 pm
ChickenLogic wrote: Sun Jun 07, 2020 12:18 pm The later one has the shallow depth pruning disabled so the fixed depth is stronger but in normal play it will cost a lot of elo - about 170 to 200.
That's outright nonsense!

This patch only disables the pruning for the very first 4 iterations of the search,
which avoids outright blunders and strange scores.
It doesn't cost any elo even at very fast games.

Code: Select all

And still competitive at ultrafast 1"+0.01" time control:

    Finished game 500 (SF-Master vs SF-LowPlies4a): 1/2-1/2 {Draw by 3-fold repetition}
    Score of SF-LowPlies4a vs SF-Master: 196 - 173 - 131 [0.523] 500
    Elo difference: 16.0 +/- 26.2, LOS: 88.4 %, DrawRatio: 26.2 %
    Finished match
Then I have misunderstood the patch. I am sorry. Why is it marked worth 170 Elo (and even 200 elo in SF dev) if it doesn't lose elo?
Just to clarify myself: with "normal play" I meant a TC a human would actually be able to watch and somewhat understand what's happening. So like 10 mins+2secs or so.