Stockfish removes classical evaluation

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

Moderator: Ras

User avatar
Marek Soszynski
Posts: 586
Joined: Wed May 10, 2006 7:28 pm
Location: Birmingham, England

Stockfish removes classical evaluation

Post by Marek Soszynski »

Now that the development version of Stockfish has removed classical evaluation (11th July) what does unticking Use NNUE do?
Marek Soszynski
User avatar
Eelco de Groot
Posts: 4669
Joined: Sun Mar 12, 2006 2:40 am
Full name:   Eelco de Groot

Re: Stockfish removes classical evaluation

Post by Eelco de Groot »

Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
User avatar
Marek Soszynski
Posts: 586
Joined: Wed May 10, 2006 7:28 pm
Location: Birmingham, England

Re: Stockfish removes classical evaluation

Post by Marek Soszynski »

Eelco de Groot wrote: Fri Jul 14, 2023 10:21 am Option does not exist anymore :)

https://github.com/official-stockfish/S ... 44a9ae9f04
Thanks. What happened was that my GUI remembered the old options.

uci at the command line shows what is actually available, and as you say Use NNUE is no longer there.
Marek Soszynski
Eduard
Posts: 1439
Joined: Sat Oct 27, 2018 12:58 am
Location: Germany
Full name: N.N.

Re: Stockfish removes classical evaluation

Post by Eduard »

The engines below are identical in search. I have modified the source code of my Engine Clone 2 with the latest Stockfish code (Remove Classical Evaluation). Clone 1 runs with the old eval. In my position test, the new NNUE evaluation is clearly better! Here is an example, but other positions are solved earlier.

Image
2r2r1k/qb3p1p/p2p1Np1/np1Pp1P1/2P5/3RP2P/5R2/4Q1K1 w - - 0 1

Analysis by My SF Clone 1 (Classical+NNUE Evaluation):

1.Qxa5 Rxc4 2.Kg2 Rfc8 3.e4 Rc2 4.Rxc2 Rxc2+ 5.Rd2 Rxd2+ 6.Qxd2 Qb6 7.Qe2 b4 8.Qf3 Qc7 9.Ne8 Qc2+ 10.Kf1 Qc1+ 11.Ke2 Qf4 12.Qxf4 exf4 13.Nxd6 b3 14.Nc4 Kg7 15.Kf3 f5 16.Kxf4 a5 17.d6 Bc8 18.exf5 Bxf5 19.Ke5 Bxh3 20.Kd5 Bd7 21.Kc5 a4 22.Na3 Kf7 23.Kb6
-+ (-2.85 --) Depth: 24/50 00:00:38 234MN, tb=1521
Black has a decisive advantage

Analysis by SF Clone 2 (New NNUE Evaluation):

1.Rf4 h5 2.Qh4 Rxc4 3.Rxc4 Rc8 4.Rxc8+ Bxc8 5.Kh2 Nc4 6.e4 b4 7.Rf3 Nd2 8.Rd3 Nf1+ 9.Kh1 a5 10.Nxh5 gxh5 11.Qxh5+ Kg7 12.Qh6+ Kg8 13.Qf6 Ne3 14.Qd8+ Kg7 15.Qf6+ Kg8
= (0.00) Depth: 24/31 00:00:03 18141kN, tb=6
The position is equal
Eduard
Posts: 1439
Joined: Sat Oct 27, 2018 12:58 am
Location: Germany
Full name: N.N.

Re: Stockfish removes classical evaluation

Post by Eduard »

Another example (Ryzen 2700):
[fen]r4rk1/1b4pp/4pq2/PB2n3/3N1Pn1/1PN3K1/1B2Q1P1/R4R2 b - - 0 1[/fen]


Analysis by My SF Clone 1:

1...Qh6 2.Qxe5 Nxe5 3.Nce2 Qg6+ 4.Kf2 Ng4+ 5.Ke1 Ne3 6.a6 Nxf1 7.axb7 Rxa1+ 8.Bxa1 Qb1+ 9.Kf2 Qxa1 10.Bd7 Nd2 11.Ke3 Qa7 12.Bxe6+ Kh8 13.Kxd2 Qxb7 14.g3 Re8 15.f5 Qe4 16.b4 g6 17.b5 gxf5
-+ (-4.57) Depth: 30/58 00:01:04 357MN, tb=225343
Black is clearly winning

Analysis by My SF Clone 2:

1...Qh6 2.Qxe5 Nxe5 3.Nce2 g5 4.Rh1 gxf4+ 5.Kf2 Qg5 6.Nf3 Ng4+ 7.Kg1 Bxf3 8.Bc4 Rae8 9.Nd4 Ne3 10.Bxe6+ Rxe6 11.Rh2 Rg6 12.Nxf3 Qg3
-+ (-5.74) Depth: 22/34 00:00:04 19707kN, tb=2288
Black is clearly winning
amchess
Posts: 364
Joined: Tue Dec 05, 2017 2:42 pm

Re: Stockfish removes classical evaluation

Post by amchess »

