Hippocampus Module
Memory Encoding, Consolidation, and Retrieval System
Overview
The Hippocampus module is Chapp-E's memory allocator and indexer, responsible for transferring important working memory slots to long-term storage (DAG-FS) and managing memory consolidation during sleep. It acts as the bridge between working memory (short-term, volatile) and long-term memory (persistent, distributed).
Functions
1. Memory Encoding
Purpose: Transfer important working memory slots to long-term storage (DAG-FS).
Key Functions
hippocampus_mark_for_encoding()- Marks a working memory slot as "important" and queues it for encodinghippocampus_encode_slot()- Encodes a working memory slot into DAG-FS as a patternhippocampus_process_pending()- Processes all pending encodings in the queue
How It Works
- Working memory slot is marked as "important" (high priority, or explicitly marked)
- Slot is queued for encoding (added to pending list)
- During idle or sleep, hippocampus reads slot contents
- Creates DAG-FS pattern with contextual tags
- Stores pattern as distributed weight configuration
- Pattern becomes part of long-term memory
2. Memory Consolidation
Purpose: Strengthen and stabilize memories during sleep via replay and pruning.
Key Functions
hippocampus_consolidate()- Consolidates memories during SLEEP state
How It Works (Planned)
- During SLEEP state, consciousness system triggers consolidation
- Process any pending encodings first
- Replay recent patterns to strengthen them (forward pass)
- Update neural network weights (Hebbian learning)
- Prune weak patterns via glymphatic system
- Clear weight snapshots for deleted patterns
3. Memory Retrieval
Purpose: Retrieve memories from DAG-FS using associative tags and load them into working memory.
Key Functions
hippocampus_retrieve()- Retrieves a memory from DAG-FS using tagshippocampus_load_to_working_memory()- Loads a retrieved memory into a working memory slot
How It Works
- Receive tag query (contextual cues)
- Use DAG-FS tag search to find matching pattern
- Reconstruct pattern via forward pass (pattern completion)
- Load reconstructed data into working memory slot
- Strengthen pattern (reconsolidation - access makes it stronger)
Memory Layout
| Address | Size | Purpose |
|---|---|---|
0x202200 |
1 byte | Hippocampus state (IDLE, ENCODING, CONSOLIDATING) |
0x202201 |
64 bytes | Encoding buffer (temporary storage for slot data) |
0x202241 |
1 byte | Number of pending encodings (0-8) |
0x202242 |
8 bytes | Pending encoding list (slot IDs to encode) |
Total: 73 bytes (0x202200 - 0x20224A)
Integration with Other Systems
Working Memory Integration
- Encoding: Reads slots from working memory (0x200000+)
- Retrieval: Writes retrieved memories back to working memory slots
- Priority-Based: High-priority slots are more likely to be encoded
DAG-FS Integration
- Storage: Creates patterns in DAG-FS (0x300000+)
- Retrieval: Uses DAG-FS tag search and pattern completion
- Consolidation: Updates pattern strengths and prunes weak patterns
Consciousness System Integration
- SLEEP State: Triggers consolidation process
- AWAKE State: Normal encoding and retrieval
- State Transitions: Hippocampus responds to consciousness state changes
Neuromodulator System Integration (Planned)
- Dopamine: Influences encoding strength (reward → stronger memories)
- Acetylcholine: Affects consolidation quality
- Cortisol: Can interfere with encoding (stress → weaker memories)
Memory Transfer Loop
The hippocampus completes the memory transfer loop:
| Stage | System | Status |
|---|---|---|
| Encoding | Working Memory → Hippocampus → DAG-FS | ✅ Implemented |
| Consolidation | Sleep replay → Weight updates → Pattern strengthening | 🚧 Partial (pending encodings only) |
| Retrieval | Tag query → DAG-FS → Pattern completion → Working Memory | ✅ Implemented |
| Reconsolidation | Access → Pattern strengthening → Weight updates | ✅ Implemented (DAG-FS access strengthens) |
Shell Commands
The hippocampus module is accessible via shell commands:
| Command | Usage | Description | Status |
|---|---|---|---|
hippocampus |
hippocampus |
Display hippocampus state (IDLE, ENCODING, CONSOLIDATING) | ✅ Implemented |
encode |
encode <slot> <tags> |
Encode working memory slot to DAG-FS with tags | 🚧 Partial |
consolidate |
consolidate |
Trigger memory consolidation (process pending encodings) | ✅ Implemented |
retrieve |
retrieve <tag> |
Retrieve memory from DAG-FS by tag | 🚧 Partial |
See Also: Command Reference for complete command documentation.
Future Development
Planned Features
- 🚧 Pattern Replay: During SLEEP, replay recent patterns to strengthen them
- 🚧 Weight Updates: Hebbian learning during consolidation
- 🚧 Glymphatic Pruning: Integration with glymphatic system to prune weak patterns
- 🚧 Tag Storage: Store tag pointers with pending encodings
- 🚧 Excitability Biasing: Bias allocation to high-activity neural units
- 🚧 Sparse Engrams: Create sparse memory traces (not all neurons participate)
The Vision
When complete, the hippocampus will enable Chapp-E to:
- Remember past interactions and experiences
- Learn permanently from interactions
- Recognize patterns across time ("I've seen this before")
- Have a persistent "personality" shaped by history
- Self-manage memory resources (allocate, consolidate, prune)
This is the bridge between moment-to-moment awareness (working memory) and persistent identity (long-term memory).