Expand description
Mathematical engine for memory consolidation and recall probability calculations.
This module implements the exact formulas for memory consolidation based on cognitive science research, including the forgetting curve and consolidation strength updates. All calculations are optimized for performance with batch processing capabilities and strict mathematical accuracy requirements.
§Formulas Implemented
§Forgetting Curve
p(t) = [1 - exp(-r * e^(-t/gn))] / (1 - e^(-1))Where:
- p(t) = recall probability at time t
- r = decay rate (based on access patterns)
- t = time since last access (normalized)
- gn = consolidation strength
§Consolidation Strength Update
gn = gn-1 + (1 - e^(-t)) / (1 + e^(-t))Where:
- gn = new consolidation strength
- gn-1 = previous consolidation strength
- t = recall interval (hours)
§Performance Requirements
- <10ms per memory calculation
- Mathematical accuracy within 0.001 tolerance
- Batch processing for multiple memories
- Edge case handling for new/never-accessed memories
Modules§
- benchmarks
- Performance benchmarking utilities
- constants
- Mathematical constants and default values
Structs§
- Batch
Processing Result - Result of batch processing operation
- Consolidation
Update Result - Result of consolidation strength update
- Math
Engine - Main mathematical engine for memory consolidation calculations
- Math
Engine Config - Configuration for mathematical calculations
- Memory
Parameters - Memory parameters for mathematical calculations
- Recall
Calculation Result - Result of recall probability calculation
Enums§
- Math
Engine Error - Errors that can occur during mathematical calculations