pub struct DefaultStateUpdater {
pub alpha: f32,
}Expand description
Default ARIA state updater.
Skill update: performance = success × (0.5 + 0.5 × (1 - effort)) skill = skill + alpha × (performance - skill)
Optimism update: success + effort < 0.4 → optimism += 0.02 (easy win → push harder) !success → optimism -= 0.01 (failure → ease back) otherwise → unchanged always clamped to [OPTIMISM_FLOOR, OPTIMISM_CEIL]
resolved_set: item added if success == true
Fields§
§alpha: f32Learning rate for skill update. Default 0.05.
Implementations§
Trait Implementations§
Source§impl Default for DefaultStateUpdater
impl Default for DefaultStateUpdater
Source§impl StateUpdater for DefaultStateUpdater
impl StateUpdater for DefaultStateUpdater
Source§fn update(
&self,
state: &ProfileState,
item: &dyn Scoreable,
signal: &Signal,
now: u64,
) -> ProfileState
fn update( &self, state: &ProfileState, item: &dyn Scoreable, signal: &Signal, now: u64, ) -> ProfileState
Produce a new ProfileState given current state, the item interacted with,
the signal reported, and the current timestamp. Read more
Auto Trait Implementations§
impl Freeze for DefaultStateUpdater
impl RefUnwindSafe for DefaultStateUpdater
impl Send for DefaultStateUpdater
impl Sync for DefaultStateUpdater
impl Unpin for DefaultStateUpdater
impl UnsafeUnpin for DefaultStateUpdater
impl UnwindSafe for DefaultStateUpdater
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