HomeRobotics & KinematicsRobot Swarm Flocking — Metric vs Topological Neighbors

Robot Swarm Flocking — Metric vs Topological Neighbor Selection

Interactive 3D simulation of the Reynolds flocking algorithm used to coordinate robot swarms, contrasting fixed-radius (metric) neighbor sensing against fixed-count (topological) neighbor sensing and their effect on swarm cohesion.

Robotics & Kinematics3DModerate60 FPS📱 Mobile-adapted⇄ 2D version
robotic-swarm-flocking-algorithm ↗ Open standalone

This simulator runs the Reynolds separation/alignment/cohesion flocking algorithm on a 3D swarm of simulated robots and lets you switch the neighbor-sensing model between two real design choices used in swarm robotics: a fixed-radius "metric" sensor range (classic boids, proximity sensors) and a fixed-count "topological" nearest-k model (matching the interaction rule measured in real starling flocks and preferred in robotics for its bounded communication cost). Tune the three rule weights, change robot density, and trigger a scatter disruption to see live polarization, neighbor-count, and spread readouts reveal why topological sensing keeps a swarm coherent when metric sensing fragments it.

⚙ Under the hood

Interactive 3D Reynolds flocking simulation for a robot swarm that lets you switch between fixed-radius (metric) and fixed-count (topological) neighbor sensing and watch how each affects coherence when the swarm is disrupted.

swarm roboticsflockingboidsmulti-agentcoordinationdistributed systems

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)