pub struct StrategyTracker { /* private fields */ }Expand description
Tracker that learns which strategy changes improve confidence.
Implementations§
Source§impl StrategyTracker
impl StrategyTracker
Sourcepub fn begin_strategy(
&self,
name: &str,
description: &str,
current_confidence: f64,
) -> StrategyHandle
pub fn begin_strategy( &self, name: &str, description: &str, current_confidence: f64, ) -> StrategyHandle
Begin tracking a strategy. Returns a handle for complete_strategy.
Sourcepub fn complete_strategy(&mut self, handle: StrategyHandle, new_confidence: f64)
pub fn complete_strategy(&mut self, handle: StrategyHandle, new_confidence: f64)
Complete a strategy and record its outcome.
Sourcepub fn most_effective(&self, top_n: usize) -> Vec<&StrategyOutcome>
pub fn most_effective(&self, top_n: usize) -> Vec<&StrategyOutcome>
Get the most effective strategies, sorted by delta descending.
Sourcepub fn harmful_strategies(&self) -> Vec<&StrategyOutcome>
pub fn harmful_strategies(&self) -> Vec<&StrategyOutcome>
Get strategies that hurt confidence (negative delta).
Sourcepub fn recommend(&self) -> Option<String>
pub fn recommend(&self) -> Option<String>
Recommend next strategy based on past effectiveness.
Returns the name of the most effective beneficial strategy,
or None if no beneficial strategies have been recorded.
Sourcepub fn outcomes(&self) -> &[StrategyOutcome]
pub fn outcomes(&self) -> &[StrategyOutcome]
All recorded outcomes.
Auto Trait Implementations§
impl Freeze for StrategyTracker
impl RefUnwindSafe for StrategyTracker
impl Send for StrategyTracker
impl Sync for StrategyTracker
impl Unpin for StrategyTracker
impl UnsafeUnpin for StrategyTracker
impl UnwindSafe for StrategyTracker
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> 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