Stockfish dynamic contempt

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

Moderators: hgm, Rebel, chrisw

schack
Posts: 172
Joined: Thu May 27, 2010 3:32 am

Stockfish dynamic contempt

Post by schack »

Is it always from White's perspective when in analysis mode?

I do wish the Stockfish mods would make it so that no contempt at all is used when the engine is in analysis mode.
User avatar
Eelco de Groot
Posts: 4567
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: Stockfish dynamic contempt

Post by Eelco de Groot »

No, as far as I know, but I have not followed the dynamic contempt discussion much lately, it is from the side to move at the root, like in Stockfish 9. But it is now growing larger if the score so far is larger and that is new. You can set contempt to 0 but the dynamic factor, based on 'bestValue', is hardcoded and can't be switched off. https://github.com/official-stockfish/S ... 12530d0b7a

I have not tried this I must say. And it is not tested (yet) by Stefan Pohl against a lot of other engines, or by Ingo. Then again this is not an official Stockfish release either, but if users don't find anything very wrong it will likely enter TCEC. To leave users some time there is now a "code freeze", I forgot where I read that and can't find the comment back at the moment.

The dynamic contempt did pass [0, 5] SPRT over the normal contempt which is a plus, normal contempt was only not regressing, passing [-3.00, 1.00] against master Stockfish.
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
Jouni
Posts: 3291
Joined: Wed Mar 08, 2006 8:15 pm

Re: Stockfish dynamic contempt

Post by Jouni »

Can SF simply display evaluation always without contempt? So it's used only "internally".
Jouni
User avatar
Eelco de Groot
Posts: 4567
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: Stockfish dynamic contempt

Post by Eelco de Groot »

It is not sure you (as in you, the user) would notice the difference, unless you would go as far as Chessbase by using chess notation symbols with intervals. What would be the point of showing evaluations that are not real and not what is used by the engine. You would learn nothing from it. It would be far worse and treated like obfuscation.

But people think that the scores are biased in some way which should not be the case now, if contempt set to zero. The question is if that helps analysis quality or not.
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
BeyondCritics
Posts: 396
Joined: Sat May 05, 2012 2:48 pm
Full name: Oliver Roese

Re: Stockfish dynamic contempt

Post by BeyondCritics »

schack wrote:Is it always from White's perspective when in analysis mode?

I do wish the Stockfish mods would make it so that no contempt at all is used when the engine is in analysis mode.
Stockfish 9 was indeed unfortunately shipped with a default value for Contempt, that makes it unusable for us serious chess workers (https://github.com/official-stockfish/S ... on.cpp#L62). A non zero contempt value makes only sense for match play and this is all what counts in head to head engine competition nowadays. And since they have no user documentation, no outsider really knows about that. Another caveat: If you set a contempt value outside the allowed window [-100,100] it is silently ignored (https://github.com/official-stockfish/S ... n.cpp#L152), which again is not what we need, since most likely you get the unusable default again. I think they should clip the desired values.

Nevertheless, all that you have to do, i think, is to set Contempt=0 and enjoy a very strong engine.

I have tested stockfish 9, to analyze my new KID repertoire and was very pleased to feel the strength and determination of the new stockfish. A big "thank you" to the developers for their hard work anyway.
A serious alternative is Cfish (https://github.com/syzygy1/Cfish/releases), the excellent port of stockfish to C from Ronald de Man, since it got faster and more user friendly. Usually it has the latest advancements of stockfish in a few days.
And don't forget asmfish (https://github.com/lantonov/asmFish), it is faster too.