Make Optimism into a UCI option?

276 views
Skip to first unread message

Laoshi Ma

unread,
Mar 22, 2022, 4:48:25 AMMar 22
to FishCooking
If I have it right, then some time ago, contempt/optimism was re-introduced into the
NNUE versions of Stockfish. However, while in the HCE versions one had detailed control
over contempt/drawscore, in the present version of SF, optimism isn't just enabled by
default, but always. While this may benefit the practical playing strength, it is a distinct
disadvantage for analysis, since the eval of a variation can jump up and down
drastically for no reason on the board--purely depending on whether the line ends in a
leaf node with either White or Black to move.

I just saw that Windfishballad has made an SF fork with Optimism disabled (along with
TB modifications), but wouldn't it be more convenient to give the user control through a
UCI option? It's completely fine to have Optimism enabled by default (as it was with the
old Contempt), but analysis isn't really a marginal application, and there a neutral eval
is much better.

Thanks if someone who knows his way around the code could implement this!

Aram Tumanian

unread,
Aug 22, 2022, 7:09:53 AMAug 22
to FishCooking
I'm also concerted about this issue.
The concept of optimism breaks the expectation that the evaluation of a position should be a function of only the current position. How is the score of a root move from previous iterations related to the evaluation of every position in the search tree? Could someone explain how the concept of optimism works?
Was it demonstrated to provide a significant elo gain? I currently see that at the initial pull request the patch failed the STC test and barely passed the LTC.
Probably we can do some tests trying to replace the optimism with a better tuned scaling. Or at the least understand how to works and why.
I used to work with the Stockfish code some time ago and can implement changes if I have time.

вівторок, 22 березня 2022 р. о 10:48:25 UTC+2 Laoshi Ma пише:

Aram Tumanian

unread,
Aug 22, 2022, 8:41:50 AMAug 22
to FishCooking
If the optimism makes Stockfish significantly stronger (around more than 3 elo) then adding a UCI option to control this behaviour is a sound idea. If the elo gain is insignificant, then we should remove the optimism entirely.
If we decide adding an option, I suggest 3 choices:
  • turn on for playing, off for analysis (default)
  • turn on
  • turn off
And understanding how it works (if it does) is our goal.

вівторок, 22 березня 2022 р. о 10:48:25 UTC+2 Laoshi Ma пише:
If I have it right, then some time ago, contempt/optimism was re-introduced into the

Aram Tumanian

unread,
Aug 24, 2022, 11:50:48 AMAug 24
to FishCooking
I have presented the issue on GitHub.

вівторок, 22 березня 2022 р. о 10:48:25 UTC+2 Laoshi Ma пише:
If I have it right, then some time ago, contempt/optimism was re-introduced into the
Reply all
Reply to author
Forward
0 new messages