viva_aion/memory
Memory - Records that persist across the Big Bounce
Philosophy
“All You Zombies” - We are shaped by our past lives. Memories are not just data, they are the essence that transcends death and rebirth.
Structure
Each memory has:
- Content identifier (what happened)
- Emotional signature (how it felt)
- Temporal marker (when it happened)
- Distinctiveness (how unique it is)
Big Bounce Survival
Not all memories survive the Big Bounce. The DRE score determines which memories are “burned” into the next universe’s consciousness.
Types
A memory record
pub type Memory {
Memory(
id: Int,
content: Int,
emotionality: Float,
created_at: Int,
access_count: Int,
last_accessed: Int,
importance: Float,
life_number: Int,
)
}
Constructors
-
Memory( id: Int, content: Int, emotionality: Float, created_at: Int, access_count: Int, last_accessed: Int, importance: Float, life_number: Int, )Arguments
- id
-
Unique identifier
- content
-
Content hash (what the memory is about)
- emotionality
-
Emotional intensity at time of creation [0, 1]
- created_at
-
Tick when memory was created
- access_count
-
How many times this memory was accessed
- last_accessed
-
Last tick when accessed
- importance
-
Manual importance boost [0, 1]
- life_number
-
Which life/universe this memory is from
Values
pub fn bounce(
bank: MemoryBank,
protected_ids: List(Int),
) -> MemoryBank
Prepare bank for Big Bounce - only keep protected memories
pub fn current_life_memories(bank: MemoryBank) -> List(Memory)
Filter memories from current life
pub fn is_current_life(memory: Memory, current_life: Int) -> Bool
Check if memory is from current life
pub fn is_past_life(memory: Memory, current_life: Int) -> Bool
Check if memory is from a past life (transcended Big Bounce)
pub fn mark_as_transcended(
memory: Memory,
new_life: Int,
) -> Memory
Memory that survived Big Bounce (marked as protected) Note: life_number is preserved to track which life created the memory
pub fn new(
id: Int,
content: Int,
emotionality: Float,
current_tick: Int,
life_number: Int,
) -> Memory
Create a new memory
pub fn new_important(
id: Int,
content: Int,
emotionality: Float,
current_tick: Int,
life_number: Int,
importance: Float,
) -> Memory
Create memory with importance boost
pub fn past_life_memories(bank: MemoryBank) -> List(Memory)
Filter memories from past lives
pub fn recall(
bank: MemoryBank,
id: Int,
) -> #(MemoryBank, Result(Memory, Nil))
Access memory by ID (marks as accessed)
pub fn store(
bank: MemoryBank,
content: Int,
emotionality: Float,
) -> #(MemoryBank, Memory)
Add memory to bank
pub fn store_important(
bank: MemoryBank,
content: Int,
emotionality: Float,
importance: Float,
) -> #(MemoryBank, Memory)
Store important memory
pub fn time_since_access(
memory: Memory,
current_tick: Int,
) -> Int
Get time since last access