Stockfish NNUE for analysis of positions (Tabias)

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

Moderators: hgm, Rebel, chrisw

Cornfed
Posts: 511
Joined: Sun Apr 26, 2020 11:40 pm
Full name: Brian D. Smith

Stockfish NNUE for analysis of positions (Tabias)

Post by Cornfed »

Stockfish NNUE strikes me as ideal to use on pretty equal(ish) 'end of theory' positions (tabias) in ones personal opening OTB repertoire, where one needs to figure out on their own a good way to proceed.

How best to set this up for simple analysis of options in those positions?

Taking Chessbase as an example, I presume all one needs to do is: download the file containing
1. Eval folder
2. Sf-nnue-avx2.exe
Sf-nnue-bmi2.exe
Sf-nnue-popcount.exe

Save that onto your hard drive. I save mine in: This PC ->Documents ->ChessBase-> Engines (Local).
Then activate one (lets say popcount), “add engine” to ChessBase engine options with properties options “Use NNUE” checked, EvalFile: ./eval/nn.bin; and I have chosen Analysis Contempt – “Off”….and then you analyze the position you want to delve into? I do not see any
hash that needs to get dumped regularly. Hash size: 2764

I apologize for the basic non-'game play' questions - I've just never heard anyone address this and am unsure. I generally use Komodo 11.3 for this purpose. Komodo 14 MTSC with 4 pv might be ideal, but my subscription lapsed with 11.3.

System:
Core i7-6700; 3.4 Ghz (4 core/8 hyper-threaded)
Memory: 16 gb
Windows 10
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Stockfish NNUE for analysis of positions (Tabias)

Post by zullil »

Cornfed wrote: Sun Aug 09, 2020 7:10 pm Stockfish NNUE strikes me as ideal to use on pretty equal(ish) 'end of theory' positions (tabias) in ones personal opening OTB repertoire, where one needs to figure out on their own a good way to proceed.

How best to set this up for simple analysis of options in those positions?

Taking Chessbase as an example, I presume all one needs to do is: download the file containing
1. Eval folder
2. Sf-nnue-avx2.exe
Sf-nnue-bmi2.exe
Sf-nnue-popcount.exe

Save that onto your hard drive. I save mine in: This PC ->Documents ->ChessBase-> Engines (Local).
Then activate one (lets say popcount), “add engine” to ChessBase engine options with properties options “Use NNUE” checked, EvalFile: ./eval/nn.bin; and I have chosen Analysis Contempt – “Off”….and then you analyze the position you want to delve into? I do not see any
hash that needs to get dumped regularly. Hash size: 2764

I apologize for the basic non-'game play' questions - I've just never heard anyone address this and am unsure. I generally use Komodo 11.3 for this purpose. Komodo 14 MTSC with 4 pv might be ideal, but my subscription lapsed with 11.3.

System:
Core i7-6700; 3.4 Ghz (4 core/8 hyper-threaded)
Memory: 16 gb
Windows 10
If you do want you've written, you'll need to have a file name nn.bin in the eval file. You might want to get a recent one, say from

https://www.comp.nus.edu.sg/~sergio-v/nnue/

And then rename nn.bin or change the string in the EvalFile option.
Cornfed
Posts: 511
Joined: Sun Apr 26, 2020 11:40 pm
Full name: Brian D. Smith

Re: Stockfish NNUE for analysis of positions (Tabias)

Post by Cornfed »

Thanks for the reply. Appreciate it.
In the "Eval Folder", there already is a file named: nn.bin. It is 20,530 in size. It just being in the folder is good enough?

So, I should go to the website you posted and download on of the files to the eval folder where the Sf-nnue-popcount .exe is and I'm good to go?
Actually, I guess I need to point the EvalFile box in engine properties to ./eval/(whatever recent one I chose)...

System:
Core i7-6700; 3.4 Ghz (4 core/8 hyper-threaded)
Memory: 16 gb
Graphics: GeForce GTX 750 (very cheap)
Windows 10
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Stockfish NNUE for analysis of positions (Tabias)

Post by zullil »

Cornfed wrote: Sun Aug 09, 2020 9:03 pm Thanks for the reply. Appreciate it.
In the "Eval Folder", there already is a file named: nn.bin. It is 20,530 in size. It just being in the folder is good enough?

So, I should go to the website you posted and download on of the files to the eval folder where the Sf-nnue-popcount .exe is and I'm good to go?
Actually, I guess I need to point the EvalFile box in engine properties to ./eval/(whatever recent one I chose)...

System:
Core i7-6700; 3.4 Ghz (4 core/8 hyper-threaded)
Memory: 16 gb
Graphics: GeForce GTX 750 (very cheap)
Windows 10
If you have an nn.bin already then you should be able to use the engine via the step in your first post. I didn't realize you already had a network. You can always download other networks and edit the EvalFile string to point to the one you want to use.
Cornfed
Posts: 511
Joined: Sun Apr 26, 2020 11:40 pm
Full name: Brian D. Smith

