For Engineers · k-Means Clustering
k-Means Clustering for a game AI
Built for engineers using it for real design work. Go from concept to a running model in the browser, then scale to the cloud when needed. Simulate a game AI live below — adjust the inputs and watch it respond, right in your browser.
k-Means ClusteringLive
finding groups in data
Controls
Presets
k-means alternates two steps: assign each point to its nearest centroid, then move each centroid to the mean of its points. Repeat and the clusters snap into place. Choosing the right k, and where to start, both matter. Educational tool.
Data Inspector
Clusters3
Points80
Statusconverged
Governing equation
Reading this result: k = 3 is fewer than the 4 true blobs, so Lloyd’s algorithm is forced to merge neighbouring groups into one cluster and real structure is lost. Try k = 4.
Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.
Also for:StudentsResearchersEducatorsHobbyists & MakersK-12 StudentsFirst RespondersGeneral version →
More with k-Means Clustering
k-Means Clustering for a neural networkk-Means Clustering for a sorting algorithmk-Means Clustering for a search treek-Means Clustering for a hash tablek-Means Clustering for a recommendation enginek-Means Clustering for an image classifierk-Means Clustering for a chatbotk-Means Clustering for a pathfinding AI
Frequently asked questions
- Is this good for engineers?
- Yes — this version of "k-Means Clustering for a game AI" is framed for engineers using it for real design work. Go from concept to a running model in the browser, then scale to the cloud when needed.
- Do I need to install anything?
- No. It runs in any modern browser, free, with no account required.