this will be the merge of a lifetime : SF 80 Elo+

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

Moderators: Harvey Williamson, bob, hgm

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Paloma
Posts: 977
Joined: Thu Dec 25, 2008 8:07 pm

Re: this will be the merge of a lifetime : SF 80 Elo+

Post by Paloma » Sun Aug 09, 2020 12:11 am

carldaman wrote:
Sat Aug 08, 2020 8:57 pm
It defeats the purpose if the NNUE cannot always be set to active [as an option], because then you're at the mercy of the engine only using NNUE when it chooses. Hopefully the SF team will wake up to the fact that people also use the engine for analysis.
+1

schack
Posts: 154
Joined: Thu May 27, 2010 1:32 am
Contact:

Re: this will be the merge of a lifetime : SF 80 Elo+

Post by schack » Sun Aug 09, 2020 1:39 am

Ok. What's the trivial change to the source code?

[quote=Deberger post_id=855397 time=1596931848 user_id=12155]
[quote=carldaman post_id=855385 time=1596920236 user_id=6402]
It defeats the purpose if the NNUE cannot always be set to active [as an option], because then you're at the mercy of the engine only using NNUE when it chooses. Hopefully the SF team will wake up to the fact that people also use the engine for analysis.
[/quote]

With a trivial change to the source code, you can build your own executable which always uses NNUE.

However this change can never yield stronger analysis.

Over time, using "always NNUE" will be gradually weaker and weaker as the nets are optimized for their intended use in balanced positions.
[/quote]

User avatar
phhnguyen
Posts: 849
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: this will be the merge of a lifetime : SF 80 Elo+

Post by phhnguyen » Sun Aug 09, 2020 1:54 am

Leo wrote:
Sat Aug 08, 2020 1:44 am
What does NNUE stand for?
Reversion of Efficiently Updatable Neural Networks

https://www.chessprogramming.org/Stockfish_NNUE
https://banksiagui.com
A freeware chess GUI, based on opensource Banksia - the chess tournament manager

Leo
Posts: 969
Joined: Fri Sep 16, 2016 4:55 pm
Location: USA/Minnesota
Full name: Leo Anger

Re: this will be the merge of a lifetime : SF 80 Elo+

Post by Leo » Sun Aug 09, 2020 2:05 am

phhnguyen wrote:
Sun Aug 09, 2020 1:54 am
Leo wrote:
Sat Aug 08, 2020 1:44 am
What does NNUE stand for?
Reversion of Efficiently Updatable Neural Networks

https://www.chessprogramming.org/Stockfish_NNUE
Thanks.
Advanced Micro Devices fan.

User avatar
phhnguyen
Posts: 849
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: this will be the merge of a lifetime : SF 80 Elo+

Post by phhnguyen » Sun Aug 09, 2020 2:16 am

carldaman wrote:
Sat Aug 08, 2020 8:57 pm
It defeats the purpose if the NNUE cannot always be set to active [as an option], because then you're at the mercy of the engine only using NNUE when it chooses. Hopefully the SF team will wake up to the fact that people also use the engine for analysis.
Quote from @vondele at https://github.com/official-stockfish/S ... ssues/2938
Of course one can use an old binary as well.
I don't think this warrants a UCI option, like we don't have UCI options to disable null-move pruning, LayzEval classical, etc. I'm rather sure that we will have nets soon that won't work well without the hybrid option, i.e. are specifically constructed to benefit from the fact that classical eval is good enough for many positions. I think hybrid is a real opportunity.
Look like we won't have options to select between classic, NNUE, hybrid modes, at least for comming time.
https://banksiagui.com
A freeware chess GUI, based on opensource Banksia - the chess tournament manager

User avatar
Deberger
Posts: 70
Joined: Sat Nov 02, 2019 5:42 pm
Full name: ɹǝƃɹǝqǝᗡ ǝɔnɹꓭ

Re: this will be the merge of a lifetime : SF 80 Elo+

Post by Deberger » Sun Aug 09, 2020 2:20 am

