top | item 23605048

A/B Street: A simulation game to fix Seattle's traffic

366 points| zackham | 5 years ago |abstreet.org

87 comments

order

dabreegster|5 years ago

Hi, author here. Previously posted to HN (https://news.ycombinator.com/item?id=21763636). I just released alpha -- check out this cheesy trailer (https://www.youtube.com/watch?v=LxPD4n_1-LU).

Happy to answer questions! And if you're serious about running this in your city, the importing process has improved greatly since December, so get in touch.

rkagerer|5 years ago

It's like SimCity for a real city!

I tried the Windows version and some of the UI controls don't respond to mouse clicks, e.g. home and gear button in bottom left, speed controls and dropdown. I noticed the target areas for them are about 90px below where the buttons are painted. So when I click the checkbox to show/hide Bus, it actually turns on and off the one for Car. I'm on v0.2.0b and the client area of my game window (excluding titlebar, edges) is about 2560x1520.

Some elements, like the dropdowns at the top (Sandbox map and traffic setting) work ok.

EDIT: Looks like schemescape beat me to reporting this. I'd love to know if this was just a dumb "programmer-oops" or if there's an opportunity for the language/libraries/framework to better funnel code toward correctness.

schemescape|5 years ago

Minor issue I noticed: whenever I launch the app on Windows, the mouse hit-targeting is off vertically by ~40 pixels. Resizing the window makes the problem go away for the rest of the session. I'm on Windows 10, 1920x1080, and I haven't modified scaling/DPI settings.

fwip|5 years ago

It would be awesome to see you model some real changes that the city has made over the last few years, and see how closely the "predictions" made by your model match up with the observed data! The big one is the viaduct closure, but even little changes that you saw in your own experience, like "Bus lane now extends for two more streets," could be really informative.

adamjb|5 years ago

1) How is assignment actually done? i.e given a trip from O to D, how does the model decide which mode to take and which roads/routes to take?

2) How well does it validate? I couldn't find any reference to observed traffic count data anywhere

korethr|5 years ago

Kudos for this.

Does this only simulate what would be considered a typical traffic load, or can it simulate outlier events (sport games, concerts, COVID quarantine, etc)?

petermcneeley|5 years ago

I wonder what the how far the optimal is from existing for variations of global vs greedy (local) optimization.

flr03|5 years ago

Awesome job congratulations this looks it detailled, I can see there is a lot of work behind.

executive|5 years ago

Does this take into account the CHAZ/CHOP?

sytse|5 years ago

If you like this game consider checking out Cities Skylines. Traffic is a major part of the game. With the vanilla edition you can already do a lot, but if you want to route lanes you need the traffic manager mod https://steamcommunity.com/sharedfiles/filedetails/?id=16376...

com2kid|5 years ago

Do any of the mods give the simulated people real commutes? I gave up after I made a city with a full subway system and zoned areas and watched as the simulated citizens left home, went to work, and then went to another random home at night.

It completely ruined my fancy subway system's timetable. :(

cyral|5 years ago

Cities Skylines with the traffic manager mod is a great way to spend a whole lot of time if you are bored. It’s surprisingly fun to try to optimize traffic.

schemescape|5 years ago

This simulation confirms that the easiest fix is to not have the West Seattle bridge be broken :)

yazaddaruvala|5 years ago

I've been really hoping for the Maps team at Google/Waze to release a similar "traffic congestion" view to highlight consistent hot spots. A simulation is also pretty good, but the real data from Maps/Waze users will be even better!

Ideally, a government dashboard to see traffic congestion changes per year, month, day of week, but also hour. If we can create metrics for cities like p99 door-door trip time (i.e. latency) policy makers can better measure changes, bottlenecks, etc and plan better.

linuxftw|5 years ago

The problem is there's only so much room for automobiles in a city. The more you decrease traffic, the more you'll induce demand to fill those improved traffic flow patterns.

The more infrastructure that is built downtown, the more people want to be downtown.

supertrope|5 years ago

This. Traffic congestion is the result of many choices society has made. Subsidize driving or mass transit? Use land for more parking/roads/interchanges or housing/business/retail? Live close to work and pay high rent or commute 30 min. or more to save money? Allow flexible hours or require everyone to come in at 8 a.m.? Toll roads?

