pub struct SelectionPerformance {
pub strategy_stats: HashMap<String, StrategyStats>,
pub switch_history: Vec<StrategySwitchEvent>,
pub current_strategy: Option<String>,
pub strategy_start_visits: u32,
pub strategy_start_success_rate: f64,
}Expand description
Selection 戦略効果測定(Meta-learning)
Fields§
§strategy_stats: HashMap<String, StrategyStats>戦略ごとの統計
switch_history: Vec<StrategySwitchEvent>戦略切り替え履歴
current_strategy: Option<String>現在の戦略
strategy_start_visits: u32現在の戦略開始時の visits
strategy_start_success_rate: f64現在の戦略開始時の success_rate
Implementations§
Source§impl SelectionPerformance
impl SelectionPerformance
Sourcepub fn start_strategy(
&mut self,
strategy: &str,
current_visits: u32,
current_success_rate: f64,
)
pub fn start_strategy( &mut self, strategy: &str, current_visits: u32, current_success_rate: f64, )
戦略を記録開始
Sourcepub fn record_action(&mut self, success: bool)
pub fn record_action(&mut self, success: bool)
アクション結果を記録
Sourcepub fn record_episode_end(&mut self, success: bool)
pub fn record_episode_end(&mut self, success: bool)
エピソード終了を記録
Sourcepub fn strategy_effectiveness(&self, strategy: &str) -> Option<f64>
pub fn strategy_effectiveness(&self, strategy: &str) -> Option<f64>
戦略の効果を取得
Sourcepub fn best_strategy(&self) -> Option<(&str, f64)>
pub fn best_strategy(&self) -> Option<(&str, f64)>
最も効果的な戦略を取得
Sourcepub fn recommended_strategy(&self, failure_rate: f64, visits: u32) -> &str
pub fn recommended_strategy(&self, failure_rate: f64, visits: u32) -> &str
状況に応じた推奨戦略を取得
Trait Implementations§
Source§impl Clone for SelectionPerformance
impl Clone for SelectionPerformance
Source§fn clone(&self) -> SelectionPerformance
fn clone(&self) -> SelectionPerformance
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SelectionPerformance
impl Debug for SelectionPerformance
Source§impl Default for SelectionPerformance
impl Default for SelectionPerformance
Source§fn default() -> SelectionPerformance
fn default() -> SelectionPerformance
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SelectionPerformance
impl<'de> Deserialize<'de> for SelectionPerformance
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SelectionPerformance
impl RefUnwindSafe for SelectionPerformance
impl Send for SelectionPerformance
impl Sync for SelectionPerformance
impl Unpin for SelectionPerformance
impl UnwindSafe for SelectionPerformance
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more