schack wrote:
Sun Aug 09, 2020 1:39 am
Ok. What's the trivial change to the source code?
Deberger wrote:
Sun Aug 09, 2020 12:10 am
carldaman wrote:
Sat Aug 08, 2020 8:57 pm
It defeats the purpose if the NNUE cannot always be set to active [as an option], because then you're at the mercy of the engine only using NNUE when it chooses. Hopefully the SF team will wake up to the fact that people also use the engine for analysis.
With a trivial change to the source code, you can build your own executable which always uses NNUE.

However this change can never yield stronger analysis.

Over time, using "always NNUE" will be gradually weaker and weaker as the nets are optimized for their intended use in balanced positions.
src/evaluate.cpp:

Code: Select all

-  constexpr Value NNUEThreshold  =   Value(520);
+  constexpr Value NNUEThreshold  =   VALUE_INFINITE;

schack
Posts: 154
Joined: Thu May 27, 2010 1:32 am
Contact:

Re: this will be the merge of a lifetime : SF 80 Elo+

Post by schack » Sun Aug 09, 2020 2:26 am

Thank you!

zullil
Posts: 6442
Joined: Mon Jan 08, 2007 11:31 pm
Location: PA USA
Full name: Louis Zulli

Re: this will be the merge of a lifetime : SF 80 Elo+

Post by zullil » Sun Aug 09, 2020 9:48 am

Deberger wrote:
Sun Aug 09, 2020 12:10 am
carldaman wrote:
Sat Aug 08, 2020 8:57 pm
It defeats the purpose if the NNUE cannot always be set to active [as an option], because then you're at the mercy of the engine only using NNUE when it chooses. Hopefully the SF team will wake up to the fact that people also use the engine for analysis.
With a trivial change to the source code, you can build your own executable which always uses NNUE.

However this change can never yield stronger analysis.

Over time, using "always NNUE" will be gradually weaker and weaker as the nets are optimized for their intended use in balanced positions.
At the moment, the source code change is trivial. In any case, there is an nnue_always forked being maintained by Joerg Oster:

https://github.com/joergoster/Stockfish ... nue_always

zullil
Posts: 6442
Joined: Mon Jan 08, 2007 11:31 pm
Location: PA USA
Full name: Louis Zulli

Re: this will be the merge of a lifetime : SF 80 Elo+

Post by zullil » Sun Aug 09, 2020 11:05 am

Deberger wrote:
Sun Aug 09, 2020 12:10 am

However this change can never yield stronger analysis.
Doesn't this statement assume that the classical evaluation is at least as good as the NNUE evaluation in "unbalanced" positions? That is, for positions for which abs(eg_value(pos.psq_score())) is at least 520?

(Note that the criterion for Stockfish's using or not using NNUE evaluation is already rather inscrutable, and now incorporates various bonus/penalties based on placement of material.)

Also, Stockfish is developed to maximize self-play Elo at Fishtest time controls. It seem quite likely (to me) that under other conditions Stockfish would benefit more from greater use of NNUE.

Joerg Oster
Posts: 789
Joined: Fri Mar 10, 2006 3:29 pm
Location: Germany

Re: this will be the merge of a lifetime : SF 80 Elo+

Post by Joerg Oster » Sun Aug 09, 2020 11:20 am

zullil wrote:
Sun Aug 09, 2020 11:05 am
Deberger wrote:
Sun Aug 09, 2020 12:10 am

However this change can never yield stronger analysis.
Doesn't this statement assume that the classical evaluation is at least as good as the NNUE evaluation in "unbalanced" positions? That is, for positions for which abs(eg_value(pos.psq_score())) is at least 520?

(Note that the criterion for Stockfish's using or not using NNUE evaluation is already rather inscrutable, and now incorporates various bonus/penalties based on placement of material.)

Also, Stockfish is developed to maximize self-play Elo at Fishtest time controls. It seem quite likely (to me) that under other conditions Stockfish would benefit more from greater use of NNUE.
Agreed.

I'm quite puzzled what people already seem to know about this new technique.
Nobody really knows if the current network architecture is best for chess, nor the optimal training method.
We're still at the very beginning, imho.

It is especially in unbalanced positions where classic eval seems to lack some knowledge,
at least that was my impression from many examples given in the past.
Jörg Oster

Post Reply