pub struct Config(/* private fields */);Expand description
KataGo configuration as used in .cfg files, the
-override-config command line argument, and the
overrideSettings property of analysis requests.
let override_config = Config::new()
.with("maxVisits", 1000)
.with("reportAnalysisWinratesAs", "BLACK");Implementations§
Source§impl Config
impl Config
Sourcepub fn insert(
&mut self,
key: impl Into<String>,
value: impl Into<Value>,
) -> &mut Self
pub fn insert( &mut self, key: impl Into<String>, value: impl Into<Value>, ) -> &mut Self
Adds a configuration setting.
Sourcepub fn with(self, key: impl Into<String>, value: impl Into<Value>) -> Self
pub fn with(self, key: impl Into<String>, value: impl Into<Value>) -> Self
Adds a configuration setting and returns the new configuration.
Sourcepub fn to_command_line_arg(&self) -> Result<String, String>
pub fn to_command_line_arg(&self) -> Result<String, String>
Serializes the configuration to the format expected by the -override-config command line argument.
If a setting’s value cannot be serialized, returns an Err containing the key of the invalid setting.
Sourcepub fn with_analysis_pv_len(self, analysis_pv_len: usize) -> Self
pub fn with_analysis_pv_len(self, analysis_pv_len: usize) -> Self
Sets maximum length of the principal variation.
Sourcepub fn with_anti_mirror(self, anti_mirror: bool) -> Self
pub fn with_anti_mirror(self, anti_mirror: bool) -> Self
Sets whether to use anti-mirror play.
Sourcepub fn with_human_sl_profile(self, human_sl_profile: impl Into<String>) -> Self
pub fn with_human_sl_profile(self, human_sl_profile: impl Into<String>) -> Self
Sets the humanSL profile.
Sourcepub fn with_ignore_pre_root_history(self, ignore_pre_root_history: bool) -> Self
pub fn with_ignore_pre_root_history(self, ignore_pre_root_history: bool) -> Self
Sets whether to ignore the moves that led up to the position being analyzed.
Sourcepub fn with_max_time(self, max_time: f64) -> Self
pub fn with_max_time(self, max_time: f64) -> Self
Sets the maximum time per position.
Sourcepub fn with_max_visits(self, max_visits: u32) -> Self
pub fn with_max_visits(self, max_visits: u32) -> Self
Sets the maximum number of visits per position.
Sourcepub fn with_num_analysis_threads(self, num_analysis_threads: u32) -> Self
pub fn with_num_analysis_threads(self, num_analysis_threads: u32) -> Self
Sets the number of analysis threads.
Sourcepub fn with_num_search_threads_per_analysis_thread(
self,
num_search_threads: u32,
) -> Self
pub fn with_num_search_threads_per_analysis_thread( self, num_search_threads: u32, ) -> Self
Sets the number of search threads per analysis thread.
Sourcepub fn with_playout_doubling_advantage(
self,
playout_doubling_advantage: f64,
) -> Self
pub fn with_playout_doubling_advantage( self, playout_doubling_advantage: f64, ) -> Self
Sets the playout doubling advantage.
Sourcepub fn with_report_analysis_winrates_as(
self,
report_analysis_winrates_as: Side,
) -> Self
pub fn with_report_analysis_winrates_as( self, report_analysis_winrates_as: Side, ) -> Self
Reports winrates relative to the given side.
Sourcepub fn with_root_num_symmetries_to_sample(
self,
root_num_symmetries_to_sample: u8,
) -> Self
pub fn with_root_num_symmetries_to_sample( self, root_num_symmetries_to_sample: u8, ) -> Self
Sets the number of board symmetries to sample at the root of the search.
Sourcepub fn with_wide_root_noise(self, wide_root_noise: f64) -> Self
pub fn with_wide_root_noise(self, wide_root_noise: f64) -> Self
Sets the wide root noise.