jcims|5 years ago

Now you've got a cool simulator to prove it!

FeepingCreature|5 years ago

That's not a reason to not improve infrastructure anymore than "the more chocolate we produce the more people want to buy chocolate" is a reason not to make chocolate. It just shows you're ludicrously underserving demand.

AcerbicZero|5 years ago

This is awesome, although part of the traffic problem is the horrible condition of the roads around Seattle, and a failure to enforce basic traffic laws - specifically - the left lane is for passing, and probably more importantly, do not stop in an intersection. Just because the light is yellow, doesn't mean we need to stack more cars into the middle of the road.

I walked to work (when I lived in Seattle recently) but the amount of traffic jams I saw caused by both regular people in their cars, and the mass transit bus drivers, driving right into an intersection as the light turned red is crazy. I don't know how you can plan traffic flow around it, because as green as the light might be, no one is moving with a bus sitting in the middle of the intersection.

paxunix|5 years ago

Plenty of selfish/oblivious drivers, but don't overlook the selfish pedestrians causing intersection traffic backup too. There are plenty that are crossing right up until the light is red (even if they don't have a "walk" signal), making it impossible for more than one car to make the left turn. Everyone needs to work together.

Pfhreak|5 years ago

Rad! It's a bummer that Amazon employees will have a hard time contributing to this (as Amazon prevents collaborating with anyone on any side projects that are 'games'.) Their offices surround some of the worst traffic in the city, and it'd be interesting to have some of their engineers contributing.

dabreegster|5 years ago

What, really? It's also an "urban planning tool," does that help?

capableweb|5 years ago

What? That's a real thing? Bypassing the feeling of "how can that even be legal?", how can people join a company that puts these kind of restrictions on it's employees? Kind of feels like that Amazon employees put themselves in this situation, so hard to feel bad for them.

If any company tries to limit what I do in my free time, it's a quick and hard "no" on working for them.

StillBored|5 years ago

This is completely awesome. I've considered doing something similar (mostly while sitting around in Austin looking at traffic lights backing up 100+ cars to allow 2-3 to enter from a side street) or looking at a pair of lights (accidentally?) acting like a metering device. Particularly city wide as I'm 100% convinced that the actual traffic engineers here are doing something wrong. They reworked a bike lane a few years back on a street I was driving on daily and then I could see them out there for months trying to work around the fact that they backed up a couple major intersections a couple blocks away as a result.

So the question is, given a bit of ML/etc driving it, and some actual commute time data, what are the changes something like this actually can be used to improve traffic?

dabreegster|5 years ago

There are lots of data quality and simulation assumption issues that prevent results from being meaningful. I'm mostly positioning this as a way to get people interested in coming up with specific ideas, but of course I'd love to reach trustworthiness parity with industry standard traffic sims.

I actually got started in traffic sim while I was in Austin! If you know anybody there who'd be interested in putting in some work to get the area running smoothly, I'd love to include it as a second city in the game.

ALittleLight|5 years ago

The trailer looks amazing. I was actually just imagining a video game like this a few days ago, so it is something of a wish fulfillment plus baader meinhoff syndrome to see this.

I can't wait till tonight when I'll have enough time to get it installed and try it out!

Faaak|5 years ago

This idea was supposed to be my master's thesis project. However I found something different and never did the original idea but's it's always been in my mind.

Big kudos to the author for this nice project ! I hope it gives further ideas to people playing it

qchris|5 years ago

This project is wicked cool, and I almost missed that they built it using Rust. I like the language a lot, and I think something like this is a sign of it moving towards real maturity, where the utility of the programs starts outshining the method of its construction. I'll be really curious to see if any project proposals end up citing this over the next couple years as an impetus for starting to experiment with different approaches to their traffic infrastructure, or at least inspiring people to become more engaged with it.

noir_lord|5 years ago

Didn’t notice either, I’m aware of rust but I’ve not seen bigger codebase in it, will have pull it and have a nosy.

Thanks for pointing out that it’s in rust.

jakecopp|5 years ago

Woah, the data comes from OpenStreetMap!

Is it possible to create a map with one click for a new city?

I read through https://github.com/dabreegster/abstreet/blob/master/docs/art... but I can't tell if this must be manually followed.

