NNUE Poll

Discussion of chess software programming and technical issues.

Moderator: Ras

How do you feel about using NNUE based evaluation in your engine?

I'm already using NNUE in my engine
14
27%
I'd like to adopt NNUE but I lack the time or knowledge to implement it
11
22%
I don't want to use 3rd party training data / trainers and it's too much work to do everything from scratch
1
2%
I don't want to turn my engine into "yet another" NNUE engine
8
16%
I don't want to introduce the interpretability and transparency issues of neural networks into my evaluation
0
No votes
I may use NNUE in the future but there are other ideas I want to explore first
17
33%
 
Total votes: 51

dangi12012
Posts: 1062
Joined: Tue Apr 28, 2020 10:03 pm
Full name: Daniel Infuehr

Re: NNUE Poll

Post by dangi12012 »

hgm wrote: Wed Apr 26, 2023 1:16 pm Making an NNUE evaluation is not really programming. It requires some rather trivial standard code for running the NN. There is no creativity there, I might as well write a program to calculate my tax returns. What is the fun in that? Basically you let the computer write its own engine, and the only contribution you make yourself is paying the electricity bill. In the end you will get something that might play strong chess, but you would still have no clue why or how it does this. So as a method of getting some understanding is is also a bust.
That statement is completely false. There is so much more to learn and optimize its unreal. Much more than writing handcrafted eval - because the weights will tell you what is important etc! you can even visualize layers etc. there even is a special bypass that is a piece square table in nnue etc..
I think many people dont see how but that the current architecture is the optimal and somehow set in stone is completely wrong.
Training is the boring excercise but everything else is just as beautiful as the rest of chessprogramming.

Image

I can say that with confidence since I implemented it binary compatible from current NNUEv5 from scratch in the past 2 weeks and all of non simd nnue fits inside 54 lines of code (excluding init but full correct eval() like printed in sf). The image above is more confusing than helping and there is so much more potential to it than the status quo. And performance wise Id rather not spoil the suprise :!:
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
rdhoffmann
Posts: 54
Joined: Fri Apr 21, 2023 3:46 pm
Full name: Richard Hoffmann

Re: NNUE Poll

Post by rdhoffmann »

hgm wrote: Wed Apr 26, 2023 1:16 pm Making an NNUE evaluation is not really programming. It requires some rather trivial standard code for running the NN. There is no creativity there, I might as well write a program to calculate my tax returns. What is the fun in that? Basically you let the computer write its own engine, and the only contribution you make yourself is paying the electricity bill. In the end you will get something that might play strong chess, but you would still have no clue why or how it does this. So as a method of getting some understanding is is also a bust.
Very true! I would argue though that HCE is also largely a neural net. For instance piece-square tables are precisely that, multiply-add each square/piece with some values that work to get an overall score. Hardly different from a single layer in a neural net :)
chrisw
Posts: 4624
Joined: Tue Apr 03, 2012 4:28 pm
Location: Midi-Pyrénées
Full name: Christopher Whittington

Re: NNUE Poll

Post by chrisw »

hgm wrote: Wed Apr 26, 2023 1:16 pm Making an NNUE evaluation is not really programming. It requires some rather trivial standard code for running the NN. There is no creativity there, I might as well write a program to calculate my tax returns. What is the fun in that? Basically you let the computer write its own engine, and the only contribution you make yourself is paying the electricity bill. In the end you will get something that might play strong chess, but you would still have no clue why or how it does this. So as a method of getting some understanding is is also a bust.
Says the guy without a NNUE.
dangi12012
Posts: 1062
Joined: Tue Apr 28, 2020 10:03 pm
Full name: Daniel Infuehr

Re: NNUE Poll

Post by dangi12012 »

rdhoffmann wrote: Wed Apr 26, 2023 4:54 pm
hgm wrote: Wed Apr 26, 2023 1:16 pm Making an NNUE evaluation is not really programming. It requires some rather trivial standard code for running the NN. There is no creativity there, I might as well write a program to calculate my tax returns. What is the fun in that? Basically you let the computer write its own engine, and the only contribution you make yourself is paying the electricity bill. In the end you will get something that might play strong chess, but you would still have no clue why or how it does this. So as a method of getting some understanding is is also a bust.
Very true! I would argue though that HCE is also largely a neural net. For instance piece-square tables are precisely that, multiply-add each square/piece with some values that work to get an overall score. Hardly different from a single layer in a neural net :)
Oh yeah thats the second point people tend to overlook. Piece square tables are mathematically literally identical to a 1 layer NN with a "linear" activationfun. Texel's Tuning Method is another word for gradient descent.