Re: Stockfish NNUE for analysis of positions (Tabias)

Post by Cornfed »

zullil wrote: Sun Aug 09, 2020 9:35 pm
Cornfed wrote: Sun Aug 09, 2020 9:03 pm Thanks for the reply. Appreciate it.
In the "Eval Folder", there already is a file named: nn.bin. It is 20,530 in size. It just being in the folder is good enough?

So, I should go to the website you posted and download on of the files to the eval folder where the Sf-nnue-popcount .exe is and I'm good to go?
Actually, I guess I need to point the EvalFile box in engine properties to ./eval/(whatever recent one I chose)...

System:
Core i7-6700; 3.4 Ghz (4 core/8 hyper-threaded)
Memory: 16 gb
Graphics: GeForce GTX 750 (very cheap)
Windows 10
If you have an nn.bin already then you should be able to use the engine via the step in your first post. I didn't realize you already had a network. You can always download other networks and edit the EvalFile string to point to the one you want to use.
Thanks. That seems to have worked just fine.

I was comparing my original with 20200808-1351.bin and the later seems a bit faster, both at 2 cpu. Generally the latter getting to a final choice and sticking to it quicker than the original nnue.

Odd though, my computer started beeping and there was a 'Thermal shut down'. Never happened in 3 yrs with me throwing rather a lot at the computer.

Is perhaps there something in the nnue that would cause a CPU to run too hot?
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Stockfish NNUE for analysis of positions (Tabias)

Post by zullil »

Cornfed wrote: Mon Aug 10, 2020 12:18 am
zullil wrote: Sun Aug 09, 2020 9:35 pm
Cornfed wrote: Sun Aug 09, 2020 9:03 pm Thanks for the reply. Appreciate it.
In the "Eval Folder", there already is a file named: nn.bin. It is 20,530 in size. It just being in the folder is good enough?

So, I should go to the website you posted and download on of the files to the eval folder where the Sf-nnue-popcount .exe is and I'm good to go?
Actually, I guess I need to point the EvalFile box in engine properties to ./eval/(whatever recent one I chose)...

System:
Core i7-6700; 3.4 Ghz (4 core/8 hyper-threaded)
Memory: 16 gb
Graphics: GeForce GTX 750 (very cheap)
Windows 10
If you have an nn.bin already then you should be able to use the engine via the step in your first post. I didn't realize you already had a network. You can always download other networks and edit the EvalFile string to point to the one you want to use.
Thanks. That seems to have worked just fine.

I was comparing my original with 20200808-1351.bin and the later seems a bit faster, both at 2 cpu. Generally the latter getting to a final choice and sticking to it quicker than the original nnue.

Odd though, my computer started beeping and there was a 'Thermal shut down'. Never happened in 3 yrs with me throwing rather a lot at the computer.

Is perhaps there something in the nnue that would cause a CPU to run too hot?
Which version were you running? avx2? nnue is indeed computationally intensive. Time to check your fans and vacuum out dust?
Cornfed
Posts: 511
Joined: Sun Apr 26, 2020 11:40 pm
Full name: Brian D. Smith

Re: Stockfish NNUE for analysis of positions (Tabias)

Post by Cornfed »

Popcount.

I've been running it(alone) on 2 core for 2 hrs now, no problem. Just happened when I ran it in tandem with the other for about 45 min.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Stockfish NNUE for analysis of positions (Tabias)

Post by zullil »

Cornfed wrote: Mon Aug 10, 2020 3:35 am Popcount.

I've been running it(alone) on 2 core for 2 hrs now, no problem. Just happened when I ran it in tandem with the other for about 45 min.
Your CPU should be able to run the bmi2 and avx2 binaries. The latter should be the fastest, although Intel chips throttle down when handling avx2 instructions. Or so I seem to recall.
Raphexon
Posts: 476
Joined: Sun Mar 17, 2019 12:00 pm
Full name: Henk Drost

Re: Stockfish NNUE for analysis of positions (Tabias)

Post by Raphexon »

zullil wrote: Mon Aug 10, 2020 3:52 am
Cornfed wrote: Mon Aug 10, 2020 3:35 am Popcount.

I've been running it(alone) on 2 core for 2 hrs now, no problem. Just happened when I ran it in tandem with the other for about 45 min.
Your CPU should be able to run the bmi2 and avx2 binaries. The latter should be the fastest, although Intel chips throttle down when handling avx2 instructions. Or so I seem to recall.
BMI2 is faster if you have a modern Intel.
AVX2 if you have a modern AMD because it has slow PEXT.

BMI2 will still use AVX2 instruction, just a few extra on top.
cma6
Posts: 219
Joined: Thu May 29, 2014 5:58 pm

SF and SF_NNUE analysis: which version to use?

Post by cma6 »

Raphexon:
Which of these would be best for a dual-Xeon system: Bmi2 ; AVX3 or SSSE?
Thanks, cma