City Clustering Game

Group dynamic cities by population, climate, affordability, transport, and infrastructure while testing clustering strategies, earning scores, comparing algorithms, and exploring visual insights interactively today.

Game Results and City Planner Score

Results update after checking clusters or running an algorithm.

00:00
Score
0
out of 1,000
Silhouette
higher is better
WCSS
lower is tighter
Davies–Bouldin
lower is better
Moves
0
unlimited
Urban Data Trainee
Start a challenge, move cities, then check your clusters.
☆☆☆☆☆
Tip: normalize features when population values overpower scores such as transport or infrastructure.

Challenge Setup

Choose a scenario, algorithm, feature weights, difficulty, and game rules.

Feature Selection and Weights

Interactive City Canvas

Drag city cards into cluster zones. Select a city to inspect its full profile.

Drag cities between zones. Double-click a city for details.

City Profile

Selected city and game guidance.

None
Select a city card on the canvas or table.

Hints and Feedback

No hints used yet.

Event Log

Game loaded.

City Dataset

Use samples, random fictional cities, manual editing, pasted tables, or CSV files.

CityRegionPopulationClimateAffordabilityTransportInfrastructureClusterActions

Visual Analytics

Explore projections, profiles, distances, correlations, quality, and cluster composition with Plotly.js.

Save, Share, and Export

Keep progress locally or export data and reports.

Challenge codes include city data, weights, scenario, seed, and cluster settings.

Cluster Summary

Representative cities, outliers, and feature strengths.

Run or check clustering to generate a summary.

Formula Used

The game combines weighted normalized features, distance calculations, and cluster-quality metrics.

Weighted vector: x′ᵢ = normalize(xᵢ) × feature weight
Euclidean distance: d(x,y) = √Σ(xᵢ − yᵢ)²
Manhattan distance: d(x,y) = Σ|xᵢ − yᵢ|
Silhouette: s(i) = (b(i) − a(i)) / max(a(i), b(i))
WCSS: Σ clusters Σ points ||x − centroid||²
Davies–Bouldin: average maximum cluster similarity
Game score: quality + scenario fit + speed + move efficiency − hint penalty

How to Use

  1. Choose a scenario, difficulty, method, distance measure, and cluster count.
  2. Select active city characteristics and adjust their influence with weight sliders.
  3. Load sample data, generate fictional cities, add records, paste tables, or import CSV.
  4. Start the game, then drag city cards into the most suitable canvas zones.
  5. Use hints when needed, or run automatic clustering for comparison.
  6. Check clusters to calculate quality metrics, score, rank, and recommendations.
  7. Explore Plotly charts and export the results as CSV, JSON, PNG, or PDF.

Example City Data

CityPopulationClimateAffordabilityTransportInfrastructure
Nova Harbour8.2M72399188
Meadowgate1.1M84786268
Ironvale3.6M48715581

Frequently Asked Questions

What does the game cluster?

It groups cities using selected population, climate, affordability, transport, and infrastructure characteristics.

Why should I normalize the data?

Normalization prevents large numeric scales, especially population, from dominating every distance calculation.

What is a good silhouette score?

Values nearer one indicate clearer separation, while values near zero suggest overlapping clusters.

How are feature weights used?

Each normalized characteristic is multiplied by its selected weight before distances are measured.

Can I import my own cities?

Yes. Import CSV, paste tabular data, or add and edit cities manually.

What does DBSCAN do?

DBSCAN finds dense city groups and can label isolated records as noise or outliers.

Does the game save progress?

Yes. Progress is stored in browser local storage and can be resumed later.

How is the score calculated?

The score combines cluster quality, scenario alignment, move efficiency, speed, and hint usage.

Can I compare manual and automatic groups?

Yes. Run an algorithm after manual grouping, then inspect scores, charts, and cluster summaries.

Related Calculators

Customer Segment ExplorerAnimal Grouping ChallengeMusic Taste ClusteringColour Cluster PuzzleNews Article GrouperShopping Basket ClustersPlanet Classification ExplorerPlayer Style ClusteringFind the Best Number of Clusters

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.