Territory Capture 2D: Voronoi Partitioning & Lloyd's Algorithm
2D top-down territory-capture lab: mobile agents partition the plane into a live Voronoi diagram, and a Lloyd's-algorithm centroid-pull slider shows decentralized multi-agent coverage control converge or stay chaotic in real time.
This 2D companion replaces the original's decorative 3D "AI training" scene with the real mechanic its title implies: a live Voronoi diagram where each of a handful of mobile agents "captures" every grid cell closer to it than to any rival, and a Lloyd's-algorithm centroid-pull slider drives the classic multi-robot coverage-control law — each agent chasing the centroid of the territory it currently owns — so you can watch decentralized area division either relax into a stable, balanced partition or stay in permanent flux once wander noise is added.
2D top-down territory-capture lab: mobile agents partition the plane into a live Voronoi diagram, and a Lloyd's-algorithm centroid-pull slider shows decentralized multi-agent coverage control converge or stay chaotic in real time.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install