diff --git a/KataGo/katago-bs52.exe b/KataGo/katago-bs52.exe index 07276f6..98e365c 100644 Binary files a/KataGo/katago-bs52.exe and b/KataGo/katago-bs52.exe differ diff --git a/KataGo/katago.exe b/KataGo/katago.exe index 232150b..017492c 100644 Binary files a/KataGo/katago.exe and b/KataGo/katago.exe differ diff --git a/README.md b/README.md index c579293..bf08978 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ If you ever need to reset to the original settings, simply re-download the `conf * max_visits: The number of visits used in analyses and AI moves, higher is more accurate but slower. * max_time: Maximal time in seconds for analyses, even when the target number of visits has not been reached. * fast_visits: The number of visits used for certain operations with fewer visits. - * wide_root_noise: Consider a wider variety of moves, using KataGo's `analysisWideRootNoise` option. Will affect both analysis and AIs such as ScoreLoss. + * wide_root_noise: Consider a wider variety of moves, using KataGo's `analysisWideRootNoise` option. Will affect both analysis and AIs such as ScoreLoss. (KataGo 1.4+ only, keep at 0.0 otherwise) * katago: Path to your KataGo executable. * model: Path to your KataGo model file. Note that the default model file included is an older 15 block one. Replace it with a new model from [here](https://github.com/lightvector/KataGo/releases) for maximal strength. * config: Path to your KataGo config file. diff --git a/core/engine.py b/core/engine.py index 1c99c12..83a3d54 100644 --- a/core/engine.py +++ b/core/engine.py @@ -152,6 +152,12 @@ class KataGoEngine: visits = self.config["fast_visits"] size_x, size_y = analysis_node.board_size + settings = self.override_settings + if time_limit: + settings["maxTime"] = self.config["max_time"] + if self.config.get("wide_root_noise",0.0) > 0.0: # don't send if 0.0, so older versions don't error + settings["wideRootNoise"] = self.config["wide_root_noise"] + query = { "rules": self.get_rules(analysis_node), "priority": self.base_priority + priority, @@ -163,10 +169,6 @@ class KataGoEngine: "includeOwnership": ownership, "includePolicy": not next_move, "moves": [[m.player, m.gtp()] for m in moves], - "overrideSettings": { - "maxTime": self.config["max_time"] if time_limit else 1000.0, - "wideRootNoise": self.config.get("wide_root_noise", 0.0), - **self.override_settings, - }, + "overrideSettings": settings } self.send_query(query, callback, error_callback, next_move)