Are hybrid approaches stronger than pure nnue?

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

Moderators: hgm, Rebel, chrisw

dkappe
Posts: 1631
Joined: Tue Aug 21, 2018 7:52 pm
Full name: Dietrich Kappe

Re: Are hybrid approaches stronger than pure nnue?

Post by dkappe »

yurikvelo wrote: Fri Jul 09, 2021 6:02 pm
Madeleine Birchfield wrote: Thu Jul 08, 2021 8:06 pm many of them stripping away their handcrafted evaluation completely
forum3/viewtopic.php?f=2&t=77571
Yes. He’s simplifying it for use in hybrid, not eliminating it. You don’t need a super complicated HCE when you’re up a rook or more. Simplify and pocket the 20-40 elo you get from the extra nps.
Fat Titz by Stockfish, the engine with the bodaciously big net. Remember: size matters. If you want to learn more about this engine just google for "Fat Titz".
Madeleine Birchfield
Posts: 512
Joined: Tue Sep 29, 2020 4:29 pm
Location: Dublin, Ireland
Full name: Madeleine Birchfield

Re: Are hybrid approaches stronger than pure nnue?

Post by Madeleine Birchfield »

dkappe wrote: Thu Jul 08, 2021 8:17 pm Which ones use pure NNUE? Dark Toga uses hybrid at 500 cp. Igel uses hybrid. I find it hard to believe that anyone uses pure nnue, as even a primitive psqt eval hybrid gains elo, especially outside the PV.
Seer and Pedone/Revenge are two examples of engines that only use pure nnue.
User avatar
pedrox
Posts: 1056
Joined: Fri Mar 10, 2006 6:07 am
Location: Basque Country (Spain)

Re: Are hybrid approaches stronger than pure nnue?

Post by pedrox »

dkappe wrote: Thu Jul 08, 2021 8:17 pm
Madeleine Birchfield wrote: Thu Jul 08, 2021 8:06 pm Shortly after nnue was merged into the official Stockfish project, one of the first patches to pass was to use Stockfish's handcrafted evaluation instead of nnue for positions that are above a certain evaluation (5.00 was the original threshold). An year has passed, and that patch has still not been simplified away. Instead, the Stockfish developers have found new ways to switch between its handcrafted evaluation function and its neural network, such as in bishop vs pawns endgames, in fortress detection, and in frc960 positions, all better than using purely nnue only.

However, almost all other engines using nnue only use nnue, with many of them stripping away their handcrafted evaluation completely from their engine, or only making the handcrafted evaluation available through a uci option, using it only to train new neural networks. Neural networks have their weak points and there are positions where a hybrid approach would be better than only using nnue, and a hybrid approach is more unique than the current situation with people copying stockfish's architecture and inference code.
Which ones use pure NNUE? Dark Toga uses hybrid at 500 cp. Igel uses hybrid. I find it hard to believe that anyone uses pure nnue, as even a primitive psqt eval hybrid gains elo, especially outside the PV.
My DanaSah engine is now using only pure nnue. The nnue evaluation using 64 bit and avx2 is as fast as my classic evaluation and much better, so in my case I don't see that I can win using a hybrid evaluation.

Another different thing is if lazy eval can give Elo, in my classic evaluation using only material and a margin that adapts automatically comparing the total evaluation and lazy my engine gains speed and about 20-30 points. It remains for me to check if this can be done with nnue, but in this case if it works I don't think I could call this as a hybrid evaluation.
dkappe
Posts: 1631
Joined: Tue Aug 21, 2018 7:52 pm
Full name: Dietrich Kappe

Re: Are hybrid approaches stronger than pure nnue?

Post by dkappe »

Madeleine Birchfield wrote: Fri Jul 09, 2021 6:21 pm elo, especially outside the PV.
Seer and Pedone/Revenge are two examples of engines that only use pure nnue.
There are a handful, but most engines using nnue today do so alongside their HCE. It’s a free 20-40 elo.
Fat Titz by Stockfish, the engine with the bodaciously big net. Remember: size matters. If you want to learn more about this engine just google for "Fat Titz".
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: Are hybrid approaches stronger than pure nnue?

Post by Michel »

dkappe wrote: Fri Jul 09, 2021 7:19 pm
Madeleine Birchfield wrote: Fri Jul 09, 2021 6:21 pm elo, especially outside the PV.
Seer and Pedone/Revenge are two examples of engines that only use pure nnue.
There are a handful, but most engines using nnue today do so alongside their HCE. It’s a free 20-40 elo.
What?? In Stockfish it is 1-2 Elo

https://tests.stockfishchess.org/html/l ... cc50282f04
Ideas=science. Simplification=engineering.
Without ideas there is nothing to simplify.
dkappe
Posts: 1631
Joined: Tue Aug 21, 2018 7:52 pm
Full name: Dietrich Kappe

Re: Are hybrid approaches stronger than pure nnue?

Post by dkappe »

Michel wrote: Fri Jul 09, 2021 7:39 pm
dkappe wrote: Fri Jul 09, 2021 7:19 pm
Madeleine Birchfield wrote: Fri Jul 09, 2021 6:21 pm elo, especially outside the PV.
Seer and Pedone/Revenge are two examples of engines that only use pure nnue.
There are a handful, but most engines using nnue today do so alongside their HCE. It’s a free 20-40 elo.
What?? In Stockfish it is 1-2 Elo

https://tests.stockfishchess.org/html/l ... cc50282f04
Depends on how fast your hce is.
Fat Titz by Stockfish, the engine with the bodaciously big net. Remember: size matters. If you want to learn more about this engine just google for "Fat Titz".