LearnNewsExamplesServices
Frontmatter
id8668
titleImplement Cluster Physics & Mutable Topology
stateClosed
labels
enhancementaiperformance
assigneestobiu
createdAtJan 15, 2026, 3:11 AM
updatedAtJan 15, 2026, 3:19 AM
githubUrlhttps://github.com/neomjs/neo/issues/8668
authortobiu
commentsCount1
parentIssue8661
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 15, 2026, 3:19 AM

Implement Cluster Physics & Mutable Topology

Closed v11.22.0 enhancementaiperformance
tobiu
tobiu commented on Jan 15, 2026, 3:11 AM

Objective

Transform the HomeCanvas from a simple random distribution into a hierarchical cluster-based topology to support the "Neural Swarm" visualization.

Tasks

  1. Golden Spiral Initialization: Replace Math.random() with a Golden Spiral algorithm for initNodes to ensure instant, uniform screen coverage.
  2. Cluster Logic: Define PARENT nodes (Cluster Centers) and CHILD nodes.
  3. Physics Engine Update:
    • Implement "Cohesion" (Child nodes stick to Parents).
    • Implement "Separation" (Nodes don't overlap).
    • Implement "Drift" (Whole clusters move slowly).

Technical Details

  • Update STRIDE in HomeCanvas.mjs to include parentId or clusterId.
  • Ensure Zero-Allocation (write to buffers).
tobiu assigned to @tobiu on Jan 15, 2026, 3:11 AM
tobiu added the enhancement label on Jan 15, 2026, 3:12 AM
tobiu added the ai label on Jan 15, 2026, 3:12 AM
tobiu added the performance label on Jan 15, 2026, 3:12 AM
tobiu added parent issue #8661 on Jan 15, 2026, 3:12 AM
tobiu referenced in commit 50230c8 - "feat: Implement Golden Spiral & Cluster Physics for Neural Swarm (#8668)" on Jan 15, 2026, 3:17 AM
tobiu
tobiu Jan 15, 2026, 3:18 AM

Input from Gemini 3 Pro:

✦ I have implemented the Cluster Physics and Golden Spiral initialization.

Changes:

  1. Golden Spiral: Replaced Math.random() initialization with a deterministic spiral distribution. This guarantees 100% screen coverage from the first frame, eliminating the "expanding blob" artifact.
  2. Cluster Topology: Nodes are now assigned roles (PARENT vs CHILD). 10% of nodes act as Cluster Centers (Parents).
  3. Parent-Child Physics: Implemented a spring-force cohesion model. Children are attracted to their assigned Parent node, creating organic "swarms" that drift together.
  4. Buffer Optimization: Updated STRIDE to 7 to accommodate parentId without allocating new objects.

The simulation now behaves like a cohesive, living system rather than random noise.

tobiu closed this issue on Jan 15, 2026, 3:19 AM