LearningSystem

Trait LearningSystem 

Source
pub trait LearningSystem: Send + Sync {
    // Required methods
    fn select_strategy<'life0, 'life1, 'async_trait>(
        &'life0 self,
        context: &'life1 LearningContext,
    ) -> Pin<Box<dyn Future<Output = StrategyChoice> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn update<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 mut self,
        context: &'life1 LearningContext,
        choice: &'life2 StrategyChoice,
        outcome: &'life3 Outcome,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn metrics<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = LearningMetrics> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Learning system trait for adaptive behavior

Required Methods§

Source

fn select_strategy<'life0, 'life1, 'async_trait>( &'life0 self, context: &'life1 LearningContext, ) -> Pin<Box<dyn Future<Output = StrategyChoice> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Select optimal strategy based on context

Source

fn update<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, context: &'life1 LearningContext, choice: &'life2 StrategyChoice, outcome: &'life3 Outcome, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Update learning model with outcome

Source

fn metrics<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = LearningMetrics> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get current model performance metrics

Implementors§