pub const DEFAULT_SHY_FACTOR: f64 = 0.78;
pub const DEFAULT_RECENT_RATIO: f64 = 0.7;
pub const DEFAULT_MAX_REPLAY: usize = 100;
pub const DEFAULT_CLS_THRESHOLD: u32 = 3;
pub const DEFAULT_LINKING_WINDOW_MS: i64 = 6 * 3600 * 1000;
pub const DEFAULT_LINKING_MAX_NEIGHBORS: usize = 20;
#[derive(Debug, Clone)]
pub struct ConsolidationParams {
pub shy_factor: f64,
pub recent_ratio: f64,
pub max_replay_items: usize,
pub cls_threshold: u32,
pub linking_window_ms: i64,
pub linking_max_neighbors: usize,
}
impl Default for ConsolidationParams {
fn default() -> Self {
Self {
shy_factor: DEFAULT_SHY_FACTOR,
recent_ratio: DEFAULT_RECENT_RATIO,
max_replay_items: DEFAULT_MAX_REPLAY,
cls_threshold: DEFAULT_CLS_THRESHOLD,
linking_window_ms: DEFAULT_LINKING_WINDOW_MS,
linking_max_neighbors: DEFAULT_LINKING_MAX_NEIGHBORS,
}
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ReplayStats {
pub episodes_replayed: usize,
pub entities_reactivated: usize,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct ClsStats {
pub episodes_processed: usize,
pub facts_created: usize,
pub facts_reinforced: usize,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct LinkingStats {
pub links_created: usize,
pub links_reinforced: usize,
}
#[derive(Debug, Clone)]
pub struct DreamCycleConfig {
pub shy: bool,
pub replay: bool,
pub cls: bool,
pub linking: bool,
pub dark_check: bool,
pub gc: bool,
}
impl Default for DreamCycleConfig {
fn default() -> Self {
Self {
shy: true,
replay: true,
cls: true,
linking: true,
dark_check: true,
gc: false, }
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DreamCycleStats {
pub entities_downscaled: usize,
pub replay: ReplayStats,
pub cls: ClsStats,
pub linking: LinkingStats,
pub dark_nodes_marked: usize,
pub gc_deleted: usize,
}