pub struct StrategyMemory { /* private fields */ }Expand description
Data structure representing strategy memory.
Implementations§
Source§impl StrategyMemory
impl StrategyMemory
Sourcepub fn absorb(&mut self, traj: &Trajectory)
pub fn absorb(&mut self, traj: &Trajectory)
Performs absorb for this type.
Sourcepub fn absorb_reward(&mut self, action: &str, reward: f64)
pub fn absorb_reward(&mut self, action: &str, reward: f64)
Performs absorb reward for this type.
Sourcepub fn set_weight(&mut self, name: &str, weight: f64) -> bool
pub fn set_weight(&mut self, name: &str, weight: f64) -> bool
Operator / integrator nudge: set weight for an existing strategy. Returns false if the name is unknown.
Sourcepub fn decay_idle(&mut self, idle_threshold: u32, factor: f64)
pub fn decay_idle(&mut self, idle_threshold: u32, factor: f64)
Slowly decay weights of strategies that have been idle for a while.
Sourcepub fn stats(&self, idle_threshold: u32) -> StrategyStats
pub fn stats(&self, idle_threshold: u32) -> StrategyStats
Performs stats for this type.
Trait Implementations§
Source§impl Debug for StrategyMemory
impl Debug for StrategyMemory
Auto Trait Implementations§
impl Forget for StrategyMemory
impl Freeze for StrategyMemory
impl Move for StrategyMemory
impl RefUnwindSafe for StrategyMemory
impl Send for StrategyMemory
impl Sync for StrategyMemory
impl Unpin for StrategyMemory
impl UnsafeUnpin for StrategyMemorywhere
*const LeafNode<String, Strategy> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, Strategy)>>: UnsafeUnpin,
impl UnwindSafe for StrategyMemory
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