Did you know Contempt is back?

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

Moderators: hgm, Dann Corbit, Harvey Williamson

User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Did you know Contempt is back?

Post by Ovyron »

When NNUE was introduced several parameter tweaks of Stockfish only had effect when it used Classical eval, including Contempt, which was effectively killed because it was almost never used or didn't matter.

But did you know that recently it has been reintroduced and now affects NNUE evaluation?

Contempt is back as "Optimism", an idea originally conceived to make Stockfish avoid trivial draws and look for moves that made progress on the position all things being equal. However, it brought significant elo!

And this wasn't just elo against weaker opposition, since Optimism stockfish is playing better moves than without it, as if positive contempt was beating contempt 0.

So the new paradigm remains, because, again, if you analyze a position with white, and then with black, each side will like itself slightly better because of optimism. Each side will like to avoid draws because it's more optimistic about the position.

As I said before, a position has a white's eval and a black's eval and you better have analysis files for each side that can disagree about the backsolved eval on the position, because it depends what side you are and how optimistic you should be, otherwise optimism wouldn't work :)
Your beliefs create your reality, so be careful what you wish for.
User avatar
Ozymandias
Posts: 1529
Joined: Sun Oct 25, 2009 2:30 am

Re: Did you know Contempt is back?

Post by Ozymandias »

The change is from a couple of weeks ago, right?
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Did you know Contempt is back?

Post by Ovyron »

Ozymandias wrote: Sun May 29, 2022 1:41 pm The change is from a couple of weeks ago, right?
It was introduced since November 2021, since then it's been tweaked to have more and more effect, and engines like Swordfish make use of an increased optimism to play in a more stylistic fashion (more risky play... leading to more loses against default. Buy, hey, it's basically a "Style" knob and you can increase it significantly to have some crazy playing Stockfish with a strength higher than Stockfish 14.1 - and along with KingDanger as tweaked by Blue Marlin derivative, we have fun times!)

It would be trivially easy to allow tweaking of optimism on UCI options, then I'm sure people failing to get this would set it to 0 just to have same eval from both sides! :lol:
Your beliefs create your reality, so be careful what you wish for.
Uri Blass
Posts: 10100
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Did you know Contempt is back?

Post by Uri Blass »

I do not see a uci parameter of optimism in stockfish that I can change.
sarona
Posts: 107
Joined: Tue Oct 29, 2019 4:14 pm
Location: Canada
Full name: Ron Doughie

Re: Did you know Contempt is back?

Post by sarona »

Ozymandias wrote: Sun May 29, 2022 1:41 pm The change is from a couple of weeks ago, right?
I believe he is referring to this.

Author: Stéphane Nicolet
Date: Sun Nov 21 21:18:08 2021 +0100
Timestamp: 1637525888

Introduce Optimism

https://github.com/official-stockfish/S ... d32bb351c3
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Did you know Contempt is back?

Post by Ovyron »

Uri Blass wrote: Sun May 29, 2022 2:35 pm I do not see a uci parameter of optimism in stockfish that I can change.
You need to change it in the source code and compile it.
Your beliefs create your reality, so be careful what you wish for.
Werewolf
Posts: 1744
Joined: Thu Sep 18, 2008 10:24 pm

Re: Did you know Contempt is back?

Post by Werewolf »

Ovyron wrote: Mon May 30, 2022 2:20 am
Uri Blass wrote: Sun May 29, 2022 2:35 pm I do not see a uci parameter of optimism in stockfish that I can change.
You need to change it in the source code and compile it.
Isn't this a real pain for Aquarium users, or anyone using backsolving?
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Did you know Contempt is back?

Post by Ovyron »

Werewolf wrote: Sat Jun 18, 2022 5:05 pm Isn't this a real pain for Aquarium users, or anyone using backsolving?
Maybe I should release Chi-Chi NNUE, with the ability to tune Optimism and King Safety and modify the piece values from the UCI options. Last time it was a big disappointment as nobody did anything with it, though.
Your beliefs create your reality, so be careful what you wish for.
sarona
Posts: 107
Joined: Tue Oct 29, 2019 4:14 pm
Location: Canada
Full name: Ron Doughie

Re: Did you know Contempt is back?

Post by sarona »

Ovyron wrote: Mon Jun 20, 2022 6:38 am
Werewolf wrote: Sat Jun 18, 2022 5:05 pm Isn't this a real pain for Aquarium users, or anyone using backsolving?
Maybe I should release Chi-Chi NNUE, with the ability to tune Optimism and King Safety and modify the piece values from the UCI options. Last time it was a big disappointment as nobody did anything with it, though.
Please do, Uly.

I would be very interested in looking at your ideas. Was your previous release done on the Rybka Forum? Do not recall seeing it there.
User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: Did you know Contempt is back?

Post by Ovyron »

sarona wrote: Tue Jun 21, 2022 8:04 pm Please do, Uly.

I would be very interested in looking at your ideas. Was your previous release done on the Rybka Forum? Do not recall seeing it there.
Thanks sarona, it was released here at talkchess:

https://talkchess.com/forum3/viewtopic.php?f=2&t=74559

It was discontinued when NNUE appeared because these changes were only affecting classical eval which was almost never used, so it was pointless. Now that the changes happen after NNUE eval something can be worked out, and you can have all sorts of crazy engine personalities stronger than Stockfish 12 (which... may be nothing now, some things are just too little too late.)
Your beliefs create your reality, so be careful what you wish for.