Robot Swarm Flocking (2D) — Metric vs Topological Neighbor Selection
2D top-down Reynolds flocking simulator for robot swarms: contrast fixed-radius (metric) neighbor sensing against fixed-count (topological) neighbor sensing, and see the real 2D geometry — mean neighbor count scales as density times πR², not the 3D sphere-volume law — measured live against the Poisson prediction.
This simulator runs the Reynolds separation/alignment/cohesion flocking algorithm on a 2D top-down swarm of simulated ground robots and lets you switch the neighbor-sensing model between two real design choices used in swarm robotics: a fixed-radius "metric" sensor range and a fixed-count "topological" nearest-k model. Because the arena is genuinely two-dimensional — the model a ground-based robot swarm with 2D LIDAR or proximity rings actually experiences — neighbor counting follows the 2D Poisson-disc law ρ·π·R² rather than the 3D sphere-volume law used by an aerial swarm, and the live readouts measure that relationship directly against the theoretical prediction. 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.
Interactive 2D top-down Reynolds flocking simulation for a ground robot swarm that lets you switch between fixed-radius (metric) and fixed-count (topological) neighbor sensing, with live readouts comparing the measured neighbor count against the real 2D Poisson-disc prediction rho*pi*R-squared — the disc-area law that governs a 2D sensor swarm, distinct from the 3D sphere-volume law used by an aerial swarm.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install