Stockfish NN release (NNUE)

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

Moderators: hgm, Rebel, chrisw

cucumber
Posts: 144
Joined: Sun Oct 14, 2018 8:21 pm
Full name: JSmith

Re: Stockfish NN release (NNUE)

Post by cucumber »

ChickenLogic wrote: Mon Jun 08, 2020 10:33 pm Good news! SF NNUE is now being updated to SF dev! Also you can compile it now with msys2/mingw instead of Visual Studio. It still throws some warnings but the binaries work. For the blas binaries obviously the libopenblas dep has to be installed as well.

Also a nice bit of information from the computer shogi experts is that 1 million fens for validation is enough.
I still can't get binaries to work with mingw. Norman's code seems promising, though. Now to setup Visual Studio on my VM...
gonzochess75
Posts: 208
Joined: Mon Dec 10, 2018 3:29 pm
Full name: Adam Treat

Re: Stockfish NN release (NNUE)

Post by gonzochess75 »

FWIW, I've added a few includes and changed some gcc flags and it builds and runs under Linux here: https://github.com/manyoso/Stockfish

Check the readme for instructions... and if someone has a more recent net I'd appreciate it as the one I'm using is giving garbage output.
cucumber
Posts: 144
Joined: Sun Oct 14, 2018 8:21 pm
Full name: JSmith

Re: Stockfish NN release (NNUE)

Post by cucumber »

gonzochess75 wrote: Wed Jun 10, 2020 1:56 am FWIW, I've added a few includes and changed some gcc flags and it builds and runs under Linux here: https://github.com/manyoso/Stockfish

Check the readme for instructions... and if someone has a more recent net I'd appreciate it as the one I'm using is giving garbage output.
That runs for me! Thanks.
gonzochess75
Posts: 208
Joined: Mon Dec 10, 2018 3:29 pm
Full name: Adam Treat

Re: Stockfish NN release (NNUE)

Post by gonzochess75 »

It now gives reasonable output when you don't set the SkipLoadingEval which I mistakenly assumed you had to set to skip regular SF eval :P

```info depth 1 seldepth 1 multipv 1 score cp 36 nodes 20 nps 666 tbhits 0 time 30 pv d2d4
info depth 2 seldepth 2 multipv 1 score cp 145 nodes 46 nps 1121 tbhits 0 time 41 pv g1f3 b7b6
info depth 3 seldepth 3 multipv 1 score cp 87 nodes 94 nps 1566 tbhits 0 time 60 pv g1f3 b7b6 d2d4
info depth 4 seldepth 4 multipv 1 score cp 161 nodes 135 nps 1849 tbhits 0 time 73 pv g1f3 b7b6 d2d4
info depth 5 seldepth 6 multipv 1 score cp 71 nodes 534 nps 2781 tbhits 0 time 192 pv e2e4 d7d5 e4d5 d8d5 d2d4```
gonzochess75
Posts: 208
Joined: Mon Dec 10, 2018 3:29 pm
Full name: Adam Treat

Re: Stockfish NN release (NNUE)

Post by gonzochess75 »

Ok, now optimization is on and figured out the threading issue and I now see 3.2Mnps with 12 threads running under native linux.
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 »

kranium wrote: Tue Jun 09, 2020 5:02 pm I posted some changes to https://github.com/FireFather/Stockfish-nnue

1) UCI changed (is_ready() moved to UCI:loop)
2) consequently, UCI works normally, and nn.bin loads immediately on program start
3) comments translated to English

Visual Studio project files are included.
Hope this may help, or be of some use.

Thanks much to Hisayori Noda for his efforts and awesome code!
Your x64 binary does not work in cutechess-cli. In console-mode it runs on my Haswell-CPU. Strange.
carldaman
Posts: 2283
Joined: Sat Jun 02, 2012 2:13 am

Re: Stockfish NN release (NNUE)

Post by carldaman »

One thing I've noticed is that all SF-NNUE versions so far don't seem to recognize a modified contempt setting, especially for White, during games. The engine appears to ignore the setting.
cucumber
Posts: 144
Joined: Sun Oct 14, 2018 8:21 pm
Full name: JSmith

Re: Stockfish NN release (NNUE)

Post by cucumber »

Would anyone be willing to test this net? https://cdn.discordapp.com/attachments/ ... 4211/nn.7z

I've trained it off of fishtest games. I expect it to play endgames poorly (especially without TBs) since those don't appear much in training games. My code to go from PGNs to SF-NNUE training data could be broken, too, but I don't have a clue.

If you test it and would be comfortable sharing PGNs, that'd be really nice, too.

You will need 7-zip, WinRAR, or another archive utility to extract the file.
Raphexon
Posts: 476
Joined: Sun Mar 17, 2019 12:00 pm
Full name: Henk Drost

Re: Stockfish NN release (NNUE)

Post by Raphexon »

cucumber wrote: Fri Jun 12, 2020 8:47 pm Would anyone be willing to test this net? https://cdn.discordapp.com/attachments/ ... 4211/nn.7z

I've trained it off of fishtest games. I expect it to play endgames poorly (especially without TBs) since those don't appear much in training games. My code to go from PGNs to SF-NNUE training data could be broken, too, but I don't have a clue.

If you test it and would be comfortable sharing PGNs, that'd be really nice, too.

You will need 7-zip, WinRAR, or another archive utility to extract the file.
What binary to use?
Looks like a Crepe net.
cucumber
Posts: 144
Joined: Sun Oct 14, 2018 8:21 pm
Full name: JSmith

Re: Stockfish NN release (NNUE)

Post by cucumber »

Raphexon wrote: Fri Jun 12, 2020 10:32 pm
cucumber wrote: Fri Jun 12, 2020 8:47 pm Would anyone be willing to test this net? https://cdn.discordapp.com/attachments/ ... 4211/nn.7z

I've trained it off of fishtest games. I expect it to play endgames poorly (especially without TBs) since those don't appear much in training games. My code to go from PGNs to SF-NNUE training data could be broken, too, but I don't have a clue.

If you test it and would be comfortable sharing PGNs, that'd be really nice, too.

You will need 7-zip, WinRAR, or another archive utility to extract the file.
What binary to use?
Looks like a Crepe net.
You need to use the halfkp binary.
edit: I've received word that it's a pretty broken network. That's unfortunate :(