It's a very bad idea of the community: removal of the classical evaluation function.
It is indeed true that it is less strong than nnue, but, in reference to a human being,
-it is definitely, better
-is exploitable to adapt it to his level of play, since its elements are mappable to those found in traditional strategy books.
Basically, comparing classic Stockfish with nnue, you can see how far a human being can go and where the "inhuman" takes over.
Now, this genius makes that impossible.
This shows that the community members only care about pure game power, moreover, essentially, at ultra-rapid times.
This is of no help to the OTB player, indeed detrimental.
nnue evaluation function is a blackbox.
As such, you can't act on it: you can think of it as a linear combination of thousands of factors and relative weights both unknown.
In contrast, the classical evaluation function, certainly less strong, but better than any human being, has a dozen that can be mapped exactly to the thinking system of a human being.
Thus, such factors can be turned on or off as needed.
What we do and will continue to do with ShashChess with a REAL HANDICAP MODE simulating a human player.
What sense does it make for a human being to play the moves of an entity that often violates the strategic principles it already knows? Instead, the comparison with the classical evaluation function allows him to penetrate the meanders of nnue.
So instead the computer speaks Arabic even for Carlsen.
Research is meaningless unless it makes people's lives better: pure hypertrophic ego.
Now, the evaluation function is not at all dependent on the classical evaluation function.
Up to there, I'm all for it, but why remove it as an additional option?
The current stockfish handicap mode is ridiculous: random errors the more frequent the lower the elo.
Instead, a real handicap mode should simulate the thinking system of a certain elo range, which is impossible now for Stockfish.
Andrea
Rowen
Posts: 105
Joined: Tue Nov 15, 2016 1:19 pm
Location: Cheshire, England

Re: Stockfish removes classical evaluation

Post by Rowen »

amchess wrote: Sat Jul 15, 2023 9:33 am It's a very bad idea of the community: removal of the classical evaluation function.
It is indeed true that it is less strong than nnue, but, in reference to a human being,
-it is definitely, better
-is exploitable to adapt it to his level of play, since its elements are mappable to those found in traditional strategy books.
Basically, comparing classic Stockfish with nnue, you can see how far a human being can go and where the "inhuman" takes over.
Now, this genius makes that impossible.
This shows that the community members only care about pure game power, moreover, essentially, at ultra-rapid times.
This is of no help to the OTB player, indeed detrimental.
nnue evaluation function is a blackbox.
As such, you can't act on it: you can think of it as a linear combination of thousands of factors and relative weights both unknown.
In contrast, the classical evaluation function, certainly less strong, but better than any human being, has a dozen that can be mapped exactly to the thinking system of a human being.
Thus, such factors can be turned on or off as needed.
What we do and will continue to do with ShashChess with a REAL HANDICAP MODE simulating a human player.
What sense does it make for a human being to play the moves of an entity that often violates the strategic principles it already knows? Instead, the comparison with the classical evaluation function allows him to penetrate the meanders of nnue.
So instead the computer speaks Arabic even for Carlsen.
Research is meaningless unless it makes people's lives better: pure hypertrophic ego.
Now, the evaluation function is not at all dependent on the classical evaluation function.
Up to there, I'm all for it, but why remove it as an additional option?
The current stockfish handicap mode is ridiculous: random errors the more frequent the lower the elo.
Instead, a real handicap mode should simulate the thinking system of a certain elo range, which is impossible now for Stockfish.
Andrea
It is fun to change parameters, think of chessmaster, Rodent etc,. When analysing, one can use engines such as Stockfish, but if playing against, engines with changeable parameters such as Rodent are much better, I FInd the older 'classical evaluation ' engines much more 'fun', Perhaps the question is why we use an engine. To play against, Analysis? Concerning Stockfish Ive noticed how even on low handicapped levels it is quite strong, Probably too strong for beginners?
amchess
Posts: 364
Joined: Tue Dec 05, 2017 2:42 pm

Re: Stockfish removes classical evaluation

Post by amchess »

The problem is that it's not a true handicap mode because it's random. It doesn't really simulate the thought process of a flesh-and-blood player. This is possible with the classical evaluation function by turning on or off various positional factors that are known. Alternatively, there are projects like MAIA that train networks on games played by humans, but it is much more time-consuming...
Eduard
Posts: 1439
Joined: Sat Oct 27, 2018 12:58 am
Location: Germany
Full name: N.N.

Re: Stockfish removes classical evaluation

Post by Eduard »

Hello Andrea,
it would be very nice if you could develop a new Brainlearn/ShashChess that you can activate the Classic+NNUE option next to the new standard. But only if you really have time.
amchess
Posts: 364
Joined: Tue Dec 05, 2017 2:42 pm

Re: Stockfish removes classical evaluation

Post by amchess »

Eduard wrote: Sat Jul 15, 2023 12:42 pm Hello Andrea,
it would be very nice if you could develop a new Brainlearn/ShashChess that you can activate the Classic+NNUE option next to the new standard. But only if you really have time.
It is very simple.
Brainlearn and ShashChess will have, by selecting them,
-pure nnue (not hybrid) approach exactly like Stockfish
-classical approach only for human players eager to play against a "handicapped" opponent at their level, based on the current ShashChess handicap mode and also useful to compare with the nnue one, to try to penetrate the mysteries of the "black box" neural network, i.e., ultimately understand more about chess.
Andrea