Skip to content

Commit

Permalink
WDLEvalObjectivity
Browse files Browse the repository at this point in the history
  • Loading branch information
rooklift committed May 30, 2024
1 parent 16b6491 commit 2cacd75
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
39 changes: 39 additions & 0 deletions files/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,16 @@ function startup() {
set_checks("Engine", "WDL Calibration Elo", msg.val === "0" ? "Use default WDL" : msg.val);
break;

case "wdlevalobjectivity":
if (msg.val === "1") {
set_checks("Engine", "WDL Eval Objectivity", "Yes");
} else if (msg.val === "0") {
set_checks("Engine", "WDL Eval Objectivity", "No");
} else {
set_checks("Engine", "WDL Eval Objectivity", msg.val);
}
break;

case "scoretype":
set_checks("Engine", "Score Type", msg.val);
break;
Expand Down Expand Up @@ -3664,6 +3674,35 @@ function menu_build() {
},
]
},
{
label: "WDL Eval Objectivity",
submenu: [
{
label: "Yes",
type: "checkbox",
checked: false,
click: () => {
win.webContents.send("call", {
fn: "set_uci_option_permanent",
args: ["WDLEvalObjectivity", 1]
});
// Will receive an ack IPC which sets menu checks.
}
},
{
label: "No",
type: "checkbox",
checked: false,
click: () => {
win.webContents.send("call", {
fn: "set_uci_option_permanent",
args: ["WDLEvalObjectivity", 0]
});
// Will receive an ack IPC which sets menu checks.
}
}
]
},
{
label: "Score Type",
submenu: [
Expand Down
1 change: 1 addition & 0 deletions files/src/renderer/10_globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ const standard_lc0_options = { // These are only sent if known by the engine.
"ContemptMode": "white_side_analysis",
"Contempt": 0,
"WDLCalibrationElo": 0,
"WDLEvalObjectivity": 0,
};

const forced_ab_options = {};
Expand Down
2 changes: 1 addition & 1 deletion files/src/renderer/90_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ We are in one of these states (currently implicit in the logic):
*/

const GUI_WANTS_TO_KNOW = ["Backend", "EvalFile", "WeightsFile", "SyzygyPath", "Threads", "Hash", "MultiPV",
"ContemptMode", "Contempt", "WDLCalibrationElo", "ScoreType", "Temperature", "TempDecayMoves"];
"ContemptMode", "Contempt", "WDLCalibrationElo", "WDLEvalObjectivity", "ScoreType", "Temperature", "TempDecayMoves"];

let NoSearch = Object.freeze({
node: null,
Expand Down

0 comments on commit 2cacd75

Please sign in to comment.