To analysis.sesse.net owner : disable contempt

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

Moderators: hgm, Rebel, chrisw

Vinvin
Posts: 5228
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

To analysis.sesse.net owner : disable contempt

Post by Vinvin »

Last game I followed on analysis.sesse.net, I saw that when it's white to play score is higher for white and it's black to play score is higher for black.
I suppose the reason is the contempt value is not set to 0. ( Note may be I'm wrong and up and down values were real ...)
That lead to a roller-coaster graph.
For analysis it's better to get a neutral value.
So please set contempt = 0 in parameters.

Thanks,
Vincent
syzygy
Posts: 5563
Joined: Tue Feb 28, 2012 11:56 pm

Re: To analysis.sesse.net owner : disable contempt

Post by syzygy »

This is why "Off" should be the default value of Analysis Contempt (and "Both" is simply useless).
Gian-Carlo Pascutto
Posts: 1243
Joined: Sat Dec 13, 2008 7:00 pm

Re: To analysis.sesse.net owner : disable contempt

Post by Gian-Carlo Pascutto »

But I guess it's hopeless to convince people to fix this for Stockfish 10?

It's very annoying because of course every application designed around Stockfish inevitably gets it wrong.
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: To analysis.sesse.net owner : disable contempt

Post by Dann Corbit »

Vinvin wrote: Sun Nov 18, 2018 12:20 pm Last game I followed on analysis.sesse.net, I saw that when it's white to play score is higher for white and it's black to play score is higher for black.
I suppose the reason is the contempt value is not set to 0. ( Note may be I'm wrong and up and down values were real ...)
That lead to a roller-coaster graph.
For analysis it's better to get a neutral value.
So please set contempt = 0 in parameters.

Thanks,
Vincent
I make special builds where I turn all contempt off, because I don't care if it makes it play stronger, I want the real analysis.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: To analysis.sesse.net owner : disable contempt

Post by Dann Corbit »

Here is the main change to alter contempt:

Code: Select all

                // Adjust contempt based on root move's previousScore (dynamic contempt)
                int dct;
                if (Options["Dynamic Contempt"] == false)
                {
                    dct = 0;
                    contempt = Score(0);
                }
                else
                {
                    dct = ct + 88 * previousScore / (abs(previousScore) + 200);
                    contempt = (us == WHITE ?  make_score(dct, dct / 2)
                                : -make_score(dct, dct / 2));
                }
Don't worry SF team, I never play it in contests. I only use it to analyze.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
schack
Posts: 172
Joined: Thu May 27, 2010 3:32 am

Re: To analysis.sesse.net owner : disable contempt

Post by schack »

Where do you insert this in the source files?
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: To analysis.sesse.net owner : disable contempt

Post by MikeB »

schack wrote: Tue Nov 20, 2018 6:24 am Where do you insert this in the source files?
look for this line in search.cpp

Code: Select all

// Adjust contempt based on root move's previousScore (dynamic contempt)
and then slide this in as Dann shows it in his post. You also need to to update ucioption.cpp

Code: Select all

 
 int dct;
 if (Options["Dynamic Contempt"] == false)
                {
                    dct = 0;
                    contempt = Score(0);
                }
                else
this will be in my feature set in the next release of McCain...
Image
schack
Posts: 172
Joined: Thu May 27, 2010 3:32 am

Re: To analysis.sesse.net owner : disable contempt

Post by schack »

What do I update in ucioptions?

I've just been setting contempt=0 and then compiling, but it would be good to have the option to remove the other contempt too.
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: To analysis.sesse.net owner : disable contempt

Post by Dann Corbit »

schack wrote: Tue Nov 20, 2018 6:24 am Where do you insert this in the source files?
Of course, if anyone asks, I should share the source code. Here is a link and there are 2 64 bit binaries in it.
https://drive.google.com/open?id=1Rmmi0 ... tQNfOjllJa

You should not use it for competitions like tournaments because the changes I have made are strictly for analysis and not for game play.

It also logs the analysis directly to disk and you may want to turn that off. I have a program that reads the disk log file and turns the data into stored procedure calls so that I can update my database. I do not think that data will be very useful for most people. Logging is a UCI option in my version.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
BeyondCritics
Posts: 396
Joined: Sat May 05, 2012 2:48 pm
Full name: Oliver Roese

Re: To analysis.sesse.net owner : disable contempt

Post by BeyondCritics »

Please can you explain, why setting "Contempt=Both" is so unbearable in analysis mode?
At the very least it relieves us from useless 3-fold repetitions in the pv, which were really a plague, as you might recall.