pub struct MentalStimulation {
pub activity_history: Vec<ActivityRecord>,
pub engagement_level: f32,
pub decay_rate: f32,
pub last_activity_ms: u64,
pub stimulation_need: f32,
pub novelty_threshold: f32,
}Fields§
§activity_history: Vec<ActivityRecord>§engagement_level: f32§decay_rate: f32§last_activity_ms: u64§stimulation_need: f32§novelty_threshold: f32Implementations§
Source§impl MentalStimulation
impl MentalStimulation
pub fn new() -> Self
Sourcepub fn record_activity(&mut self, activity_type: &str, intensity: f32)
pub fn record_activity(&mut self, activity_type: &str, intensity: f32)
Record activity (recall, learning, etc.)
Sourcepub fn apply_decay(&mut self, current_ms: u64)
pub fn apply_decay(&mut self, current_ms: u64)
Apply engagement decay over time
Sourcepub fn needs_stimulation(&mut self) -> bool
pub fn needs_stimulation(&mut self) -> bool
Check if system needs stimulation (novelty seeking)
Sourcepub fn get_stimulation_activities(&self) -> Vec<&'static str>
pub fn get_stimulation_activities(&self) -> Vec<&'static str>
Get recommended stimulation activities
Sourcepub fn activity_diversity(&self) -> f32
pub fn activity_diversity(&self) -> f32
Get activity diversity (prevents repetitive patterns)
pub fn save(&self, dir: &Path) -> Result<(), String>
pub fn load(dir: &Path) -> Result<Self, String>
pub fn load_or_init(dir: &Path) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MentalStimulation
impl RefUnwindSafe for MentalStimulation
impl Send for MentalStimulation
impl Sync for MentalStimulation
impl Unpin for MentalStimulation
impl UnsafeUnpin for MentalStimulation
impl UnwindSafe for MentalStimulation
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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