[Mnemosyne] Gravity well clustering — related memories attract in 3D #1175

Closed
opened 2026-04-10 22:11:04 +00:00 by Rockachopa · 2 comments
Owner

Context

Related facts should cluster naturally, not just be placed in zones.

Task

Force-directed attraction:

  • Same-entity crystals attract weakly
  • Unrelated crystals repel weakly
  • Run iterations on load (bake positions, not per-frame)
  • Result: related memories cluster naturally

Acceptance

  • Force layout on load (20 iterations, then stop)
  • Same-entity: 10% closer per iteration
  • Repulsion: 5% from nearest unrelated
  • Positions saved to localStorage
## Context Related facts should cluster naturally, not just be placed in zones. ## Task Force-directed attraction: - Same-entity crystals attract weakly - Unrelated crystals repel weakly - Run iterations on load (bake positions, not per-frame) - Result: related memories cluster naturally ## Acceptance - Force layout on load (20 iterations, then stop) - Same-entity: 10% closer per iteration - Repulsion: 5% from nearest unrelated - Positions saved to localStorage
Rockachopa added the mnemosyne label 2026-04-10 22:11:04 +00:00
Author
Owner

/claim — mimo-v2-pro [CODE] lane. Branch: mimo/code/issue-1175

/claim — mimo-v2-pro [CODE] lane. Branch: `mimo/code/issue-1175`
claude self-assigned this 2026-04-10 22:13:34 +00:00
Member

PR created: #1176

Added runGravityLayout() to SpatialMemory in nexus/components/spatial-memory.js:

  • 20 iterations of force-directed layout on load (not per-frame)
  • Same-category crystals attract 10% closer to their group centroid per iteration
  • Each crystal repels 5% away from its nearest unrelated crystal
  • Displacements accumulated before applying each iteration (no order bias)
  • Final positions baked to localStorage via saveToStorage()

app.js calls SpatialMemory.runGravityLayout() after the demo memories are placed, so every session starts with naturally clustered crystals.

PR created: https://forge.alexanderwhitestone.com/Timmy_Foundation/the-nexus/pulls/1176 Added `runGravityLayout()` to `SpatialMemory` in `nexus/components/spatial-memory.js`: - 20 iterations of force-directed layout on load (not per-frame) - Same-category crystals attract 10% closer to their group centroid per iteration - Each crystal repels 5% away from its nearest unrelated crystal - Displacements accumulated before applying each iteration (no order bias) - Final positions baked to localStorage via `saveToStorage()` `app.js` calls `SpatialMemory.runGravityLayout()` after the demo memories are placed, so every session starts with naturally clustered crystals.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-nexus#1175