pub struct LearnedDreamCycle { /* private fields */ }Expand description
Learned dream cycle — selects dream phases based on historical effectiveness.
Instead of running all 12 phases in fixed order, the learned dream cycle uses historical effectiveness data to:
- Prioritize phases that have been most useful
- Skip phases with consistently low effectiveness
- Adapt the phase order based on current memory state
Implementations§
Source§impl LearnedDreamCycle
impl LearnedDreamCycle
Sourcepub fn with_config(
min_effectiveness: f32,
min_runs: u64,
learning_enabled: bool,
) -> Self
pub fn with_config( min_effectiveness: f32, min_runs: u64, learning_enabled: bool, ) -> Self
Create with custom settings.
Sourcepub fn record_phase(
&mut self,
phase_idx: u8,
useful: bool,
improvement: f32,
duration_ms: u64,
)
pub fn record_phase( &mut self, phase_idx: u8, useful: bool, improvement: f32, duration_ms: u64, )
Record a phase execution result.
Sourcepub fn phase_order(&self) -> &[u8] ⓘ
pub fn phase_order(&self) -> &[u8] ⓘ
Get the learned phase order (phases sorted by effectiveness, descending).
Sourcepub fn phases_to_run(&self) -> Vec<u8> ⓘ
pub fn phases_to_run(&self) -> Vec<u8> ⓘ
Get the phases to run (filtering out ineffective ones).
Sourcepub fn effectiveness(&self, phase_idx: u8) -> Option<&PhaseEffectiveness>
pub fn effectiveness(&self, phase_idx: u8) -> Option<&PhaseEffectiveness>
Get effectiveness data for a phase.
Trait Implementations§
Source§impl Clone for LearnedDreamCycle
impl Clone for LearnedDreamCycle
Source§impl Debug for LearnedDreamCycle
impl Debug for LearnedDreamCycle
Source§impl Default for LearnedDreamCycle
impl Default for LearnedDreamCycle
Source§impl<'de> Deserialize<'de> for LearnedDreamCycle
impl<'de> Deserialize<'de> for LearnedDreamCycle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LearnedDreamCycle
impl RefUnwindSafe for LearnedDreamCycle
impl Send for LearnedDreamCycle
impl Sync for LearnedDreamCycle
impl Unpin for LearnedDreamCycle
impl UnsafeUnpin for LearnedDreamCycle
impl UnwindSafe for LearnedDreamCycle
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