COME TO OUR TABLE 159 TO TRY IT OUT. WE COULDNT DEPLOY BECAUSE IT WAS TOO EXPENSIVE
Inspiration
A week before CalHacks, two of us heard a talk by Professor Michael Bernstein, founder of Simile at Stanford about simulating the real world and the ways in which his company does this. We knew immediately we wanted to build in that space but weren't sure how, and we definitely did not know how. At CalHacks we met our third teammate, who was just as fascinated by the idea of a hive mind in simulated environments. We all were inspired to pursue an ambitious project and knew the fulfillment it would give us if we actually completed it. We also wanted it to solve a real problem. Cities spend months, sometimes years, studying whether a street change is worth it. A realistic simulation could give a good answer in minutes.
What it does
Common Ground is an urban planning platform that simulates downtown San Francisco. Every commuter is their own agent. They plan their day, choose where to go and how to get there, and run into other people along the way. Make a street car-free, rezone a block or add a congestion charge, and the city replans in seconds, showing what changes in traffic, foot traffic, business revenue and social connections compared to today.
Teams can work together in shared workspaces and see each other's edits live, and the simulation is open to anyone who wants to understand how a proposal would affect their street.
How we built it
The simulation: a Python engine where each simulated person makes travel and destination choices and adjusts them over several simulated days until the city settles. People who share a sidewalk or café at the same time can form social ties.
Real data: street and building maps from OpenStreetMap, where people live and work from the US Census, zoning and land use from DataSF, BART ridership, and Caltrans traffic counts.
Apify: we used Apify's Google Maps Scraper to collect 868 real downtown businesses, with ratings, prices and busy hours. This shapes where simulated people go and when, and let us check the model: our café and shop timing closely matches Google's busy hours.
Claude: explains results in plain English and tells the story of any simulated commuter's day. It's only allowed to use numbers from the simulation and always shows who loses, so it can't oversell a plan.
Factory Droid Agent: writes brand-new city policies on request. It has to pass our test suite in a sandbox and only goes live after a human approves. It also powers "Ask the city," where you can ask questions about the map.
SpacetimeDB: the live layer behind workspaces. Every edit syncs to the whole team instantly, and SpacetimeDB triggers the simulation so everyone sees the same results together.
Frontend: a 3D city built with Three.js.
Challenges we ran into
Finding the right idea was hard. We also wanted different things as a team, and finding common ground was a real challenge.
In the simulation itself, early versions said pedestrianizing was always good. Even closing every street in the city came out positive. Getting the tradeoffs right, so the model reflects real life instead of telling us what we wanted to hear, took a lot of work. We also had to keep it feeling like a useful product rather than a game, and simplify the interface without losing the core features.
Accomplishments that we're proud of
- Building a simulation that holds up against real data, including San Francisco's 2020 car-free Market Street.
- Getting a full platform working in one weekend that we thought was too ambitious coming in
- For two of us, this was our first technical hackathon so being able to submit a project gave us immense fulfillment.
What we learned
- How much open data cities already publish, and how powerful it is when you combine it.
- How to make decisions as a team. We actually built two different versions because we couldn't agree, and then had to weigh the strengths of each honestly and pick a direction.
- To get comfortable with things breaking, especially on a tight timeline.
What's next for Common Ground
We want Common Ground to become the place where every street change gets tested before it's built. That means growing city by city. Because the platform runs on open data that cities across the country already publish, each new city can be added without starting over. The more cities we cover, the more the platform learns. Every real street change that happens after we've simulated it becomes a chance to check our predictions, and those lessons carry over to every other city.
For planning departments, transportation agencies and consultants, Common Ground becomes a shared workspace where teams model a project together and walk into a public hearing with evidence instead of guesses. For residents and small businesses, it's an open window into what a proposal means for their street. And every new policy a team creates, with Droid building it and a human approving it, joins a growing library that every city on the platform can use.
Built With
- anthropic-api
- apify
- bart
- caltrans-pems
- claude
- css
- datasf
- factory-droid-sdk
- fastapi
- html
- javascript
- node.js
- numpy
- openstreetmap
- overpass-api
- python
- scipy
- spacetimedb
- three.js
- typescript
- us-census
- uvicorn
Log in or sign up for Devpost to join the conversation.