My point is that this topic is not the end but a very juicy startpoint and what proves my point is that a naive NN gets you literally nowhere. You need sophisticated architecture to find something that has to be optimal between computationally cheap and sophisticated evaluation.
Worlds-fastest-Bitboard-Chess-Movegenerator
Daniel Inführ - Software Developer
rdhoffmann
Posts: 54
Joined: Fri Apr 21, 2023 3:46 pm
Full name: Richard Hoffmann

Re: NNUE Poll

Post by rdhoffmann »

dangi12012 wrote: Wed Apr 26, 2023 4:52 pm I can say that with confidence since I implemented it binary compatible from current NNUEv5 from scratch in the past 2 weeks and all of non simd nnue fits inside 54 lines of code (excluding init but full correct eval() like printed in sf). The image above is more confusing than helping and there is so much more potential to it than the status quo. And performance wise Id rather not spoil the suprise :!:
It is also worth mentioning that even without the "efficient update" part, NNUE is perfectly usable.
User avatar
j.t.
Posts: 263
Joined: Wed Jun 16, 2021 2:08 am
Location: Berlin
Full name: Jost Triller

Re: NNUE Poll

Post by j.t. »

rdhoffmann wrote: Wed Apr 26, 2023 6:38 pm It is also worth mentioning that even without the "efficient update" part, NNUE is perfectly usable.
That depends on how good/fast your previous evaluation was. I experimented a little with neural networks as evaluation, but my (admittedly non-optimal) neural network implementation was probably better than my HCE, but just too slow.
rdhoffmann
Posts: 54
Joined: Fri Apr 21, 2023 3:46 pm
Full name: Richard Hoffmann

Re: NNUE Poll

Post by rdhoffmann »

j.t. wrote: Wed Apr 26, 2023 6:52 pm That depends on how good/fast your previous evaluation was. I experimented a little with neural networks as evaluation, but my (admittedly non-optimal) neural network implementation was probably better than my HCE, but just too slow.
Did you buffer the results in a small hash table? This seems to work for me, though I'm not sure whether the reason it works is simply that my engine does not search super-deep just yet.
User avatar
Rebel
Posts: 7299
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: NNUE Poll

Post by Rebel »

lithander wrote: Mon Apr 24, 2023 2:15 pm More and more engines are adopting NNUE based evaluation but I feel like in this forum the topic is underrepresented. I wonder why that is?

Are developers discussing NNUEs elsewhere? Or are the users here just not interested in NNUE? In that case I'd really like to hear your reasons. :)
Alright, let's do something (small) about that :D

Simple and fast binpack shuffler for NNUE developers.

---------

Now that I am here like to take the opportunity to mention that the rebel13.nl page will expire on June 23, hence the new one above. Story at - http://rebel13.nl/home/about.html
90% of coding is debugging, the other 10% is writing bugs.
chrisw
Posts: 4624
Joined: Tue Apr 03, 2012 4:28 pm
Location: Midi-Pyrénées
Full name: Christopher Whittington

Re: NNUE Poll

Post by chrisw »

Rebel wrote: Thu Apr 27, 2023 10:49 am
lithander wrote: Mon Apr 24, 2023 2:15 pm More and more engines are adopting NNUE based evaluation but I feel like in this forum the topic is underrepresented. I wonder why that is?

Are developers discussing NNUEs elsewhere? Or are the users here just not interested in NNUE? In that case I'd really like to hear your reasons. :)
Alright, let's do something (small) about that :D

Simple and fast binpack shuffler for NNUE developers.

---------

Now that I am here like to take the opportunity to mention that the rebel13.nl page will expire on June 23, hence the new one above. Story at - http://rebel13.nl/home/about.html
that shuffles bins, not binpacks. shuffling binpacks is problematical
Joost Buijs
Posts: 1632
Joined: Thu Jul 16, 2009 10:47 am
Location: Almere, The Netherlands

Re: NNUE Poll

Post by Joost Buijs »

hgm wrote: Wed Apr 26, 2023 1:16 pm Making an NNUE evaluation is not really programming. It requires some rather trivial standard code for running the NN. There is no creativity there, I might as well write a program to calculate my tax returns. What is the fun in that? Basically you let the computer write its own engine, and the only contribution you make yourself is paying the electricity bill. In the end you will get something that might play strong chess, but you would still have no clue why or how it does this. So as a method of getting some understanding is is also a bust.
If it is all so simple, why couldn't you get something trivial like this to work than? https://talkchess.com/forum3/viewtopic.php?f=7&t=76465
Maybe it is not so simple as you think it is. In the end all that matters is playing strength, nobody cares if it's been done with HCE, NNUE or whatever.