Home▸AI & Machine Learning▸Adaptive Cluster: Boid Swarm Coordination (2D)

Adaptive Cluster: Boid Swarm Coordination (2D)

2D swarm-robotics lab: separation, alignment and cohesion steering forces combine with goal-seeking and obstacle avoidance so a robot swarm self-organizes into moving clusters — tune the weights live and watch the cluster count react.

AI & Machine Learning2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-adaptive-cluster ↗ Open standalone

This 2D companion swaps the 3D original's cosmetic reward/loss/entropy dashboard for the real local steering rules that actually drive swarm robotics: each of the agents sums separation, alignment, cohesion, goal-seeking and obstacle-avoidance forces from only its nearby neighbors, and the cluster count you see update live is a genuine side-effect of those rules, not a scripted number.

⚙ Under the hood

Classic Reynolds boid steering (separation/alignment/cohesion) plus goal-seeking and inverse-square obstacle avoidance, with a union-find pass each frame to count emergent clusters.

swarm intelligenceboid flockingseparation alignment cohesionemergent behaviorobstacle avoidancemulti-robot systems

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)