Skip to content

Commit

Permalink
config.fast_first_report => firstReportDuringSearchAfter
Browse files Browse the repository at this point in the history
  • Loading branch information
rooklift committed Jan 8, 2023
1 parent d7b5a12 commit 4bd3521
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,14 @@ function menu_build() {
},
]
},
{
label: translate("MENU_FAST_FIRST_REPORT"),
type: "checkbox",
checked: config.fast_first_report,
click: () => {
win.webContents.send("toggle", "fast_first_report");
}
},
]
},

Expand Down
1 change: 1 addition & 0 deletions src/modules/config_io.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ exports.defaults = {

"zobrist_checks": true,
"snappy_node_switch": true,
"fast_first_report": true,

"enable_hw_accel": false,
"logfile": null,
Expand Down
4 changes: 2 additions & 2 deletions src/modules/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function new_engine() {
eng.exe = null;

eng.received_version = false; // Indicates that KataGo has really started responding to commands.
eng.version = [99, 99, 99]; // Gets updated to something like [1, 9, 0]. Starts high to assume features are present if version not known.
eng.version = [1, 0, 0]; // Gets updated to something like [1, 9, 0].
eng.tuning_in_progress = false;

eng.filepath = "";
Expand Down Expand Up @@ -84,7 +84,7 @@ let engine_prototype = {

ipcRenderer.send("set_check_true", [translate("MENU_ANALYSIS"), translate("MENU_GO_HALT_TOGGLE")]);

let query = new_query(node);
let query = new_query(node, this.version);

if (this.desired) {
if (compare_queries(this.desired, query)) {
Expand Down
1 change: 1 addition & 0 deletions src/modules/hub_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const multichecks = {
};

const togglechecks = {
fast_first_report: [translate("MENU_SETUP"), translate("MENU_FAST_FIRST_REPORT")],
ownership_per_move: [translate("MENU_ANALYSIS"), translate("MENU_PER_MOVE")],
coordinates: [translate("MENU_DISPLAY"), translate("MENU_COORDINATES")],
black_pov: [translate("MENU_DISPLAY"), translate("MENU_BLACK_POV_ALWAYS")],
Expand Down
10 changes: 8 additions & 2 deletions src/modules/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const {node_id_from_search_id, compare_versions} = require("./utils");

let next_query_id = 1;

function new_query(query_node) {
function new_query(query_node, eng_version = null) {

// Every key that's used at all should be in 100% of the queries, even for default values.

Expand All @@ -35,12 +35,18 @@ function new_query(query_node) {
includeOwnership: (want_ownership) ? true : false,
includeMovesOwnership: (want_ownership && config.ownership_per_move) ? true : false,

overrideSettings: { // Before KataGo 1.9.1, it would generate an error for unknown fields in the settings.
overrideSettings: { // Before KataGo 1.9.1, it would generate an error for unknown fields in this part (only).
reportAnalysisWinratesAs: "BLACK", // If we add new features here, we will need to delete them if version < 1.9.1...
wideRootNoise: config.wide_root_noise,
}
};

if (config.fast_first_report) {
if (eng_version && compare_versions(eng_version, [1,12,0]) >= 0) {
o.firstReportDuringSearchAfter = 0.05;
}
}

// -----------------------------------------------------------------------------------------------------------------------------------------------
// Whatever else we do, we make sure that KataGo will analyse from the POV of (query_node.get_board().active).

Expand Down
1 change: 1 addition & 0 deletions src/modules/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ translations[`English`] = {
MENU_CLEAR_CACHE: `Clear cache`,
MENU_RESTART: `Restart`,
MENU_ENGINE_REPORT_RATE: `Engine report rate`,
MENU_FAST_FIRST_REPORT: `Fast first report`, // Uses KataGo's firstReportDuringSearchAfter setting.

MENU_TREE: `Tree`,

Expand Down

0 comments on commit 4bd3521

Please sign in to comment.