10 ms·
A/B Street: A simulation game to fix Seattle's traffic
- dabreegster 6y agoHi, author here. Previously posted to HN (https://news.ycombinator.com/item?id=21763636 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 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.
- korethr 6y agoKudos 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)?
- dabreegster 6y agoOnly fixed trips coming from https://www.psrc.org/activity-based-travel-model-soundcast https://www.psrc.org/activity-based-travel-model-soundcast. Demand modelling is next -- changes you make to the map will influence existing trips to change mode. The biggest difficulty in simulating outlier events is making a clear UI for specifying that new load.
- schemescape 6y agoMinor 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.
- dabreegster 6y agohttps://github.com/dabreegster/abstreet/issues/65 https://github.com/dabreegster/abstreet/issues/65 Thanks for reporting! I'll try fixing this blind (no Windows machine handy) and send a new build; it'd be great if someone could confirm it.
- nacs 6y agoHave you tried Virtualbox in whatever OS you're using to run a Windows VM? I believe MS provides premade free virtualbox images for IE testing purposes too.
- dabreegster 6y agoCould you give https://github.com/dabreegster/abstreet/suites/828409393/artifacts/9222718 https://github.com/dabreegster/abstreet/suites/828409393/art... a shot? If that URL disappears or you don't want to re-download the whole .zip, just the fixed binary is https://www.dropbox.com/s/j2hh8xrugtsxslc/game.exe?dl=0 https://www.dropbox.com/s/j2hh8xrugtsxslc/game.exe?dl=0
- schemescape 6y agoThat new build did NOT fix the issue for me. Now that I'm looking more closely, this looks like some sort of initial aspect ratio issue, possibly related to a resize. The game launches and the window either starts maximized or it maximizes itself. If I restore (un-maximize) and re-maximize, the aspect ratio is clearly different because the logo in the center of the screen gets slightly taller (while staying the same width). In other words, the initial aspect ratio of the graphics seems incorrect (squished vertically slightly for me, running at 1920x1080).
- alecmg 6y agoThis sounds suspiciously familiar Do you have your windows taskbar in non-default position? Mine is on top of screen and some games in some display modes give offset mouse position
- rkagerer 6y agoIt'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.
- pixelbash 6y agoI've seen a few interfaces with this issue now, another one being ultimaker cura (might be fixed in a current version) and the occasional game. Every time has been with scaling on, and always seems to move the clickbox down and to the right. Would love to know what causes it.
- fwip 6y agoIt 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.
- petermcneeley 6y agoI wonder what the how far the optimal is from existing for variations of global vs greedy (local) optimization.
- flr03 6y agoAwesome job congratulations this looks it detailled, I can see there is a lot of work behind.
- executive 6y agoDoes this take into account the CHAZ/CHOP?
- dabreegster 6y agoThere's been a small edit war in OpenStreetMap to keep up with the access restriction changes. Right now no, but when I grab fresh new OSM data, some roads will probably just disappear. Need to support no-through-access.
- adamjb 6y ago1) 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
- dabreegster 6y ago1) Mode choice is fixed, coming from https://www.psrc.org/activity-based-travel-model-soundcast https://www.psrc.org/activity-based-travel-model-soundcast. Next work focus will be on adjusting mode choice when edits make it favorable to bike/walk. Route assignment is mentioned in https://dabreegster.github.io/abstreet/how_it_works.html https://dabreegster.github.io/abstreet/how_it_works.html (documenting all assumptions in an organized way has been really hard). There are score functions in https://github.com/dabreegster/abstreet/tree/master/map_model/src/pathfind https://github.com/dabreegster/abstreet/tree/master/map_mode... -- they're pretty simple right now. 2) I wrote a bit here: https://old.reddit.com/r/urbanplanning/comments/hdylmo/ab_street_a_traffic_simulation_game/fvo4wrj/ https://old.reddit.com/r/urbanplanning/comments/hdylmo/ab_st... In short, validation is hard, and I'd say I'm a bit understaffed.
- spyder 6y agoReminds me of the Citybound game in (slow :( ) development by basically one guy and also written in Rust: https://aeplay.org/citybound https://aeplay.org/citybound He demoed his actor system with 100 000 cars in the middle of this talk: https://www.youtube.com/watch?v=qr9GTTST_Dk https://www.youtube.com/watch?v=qr9GTTST_Dk Maybe you guys should team up :) (if not already...)
- AlphaSite 6y agoThere is also: https://store.steampowered.com/app/1067860/NewCity/ https://store.steampowered.com/app/1067860/NewCity/ which i've seen with a couple hundred thousand actors.
- dabreegster 6y agoCitybound looks awesome, but development seems a bit stalled. I've been in touch on r/citybound before, am following the project closely. There's also https://github.com/Uriopass/Scale https://github.com/Uriopass/Scale, which has a really awesome demo running of Paris
- Faaak 6y agoThis 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
- sytse 6y agoIf 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=1637663252 https://steamcommunity.com/sharedfiles/filedetails/?id=16376...
- cyral 6y agoCities 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.
- asdff 6y agoAnd surprisingly frustrating. Why is my city gridlocked? Because only the left most lane of my 6 lane avenue is being used by these 1000 hot dog trucks leaving my port.
- Darkphibre 6y agoSounds about right, actually. ;)
- cyral 6y agoAnd if you ever make a bridge across a river... be prepared to add like 4 more next to it. My cities always end up looking ridiculous like that.
- thaumasiotes 6y agoAs far as I've read, you can solve that problem by just not connecting the parts of your city, in which case the population just pretends everything works.
- com2kid 6y agoDo 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. :(
- yazaddaruvala 6y agoI'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.
- andrewxdiamond 6y agoYour hope has come true! Kindof. I don't think this comes with a dashboard, but the data is there https://www.digitaltrends.com/cars/waze-for-cities-data-puts-traffic-data-on-google-cloud/ https://www.digitaltrends.com/cars/waze-for-cities-data-puts...
- ALittleLight 6y agoThe 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!
- evolve2k 6y agoHow much would be involved to adapt this to other cities?
- dabreegster 6y agohttps://github.com/dabreegster/abstreet/blob/master/docs/new_city.md https://github.com/dabreegster/abstreet/blob/master/docs/new... Biggest barrier is lack of trip demand data. If you come up with how many people leave from building1 to building2 at time T using some mode of transport, then this can work.
- kevmo314 6y agoI see you worked at Google at the same time I was there. I'm surprised we never got in touch, I helped work on a project that did traffic light optimization research, also investigating some of the approaches you mentioned, such as microbidding. We didn't build our own microsimulator but instead worked off of SUMO + OSM, which I'm sure you're familiar with. :) I no longer work there either, but feel free to reach out if you're interested in chatting.
- aunty_helen 6y agoHey this is something I've been working on as a side project for the last 2 years. Using traffic cameras to detect the flows through intersections with the goal of providing better stats to governments and city planners. Hopefully I can have the poc going in the next month. A city wide integration with something like AB street would be really cool and was phase 2 for this project. Phase 3 being an optimised citywide traffic control.
- dabreegster 6y agoWhoa, this would be awesome! Strongly consider publishing open datasets. :) Could you talk at all about how it works, or what privacy issues you've dealt with?
- aunty_helen 6y ago
- qchris 6y agoThis 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 6y agoDidn’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.
- dabreegster 6y agoI gave a [talk](https://www.youtube.com/watch?v=chYd5I-5oyc https://www.youtube.com/watch?v=chYd5I-5oyc) to a Rust meetup with lots of gory details, if it's interesting
- schemescape 6y agoThis simulation confirms that the easiest fix is to not have the West Seattle bridge be broken :)
- deleted 6y ago[deleted]
- tomlagier 6y agoIn 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.
- greeneggs 6y agoCheck out the Kimley-Horn Integrated Transportation System (KITS): https://www.kimley-horn.com/service/kits-advanced-traffic-management/ https://www.kimley-horn.com/service/kits-advanced-traffic-ma... A user manual might give you some sense of the complications (bus priority, special events scheduling, etc.): https://dpw.lacounty.gov/TNL/ITS/KITS/site_files/LACO%20KITS%20Manual.pdf https://dpw.lacounty.gov/TNL/ITS/KITS/site_files/LACO%20KITS...
- StillBored 6y agoThis 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 6y agoThere 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.
- MasterScrat 6y agoIf you're interested in this kind of planning problems, check out the NeurIPS Flatland challenge, in which we try to optimize traffic on railway networks, in association with the Swiss and German railway companies! https://www.aicrowd.com/challenges/neurips-2020-flatland-challenge/ https://www.aicrowd.com/challenges/neurips-2020-flatland-cha... (disclaimer: I'm an organizer)
- linuxftw 6y agoThe 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.
- FeepingCreature 6y agoThat'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.
- supertrope 6y agoEfficiency matters. If allocating 100 million currency units to widening a highway from 5 lanes to 6 lanes improves people/hour capacity and quality of life less than other solutions, the other solutions should be chosen. In addition to diminishing returns on the way we’ve always done it, there’s a hard limit of about 2000 cars/hour/lane. Chocolate is not free at the point of use but roads usually are. Without price signals or other limits people over-consume resulting in a shortage and people paying in time.
- FeepingCreature 6y agoThe fact that it induces demand makes it more efficient, not less.
- lotsofpulp 6y agoHence an easy solution to traffic is increase the cost of driving. Which Seattle already has dynamic tolls which change in price: https://www.wsdot.wa.gov/Tolling/TollRates.htm https://www.wsdot.wa.gov/Tolling/TollRates.htm
- supertrope 6y agoThis. 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?
- WalterBright 6y agoFixing 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.
- aunty_helen 6y agoHey 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
- gowld 6y agohttps://www.seattletimes.com/seattle-news/transportation/meet-the-man-transforming-seattle-one-curb-at-a-time/ https://www.seattletimes.com/seattle-news/transportation/mee...
- WalterBright 6y agoI live in the Seattle. An awful lot of intersections only have cars involved, not pedestrians and bikes. In fact, nearly all of them. Besides, if you have an intersection that deals with 500 cars and 2 bikes, what would make the most sense to optimize for?
- xxpor 6y agoThis 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-pedestrian-beg-buttons/ https://cal.streetsblog.org/2020/04/01/stop-touching-pedestr... Basically, it's really not that simple.
- jakecopp 6y agoWoah, 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/articles/map/article.md https://github.com/dabreegster/abstreet/blob/master/docs/art... but I can't tell if this must be manually followed.
- dabreegster 6y agohttps://github.com/dabreegster/abstreet/blob/master/docs/new_city.md https://github.com/dabreegster/abstreet/blob/master/docs/new... Not quite one-click, but you can try the one-shot importer. You'll probably hit some issues; I have strict assertions to prevent regressions in Seattle. Please file a bug if you can't get a new place to work.
- bane 6y agoI 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!
- pugworthy 6y agoAdding 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 6y 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.
- AcerbicZero 6y agoThis 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 6y agoPlenty 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 6y agoRad! 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 6y agoWhat, really? It's also an "urban planning tool," does that help?
- capableweb 6y agoWhat? 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.
- Pfhreak 6y agoThey don't tell you until you've started.
- capableweb 6y agoThat has to be illegal, even in the US?
- dillondoyle 6y agoSo 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
- 10euros 6y agoWhen are we getting the CHAZ DLC?