Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
A traffic simulation game exploring how small changes to roads affect cyclists, transit users, pedestrians, and drivers.
Rust Other
  1. Rust 99.2%
  2. Other 0.8%
Branch: master
Clone or download
Pull request Compare This branch is 3311 commits ahead, 1 commit behind google:master.
Cannot retrieve the latest commit at this time.
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows work around more github action silliness [rebuild] Jan 22, 2020
abstutil make it easier to debug objects by warping to them, draw turn cycler Jan 31, 2020
convert_osm not all lanes have to be the same width. make sidewalks a bit thinner. Jan 29, 2020
data carve out a section for showing off curated proposals [rebuild] Feb 4, 2020
docs new release Feb 3, 2020
ezgui overhaul fullscreen layouts: splash menu, about, challenge picker, Feb 4, 2020
game carve out a section for showing off curated proposals [rebuild] Feb 4, 2020
geom explain a few more things in the tutorial, improve arrows a bit Jan 31, 2020
gtfs get the sim crate to build to wasm. a small step towards #21 Jan 31, 2020
headless also group raw_maps in data/input Dec 3, 2019
kml remove old census popdat stuff Dec 3, 2019
map_editor fix bounds of tutorial levels, so max unzoom and minimap and such work. Jan 30, 2020
map_model carve out a section for showing off curated proposals [rebuild] Feb 4, 2020
popdat starting a tutorial for bus lanes too Jan 27, 2020
precompute make Timer methods and ModalMenu take &str or String Dec 12, 2019
release when we change states, immediately run through a round of no-op event… Jan 22, 2020
sim get the sim crate to build to wasm. a small step towards #21 Jan 31, 2020
tests not all lanes have to be the same width. make sidewalks a bit thinner. Jan 29, 2020
.gitignore hack in a second scenario on a synthetic map, just to start to figure… Dec 6, 2019
Cargo.toml goodbye, fix_map_geom. rename synthetic crate to map_editor Sep 23, 2019
LICENSE Initial import of A/B Street prototype. Mar 13, 2018
README.md new release Feb 3, 2020
clickable_links.py rename the main editor crate to game -- map editing is just a tiny pi… Sep 7, 2019
clippy.sh round of clippy. not fixing everything. Dec 12, 2019
exec_tests.sh revive the other transit test Nov 26, 2018
format_md.sh adding a new hint for extra turn restrictions Aug 6, 2019
import.sh fix small bug in import script, and skip over bad polylines in Dec 4, 2019
precompute.sh dont insist on prebaked data existing in some places. also go update Jan 21, 2020
rgrep.sh get halloween working with small lines. refactor a Line::maybe_new. Feb 1, 2019
rustfmt.toml

README.md

A/B Street

Ever been on a bus stuck in traffic, wondering why there are cars parked on the road instead of a bus lane? A/B Street is a game exploring how small changes to a city affect the movement of drivers, cyclists, transit users, and pedestrians.

Removing dedicated left-turn phases from a traffic signal:

fix_traffic_signal

Watching the Mercer backup start at 4am:

exploring_traffic

Documentation for developers

Features

  • The map
    • A detailed rendering of Seattle from OpenStreetMap and King County GIS data, including sidewalks, on-street parking, bike lanes, bus-only lanes, turn lanes, buildings, and bus stops.
    • Intersections governed by stop signs and traffic signals, with default signal timings heuristically inferred. Hand-tuned geometry to reasonably model Seattle's strangest intersections.
    • You can adjust lane types, stop signs, and traffic signals, and reverse lanes.
  • The traffic
    • Individual cars, buses, bikes, and pedestrians move through the map.
    • Most trips are multi-modal -- for example, a pedestrian exits a building, walks a few blocks over to their parked car, drives somewhere, looks for parking, and walks to their final destination.
    • A realistic set of trips -- how many people go from building 1 to building 2 at some time using some form of transport -- based on PSRC's Soundcast model.
  • The gameplay
    • Start in sandbox mode, exploring the map, watching traffic patterns, following individual agents, looking for problems.
    • Jump to edit mode, where you can convert some on-street parking to bus lanes and adjust traffic signals to try to fix some problem.
    • Try your change in A/B test mode, running two traffic simulations side-by-side. Explore how individual agents finish their trips faster or slower, and compare aggregate results about different groups of traffic.
    • Attempt a predefined challenge with particular objectives, like speeding up certain bus routes or designing a full bike network.

Roadmap

In February 2020, user-testing and polishing before a wider announcement. After that:

  • Model more things: light rail, shared bike/walking paths, ridesharing, utility functions for different groups
  • Improve map and demand data quality
  • Continue polishing the UI and improving data visualization
  • More challenges and exploring radical new ideas (like Madrid superblocks)
  • Expand to other cities
  • Implement a web version

Project mission

If you fix some traffic problem while playing A/B Street, my ultimate goal is for your changes to become a real proposal for adjusting Seattle's infrastructure. A/B Street is of course a game, using a simplified approach to traffic modeling, so city governments still have to evaluate proposals using their existing methods. A/B Street is intended as a conversation starter and tool to communicate ideas with interactive visualizations.

Why not leave city planning to professionals? People are local experts on the small slice of the city they interact with daily -- the one left turn lane that always backs up or a certain set of poorly timed walk signals. Laura Adler writes:

"Only with simple, accessible simulation programs can citizens become active generators of their own urban visions, not just passive recipients of options laid out by government officials."

Existing urban planning software is either proprietary or hard to use. A/B Street strives to set the accessibility bar high, by being a fun, engaging game.

Credits

Contributing

Help always needed! If you want to bring this to your city or if you're skilled in graphic or user experience, traffic simulation, data visualization, or civic/government outreach, please contact Dustin Carlino at dabreegster@gmail.com or post at r/abstreet. I also welcome any contributions on Patreon.

You can’t perform that action at this time.