Obsidian ContemptOverrides

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

Moderator: Ras

peter
Posts: 3616
Joined: Sat Feb 16, 2008 7:38 am
Full name: Peter Martan

Obsidian ContemptOverrides

Post by peter »

Can anybody please tell me, how this feature works? Gemini says 3 numbers in plain text are to be set as values for opening, midgame and endgame, separated by spaces. No error message in console with e.g.

Code: Select all

setoption name ContemptOverrides value x y z
, neither with separation by ; nor by :
but no differences in output- eval (nor with command "eval") to be seen, differently to the effect of changes in other one Contempt- option to be set separately, e.g.

Code: Select all

setoption name Contempt value 100
Contempt updated to 100
gives confirmation in console and higher eval in output.
Thanks in advance, regards
Peter.
User avatar
Ajedrecista
Posts: 2249
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Obsidian ContemptOverrides

Post by Ajedrecista »

Hello Peter:

FWIW, I found five overrides (two of them ContemptOverrides) at src/ucioption.cpp:

Obsidian/src/ucioption.cpp at main · gab8192/Obsidian · GitHub

Code: Select all

[...]

void refreshContemptImpl() {
  [...]

  std::string overrides = Options["ContemptOverrides"];

  if (uciOppString.empty() || overrides.empty())
    return;

  [...]

  std::stringstream ss(overrides);

  [...]
}

[...]

void init() {

  [...]
  Options["ContemptOverrides"] = Option("", refreshContempt);
  [...]

}

[...]
I hope you will understand something... me not. Good luck with your request!

Regards from Spain.

Ajedrecista.
peter
Posts: 3616
Joined: Sat Feb 16, 2008 7:38 am
Full name: Peter Martan

Re: Obsidian ContemptOverrides

Post by peter »

Ajedrecista wrote: Wed Jun 10, 2026 7:31 pm I hope you will understand something... me not. Good luck with your request!
Thanks for the trial, Jesus, even if it's not much clearer to me now, as for the syntax of the command in console or GUI to set up the option of the already compiled binary, than it was before. Anyhow, Gemini, as told, didn't make it to commit to this one syntax neither, "reading" the source code too
🤝👋
Peter.
peter
Posts: 3616
Joined: Sat Feb 16, 2008 7:38 am
Full name: Peter Martan

Re: Obsidian ContemptOverrides

Post by peter »

Logged in at github, Copilot there tells me so:

Code: Select all

setoption name ContemptOverrides value white=24,black=0,analysis=0,off=0
was one example of a correct syntax.

Explanation of the names and values:
white=24 – Apply contempt of +24 when playing against an opponent named "white"
black=0 – Apply contempt of 0 when playing against an opponent named "black"
analysis=0 – Apply contempt of 0 when the opponent is "analysis"
off=0 – Apply contempt of 0 for any other opponent (the fallback/default case)
If none of these opponent names match the UCI_Opponent setting, the base Contempt option value is used instead of the overrides.
Max. values were the same as in Contempt- parameter (512), no negative values accepted, regards
Peter.