Engines that have a hybrid evaluation
Moderator: Ras
-
Madeleine Birchfield
- Posts: 512
- Joined: Tue Sep 29, 2020 4:29 pm
- Location: Dublin, Ireland
- Full name: Madeleine Birchfield
Engines that have a hybrid evaluation
What engines use both neural networks and handcrafted features in their evaluation function? Examples I could think of are Stockfish, Winter, Fizbo, and Wasp.
-
AndrewGrant
- Posts: 1964
- Joined: Tue Apr 19, 2016 6:08 am
- Location: U.S.A
- Full name: Andrew Grant
Re: Engines that have a hybrid evaluation
Ethereal's HCE contains a neural network dedicated to Pawns+Kings.
-
Madeleine Birchfield
- Posts: 512
- Joined: Tue Sep 29, 2020 4:29 pm
- Location: Dublin, Ireland
- Full name: Madeleine Birchfield
Re: Engines that have a hybrid evaluation
But the dev version of Ethereal currently only uses neural networks, right?AndrewGrant wrote: ↑Fri Dec 10, 2021 9:32 pm Ethereal's HCE contains a neural network dedicated to Pawns+Kings.
-
AndrewGrant
- Posts: 1964
- Joined: Tue Apr 19, 2016 6:08 am
- Location: U.S.A
- Full name: Andrew Grant
Re: Engines that have a hybrid evaluation
No; Dev version either uses the NNUE, or the HCE+PawnKing-NN.Madeleine Birchfield wrote: ↑Fri Dec 10, 2021 9:44 pmBut the dev version of Ethereal currently only uses neural networks, right?AndrewGrant wrote: ↑Fri Dec 10, 2021 9:32 pm Ethereal's HCE contains a neural network dedicated to Pawns+Kings.
-
jdart
- Posts: 4420
- Joined: Fri Mar 10, 2006 5:23 am
- Location: http://www.arasanchess.org
Re: Engines that have a hybrid evaluation
Arasan switches between NNUE and classical eval depending on the position, as Stockfish does (not with the same logic, however).
-
Branko Radovanovic
- Posts: 89
- Joined: Sat Sep 13, 2014 4:12 pm
- Location: Zagreb, Croatia
- Full name: Branko Radovanović
Re: Engines that have a hybrid evaluation
There is a nice overview here: https://wiki.chessdom.org/Engines_and_authors (it's perhaps not 100% up to date, e.g. Wasp last competed as a classical engine, but has gone NNUE since)Madeleine Birchfield wrote: ↑Fri Dec 10, 2021 8:46 pm What engines use both neural networks and handcrafted features in their evaluation function? Examples I could think of are Stockfish, Winter, Fizbo, and Wasp.
-
jstanback
- Posts: 140
- Joined: Fri Jun 17, 2016 4:14 pm
- Location: Colorado, USA
- Full name: John Stanback
Re: Engines that have a hybrid evaluation
FYI, Wasp 5.0 uses a NN, but it is not the NNUE architecture.
-
jtwright
- Posts: 48
- Joined: Wed Sep 22, 2021 9:20 pm
- Full name: Jeremy Wright
Re: Engines that have a hybrid evaluation
Andrew, if you have a moment, I was curious about this. IIRC from the Ethereal github the condition for switching to HCE is:
- being in check, or
- > 400 cp of imbalance in the PSQT (using EG values)
How often does the second condition seem to come up and how much does it make an impact? From glancing at the PSQTs, it seems like there would have to be *significantly* more pieces on one side than the other, which I would often expect to be a crushing endgame anyway.
I'm curious if anyone else can weigh in on this as well.
- being in check, or
- > 400 cp of imbalance in the PSQT (using EG values)
How often does the second condition seem to come up and how much does it make an impact? From glancing at the PSQTs, it seems like there would have to be *significantly* more pieces on one side than the other, which I would often expect to be a crushing endgame anyway.
I'm curious if anyone else can weigh in on this as well.
Mantissa: https://github.com/jtheardw/mantissa
-
AndrewGrant
- Posts: 1964
- Joined: Tue Apr 19, 2016 6:08 am
- Location: U.S.A
- Full name: Andrew Grant
Re: Engines that have a hybrid evaluation
Perfect example for you:jtwright wrote: ↑Sat Dec 11, 2021 9:54 pm Andrew, if you have a moment, I was curious about this. IIRC from the Ethereal github the condition for switching to HCE is:
- being in check, or
- > 400 cp of imbalance in the PSQT (using EG values)
How often does the second condition seem to come up and how much does it make an impact? From glancing at the PSQTs, it seems like there would have to be *significantly* more pieces on one side than the other, which I would often expect to be a crushing endgame anyway.
I'm curious if anyone else can weigh in on this as well.
Recently I took my training set which generated the current best net, and made a copy that excluded positions such that 400cp material imbalance occurred. No positions in the dataset were incheck. Results: 1,846,808,245 => 1,466,369,570 positions.
400cp could be a single Knight. Realistic during the game? No. During the search tree? Yes. Although its worth noting that I once measured deleting the entire evaluation, thousands of lines, only lost like 3 points of elo. It is not clear to me the value of the HCE, aside from some sanity when dealing with extreme positions.
-
jtwright
- Posts: 48
- Joined: Wed Sep 22, 2021 9:20 pm
- Full name: Jeremy Wright
Re: Engines that have a hybrid evaluation
Thanks for the explanation. I should have paid a bit more attention and realized it was `psqtmat`, not just `psqt`. Being more than 400 cp in material + PSQT is significantly more common. Also, always good to keep in mind that many positions unlikely to come up in an actual game will still be seen very often in the search tree.AndrewGrant wrote: ↑Sat Dec 11, 2021 10:38 pm Perfect example for you:
Recently I took my training set which generated the current best net, and made a copy that excluded positions such that 400cp material imbalance occurred. No positions in the dataset were incheck. Results: 1,846,808,245 => 1,466,369,570 positions.
400cp could be a single Knight. Realistic during the game? No. During the search tree? Yes. Although its worth noting that I once measured deleting the entire evaluation, thousands of lines, only lost like 3 points of elo. It is not clear to me the value of the HCE, aside from some sanity when dealing with extreme positions.
Interesting that the difference in elo is so small between hybrid and NNUE only in Ethereal. I've been debating the value of a hybrid approach myself for the future so this knowledge is very valuable. Thanks.
Mantissa: https://github.com/jtheardw/mantissa