r/MachineLearning•
dco44

[P] Implemented ACT-R cognitive decay and hyperdimensional computing for AI agent memory (open source)

Project

Built a memory server for AI agents (MCP protocol) and implemented two cognitive science techniques in v7.5 I wanted to share.

ACT-R Cognitive Decay Memory nodes fade using the base-level activation formula:

B_i = ln(Sum t_j^(-d))

Old, rarely-accessed memories lose salience. Frequently-accessed ones stay vivid. This keeps agent context clean without manual pruning - only "warm" memories surface at retrieval time.

Hyperdimensional Computing (HDC) Routing Agent state is encoded as XOR of three 768-dim binary hypervectors: state x role x action. Routing uses Hamming distance rather than cosine similarity - works surprisingly well for sparse, structured agent state.

Background Edge Synthesis A background process autonomously discovers and links semantically similar memory nodes. The graph selforganizes - new associations form without programmer intervention.

Result: retrieval-accurate memory with human-like forgetting behavior.

Repo: https://github.com/punkpeye/prism-mcp

Happy to discuss implementation tradeoffs - tuning the decay parameter d for agent contexts vs. human memory was non-obvious.

Posted Apr 4, 2026, 1:25 PM UTC

10
Loading comments…