Live data from Hacker News

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

abstreet.org

61–70 of 89 posts

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

#61
post #57

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.

Reminds me of the Citybound game in (slow :( ) development by basically one guy and also written in Rust: 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 Maybe you guys should team up :) (if not already...)

There is also: https://store.steampowered.com/app/1067860/NewCity/ which i've seen with a couple hundred thousand actors.

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

#62

Earlier quoted context omitted.

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.

Could you give 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

That 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).

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

#63

Earlier quoted context omitted.

Hey 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…

Whoa, 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?

Sure, the system takes a raw camera feed and spits out an entry into a sql db which will then, depending on customer requirements, be provided in a format they want.

In between these steps, (all based in python) opencv takes the video, splits it, sticks some of the frames on a kafka cluster.

Another node picks up approx 2 fps, hands it to a object detection algo based on tensorflow which then puts the results on another kafka topic.

A heavily customised tracking algo pulls all of the frames available and the tensorflow results for initialisation and reverification. Once a vehicle is tracked through the field of view the vehicle is counted.

For the privacy issues, as this is only tracking for a short amount of time, not tracking between intersections and not tracking persistent uuids or numberplates, there shouldn't be too much trouble. But it will depend on the local law requirements. As this is a statistical problem, tracking the actual path of a car between point a and b isn't completely necessary if you can get a sufficient amount of coverage over a city. (You probably already understand this.)

As for opening the datasets up, I plan to do this with the poc. I've been using the Biloxi Mississippi camera live stream from youtube for all of my testing so far. My poc will be a website with this live stream having an overlayed view and the ability to download the stats for the day/month/year etc. As for other cities, I'm sure a FOIA will be able to get you the data. But I will be pushing to publish it openly as they will have to pay for it either way.

As you can probably tell, I'm trying to turn this into a business and the costs of actually collecting and processing the data isn't something that is reasonable for single person to bear. After talking to the traffic dept for my country, the largest city of 1.5m has about 3000 cameras. But I am aiming for a system that's cheap enough to enable 24/7 monitoring as that's when this all gets pretty exciting.

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

#64

Earlier quoted context omitted.

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.

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.

Have 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.

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

#65
post #51

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.

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 g…

I'm sure those are not insurmountable obstacles. For example,

> First, the vast majority of signals aren't networked, they're on simple timers.

Doesn't matter. Even doing the ones that are networked would be a big improvement.

> And you can't just put them on the internet for hopefully obvious reasons.

But you can put every neighboring building on the internet with their security cameras? It's not like you need hires or high frame rates to detect large moving blobs, count them, and estimate their speed & distance.

The problem is, the city has no incentive to do this, as the cost falls on other people.

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

#66

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.

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 al…

> Not an easy problem.

That's what AI is good at. Besides, isn't a little incongruous to argue that the optimal solution for a complex optimization problem is a 1950's egg timer?

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

#67
post #50

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.

https://www.seattletimes.com/seattle-news/transportation/mee...

I 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?

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

#68
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.

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

#69
post #51

Earlier quoted context omitted.

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 g…

I'm sure those are not insurmountable obstacles. For example, > First, the vast majority of signals aren't networked, they're on simple timers. Doesn't matter. Even doing the ones that are networked would be a big improvement. > And you can't just put them on the internet for hopefully obvious reasons. But you can put every neighboring building on the internet with their security cameras? It's not like you need hires…

The internet issue is a security one. Imagine what would happen if someone could make lights green in 2 directions.

To the first point, the networked lights are already in this mode (it's the reason why they added it in the first place). I can't find the report right now but upgrading all of the signals on 2nd from Denny to Yesler cost something like 30 million bucks.

The upgrade in the Mercer project area isn't exactly a glowing success:

https://www.theurbanist.org/2018/09/06/eleven-ways-adaptive-...

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

#70
post #51

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.

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 g…

That article you posted is just stupid. Yes, maybe now people won't be pressing buttons, but COVID won't be around forever. In a few months/years/whatever the pedestrian button will still be around, people will still press them, and they will still be a valid solution to traffic. The article also says:

> These buttons have long been decried and criticized by advocates for walking, anyway. The buttons’ purpose is less to keep people safe than to reinforce the primacy of cars on the street by forcing people who want to cross a street to “beg” for a walk signal.

This makes it sound like buttons are some kind of implement of the bourgeoise, used to "reinforce the primacy of cars" and keep the pedestrians powerless. In reality, whether pedestrians like it or not, cars are primary. The roads literally exist for cars. As a pedestrian, I would do the very difficult task of pressing a button, if it meant that as a driver I could have less traffic and hit less red lights.

Post reply on HN