bane|5 years ago

I would love to see a simulation system like this that also involved other "graph" components of city infrastructure -- like power, water, food, rail, air traffic, internet, mobile service etc. The ripple effects could be very hard to guess at, but could make for really interesting scenarios. Imagine trying to increase power when the only "lever" you can change is food prices!

tomlagier|5 years ago

In the real world, how is traffic routed? I often wonder what controls obviously inefficient intersections and how easy or hard it is to fix that.

I assume that there are software systems that take in schedules and various inputs (cameras, magnets, crosswalk buttons) but I'm curious if anyone works in the field and would talk about their experience.

dillondoyle|5 years ago

So cool! I'm sure there's a reason this hasn't been done, but I'm curious if there would be value in doing using this for some type of folding at home distributed optimization problem solving. Converging on actual suggest improvements that might not seem obvious

pugworthy|5 years ago

Adding a options for rethinking current systems would be nice.

For example, autonomous vehicles would be interesting. You potentially don't need intersection control with all autonomous traffic. Or what is the benefit of certain streets or lanes being designated autonomous only?

And what is the impact of education? Is there a way to change behavior that's cheaper than changing a street for example? You can change the street, but you can also change how people use the street.

runarberg|5 years ago

> You potentially don't need intersection control with all autonomous traffic

I thought this myth had been widely debunked. In a world where every commuter drives a 100% autonomous car, you still have hobbyists driving old vintage cars, cyclists riding non-autonomous bikes, pedestrians, birds, runaway shopping carts, etc. disrupting the flow of traffic. Without traffic control you make the intersection in-crossible for a significant subset of the traffic.

10euros|5 years ago

When are we getting the CHAZ DLC?

WalterBright|5 years ago

Fixing the traffic lights would go a long way towards improving traffic flow in Seattle. How much time do you spend sitting at a red light when there's no cross traffic? How often are you and the 5 cars behind you abruptly stopped to let one cross traffic car through?

Lots of traffic lights already have cameras on them. Hook 'em up to an AI and a goal of maximizing throughput.

shagie|5 years ago

The paper for this is: On Traffic Light Control of Regular Towns by Elina Mancinelli, Guy Cohen, Stéphane Gaubert, Jean-Pierre Quadrat, Edmundo Rofman

https://www.researchgate.net/publication/281356849_On_Traffi... where you have nice (or almost) nice regular blocks with a constant speed. When you start deviating from this, the math all breaks down.

The ideal case would be to pulse the traffic such that given a certain amount of traffic flow and everyone following the proper speed limit that the time it takes for the traffic pulse to get to the next traffic light is green (and the pulse can continue).

This can be seen when you switch from one traffic light synchronization district to another - and hitting a traffic light.

There's a stretch on my commute where when I follow the speed limit (its 25 in this segment), I can go from one end of the traffic district to the next without ever hitting a red light (about 15 blocks).

The thing is that if the traffic isn't pulsed, then the spot where it changes from one traffic district to the next backs up significantly and causes other backups further down traffic.

xxpor|5 years ago

This sounds simple but it really isn't.

First, the vast majority of signals aren't networked, they're on simple timers. And you can't just put them on the internet for hopefully obvious reasons.

Second, there's a bit of a butterfly effect. Change one thing and the whole system reacts in sometimes unpredictable ways.

Third, you need to account for pedestrians too. There's ADA requirements around how long signals are green for based on the width of the road.

Fourth, you need to account for pedestrian load. There's no cameras trained on the areas where pedestrians gather. If you're going to say they just need to press the button, no:

https://cal.streetsblog.org/2020/04/01/stop-touching-pedestr...

Basically, it's really not that simple.

aunty_helen|5 years ago

Hey good idea! It's something I've been working on for the last two years. It sounds simple though doesn't it ;)

Keep an eye out on the hn home page I'll be posting my poc in the next month

pugworthy|5 years ago

As simple as this sounds, there are ramifications. It might make sense for YOU at that light at the time, but does it make sense for the greater good of flow?

Off hand, I'd say lights are often timed such that once you get one green you get a lot of greens, then you're asking for more stop and go traffic simply because someone showed up and threw off the sequence.

Take away that and you gain some benefits, but you also lose in other areas.

Not an easy problem.