jducoeur: (Default)
jducoeur ([personal profile] jducoeur) wrote2008-12-15 10:21 am
Entry tags:

Anti-patent: Building a better traffic light

[Happy birthday to [livejournal.com profile] ladysprite!]

One of the more common sources of minor modern-world frustration is the traffic intersection. Traffic lights are typically pretty blunt-force instruments, running the same timing over and over again, regardless of traffic. The really fancy ones might be sensitive to time of day, and have their timing modeled in advance by traffic engineers, but it looks to me like those engineers don't come and check their work very often, because we still spend our time sitting at badly-programmed lights. And sadly, individual human ingenuity doesn't seem to help much: putting a person in charge of the intersection usually makes things worse, not better. (Nothing screws up traffic quite as effectively as the average traffic cop. A few are good at it, but most are terrible, because they rarely switch directions fast enough.)

This leads me to wonder if anybody's considered the one object that potentially has all the necessary information to do it right: the light itself. Could we build a *smarter* traffic light? I suspect so, by making a light that understands the traffic passing beneath it and the time of day, and can experiment and learn what works.

Here's the high concept. Take a traffic intersection, with all the related lights, and put sensors in each direction. (Could be treadles, could be cameras, whatever -- the important bit is that it can count the cars coming through.) Hook this whole thing to a simple learning computer -- probably a neural net, possibly some sort of annealing or evolutionary algorithm, so long as it is capable of gradually improving its own timing. Give the computer a clear measure of "better" and "worse", which mostly consists of the number of cars that actually pass through, plus a desire to balance the directions reasonably fairly.

Peg some sensible extremes: eg, don't go green for less than five seconds or more than sixty at a time. Don't allow the timing to shift too quickly, to avoid dramatically bad extremes to come out suddenly. Hard-code the firm assumptions: eg, exactly one direction must be green at any given time, and a fire truck's signal overrides everything else. Give the thing a clock (with an understanding of time and day of the week) as an additional input, so that it can factor that into its calculations.

For extra credit, add an additional sensor a bit down the street in each direction, to detect backups from the light, and put a particular priority on avoiding them.

In more complex environments, where there are a number of lights near to each other, hook the networks together, so that they can work co-operatively to improve the overall traffic flow.

For all I know, someone may already have invented this, but it sure isn't widespread if so. (This invention brought to you by my sitting in the usual pointless Route 3 traffic jam on my way home the other day.) It could make a fine project for some entrepreneurial programmer: build and improve the thing with simulated inputs, and then find an agreeable traffic-light manufacturer to partner with or sell it to. I suspect it would require a fancier computer than most lights now have, but in the age of $300 laptops, I can't imagine it would add significantly to the cost of a full light system.

This is all, BTW, very strongly based on my general approach to cognition -- when I say a "smarter" traffic light, I mean that quite literally. The above has all the elements of intelligence, albeit in a very limited domain. It has a number of heterogenenous inputs; outputs that are capable of experimenting; a neural network (preferably a multi-level one) capable of associating the outputs and the inputs in feedback loops; "instincts" that start things in the right direction and help avoid foolish extremes; and instinctive concepts of "better" and "worse" to steer it in the right direction. Far as I've been able to figure out, that's most of how intelligence works: humans seems to be mostly based on the same principles, albeit scaled up in complexity many orders of magnitude.

Do you think this would work? What clever solutions have you had for workaday problems, that should get anti-patented before some patent troll gets their hands on the idea?

[identity profile] etherial.livejournal.com 2008-12-15 03:53 pm (UTC)(link)
One thing I'd love to see more of in traffic lights is the use of the blinking red. I've been in many intersections where "forward on red after stop" would have been an easy and elegant means to handle some of the unpredictability of the traffic. There's an elementary school near my house ensconced in residential streets, and they decided to put a traffic light where those residential streets collide with the main street. This makes sense, but only from 7:30-8:30 AM and 2:00-3:00 PM on Weekdays during the school year. The rest of the time, the light is a nuisance.

[identity profile] jenwrites.livejournal.com 2008-12-15 05:19 pm (UTC)(link)
Isn't this how Skynet started? ;)

[identity profile] etherial.livejournal.com 2008-12-15 08:12 pm (UTC)(link)
It's actually a plot point in the series.

[identity profile] goldsquare.livejournal.com 2008-12-15 09:29 pm (UTC)(link)
No. That was Colossus.

This is how Skynet started.

(Do click the link for some scary new tech from Lockheed-Martin, especially if you remember the phrase "smart crowbars".)

[identity profile] meranthi.livejournal.com 2008-12-15 05:22 pm (UTC)(link)
I wish they'd fix a couple of intersections around my place by including the (wonder of wonders) turn signal. When 50% of the cars that go through it turn left, you really should have an honest to Godzilla turn signal.

[identity profile] herooftheage.livejournal.com 2008-12-15 05:22 pm (UTC)(link)
We may already have a smarter traffic light: the traffic itself. I'll be interested in seeing if someone actually scales this up to a large city.

[identity profile] meiczyslaw.livejournal.com 2008-12-15 05:37 pm (UTC)(link)
The main thing that screws up lights is a changing traffic pattern. On the daily level, you have to worry about directional effects (such morning and evening rush hour), plus possibly non-directional ones (the lunch hour).

On a weekly level, you have to handle the difference between weekday and weekend traffic -- and this might include effects due to church, football games, and that kind of thing. (Not to mention Friday afternoon traffic patterns, which are different.)

On a larger level, you have shifts in patterns due to school schedules and Daylight Savings Time. You also have to worry about exceptional cases -- Thanksgiving weekend traffic, for example.

I point all these cases out because your hypothetical neural net will be heavily challenged. (And it ways that can break an improperly-bounded neural net.)

Now, if you've ever played Sim Tower (or Yoot Tower), you'll notice that the pattern I've described is very similar to the challenge presented to a multi-use tower's elevator plan. Interestingly, the best solution to that is the simplest.

So my thinking on "bad traffic lights" is that the engineers have actually over-thought the intersection. You can get a lot done with magnetic loops (your car-detector of choice) and simple algorithms. For example, "Is somebody waiting at the intersection?"

About the only thing you'd have to decide is how often the system would check the loop. If you had an intersection of a two-lane road and a one-lane road, you might check the two-lane road twice as often as the one-lane road. After all, you've already committed twice the resources to the wider road.
laurion: (Default)

[personal profile] laurion 2008-12-15 05:49 pm (UTC)(link)
Actually, there are a lot of smarter systems already in place at many intersections, and more on the way.

Many intersections have a sensor in the road and watch to see if someone is waiting, and for how long, and can adapt that way. Some have cameras to watch the queues for similar adjustments.

What I like are recent GPS systems that actually share realtime data with other nearby units so as to inform you of traffic before you run into it, and suggesting alternate routes.

Me, I'm for more roundabouts (rotaries). Smartly implemented, they self manage variable traffic flows and congestion and smooth it all out. Of course, poorly implemented they are the devils tool.
ext_267559: (Road)

[identity profile] mr-teem.livejournal.com 2008-12-15 06:11 pm (UTC)(link)
Roundabouts (not rotaries) allow better throughput than n-way stops, but have to be carefully chosen for areas that will never exceed a certain throughput. Once they exceed that limit, they become a choke point and the only solution is to replace it with a signalized intersection.

The one that was never built near where I used to live in NH didn't meet the expected throughput criteria. (Also, geography was a minor factor.) Others elsewhere in Nashua did their job well.

[identity profile] leanne-opaskar.livejournal.com 2008-12-15 06:55 pm (UTC)(link)
I personally find rotaries are only useful where there are complicated road systems that don't meet at right angles.

Out here in San Diego, I think we have exactly two rotaries, and one of them is near Legoland (technically in Carlsbad) and probably shouldn't be there, as no one groks how it works.

[identity profile] redsquirrel.livejournal.com 2008-12-15 07:15 pm (UTC)(link)
We actually have quite a lot of those "smart intersections" down here in FL - there are sensors built into the roadway that adjust for the number of cars waiting. The continuing population surge has led to a significant investment in road infrastructure.

Of course, we don't have to spend a large amount of our budget fixing potholes and dumping salt on our roads every year. *grin* I think this may have something to do with the relative scarcity of sophisticated traffic controls in the Northeast.

[identity profile] tafkad.livejournal.com 2008-12-15 08:20 pm (UTC)(link)
My parents live in a small town where the simple underground treadle still works just fine.

[identity profile] crschmidt.livejournal.com 2008-12-15 08:29 pm (UTC)(link)
Non "smarter light" approaches to this problem that I've seen include:
* Basing lights on traffic actually showing up. The lifhgt near the house I spent my latter teens in had a light that would change when you pulled up to it -- and if more cars pulled up, it would change more quickly. (One car pulling up was still a 30 second wait, unless there was no traffic coming: multiple cars would make it change more quickly).
* NYC uses a traffic control center, I believe, where the metrics of how many cars are passing through or not passing through raises red flags so people can retrain on the fly. This has a lot of the components of what you describe: traffic flow, analysis, feedback -- but the brain at the top is a human instead of the light.

Cambridge lights, in my experience, tend to be relatively good, though not perfect. I think it's a somewhat harder problem to solve, most of the time: the side effects from a single slow down stretch very far, to the point that a light being crowded at the BU bridge can have effects felt over by the Galleria, or up by Central Square. You'd need a pretty wide net of traffic lights to be participating in any dense area for it to have a real effect, I think.
ext_104661: (Default)

[identity profile] alexx-kay.livejournal.com 2008-12-15 08:36 pm (UTC)(link)
I'm dubious about this. "Smart" systems are prone to much more complex and catastrophic errors than simple ones. For public systems, I think transparency is a much greater virtue than efficiency.

I saw on someone's LJ recently (maybe even this one!) a series of anecdotes about robots with machine learning capabilities, and the... unique failure modes they arrived at, under the belief that they were successful. Such as the tall robot who always fell over after one step, but was so tall that the sensor detected "lots of distance covered in a short time", and thought it was "more fit" than a shorter one which staggered for a while.

[identity profile] fosveny.livejournal.com 2008-12-15 08:37 pm (UTC)(link)
I came up with an idea like this several years ago, and posted it to LJ. At least one person from a company that makes traffic lights assures me that bits to create traffic intersections exist that have the capability to do this already.

[identity profile] fosveny.livejournal.com 2008-12-15 08:43 pm (UTC)(link)
Ha! Found it. Seems the reply was in email, though.

http://fosveny.livejournal.com/15037.html

[identity profile] corwyn-ap.livejournal.com 2008-12-15 09:21 pm (UTC)(link)
I once worked out most of the details for a traffic-light-free road system. It was based on a hexagonal grid, and all intersections had three rather than four roads entering them. Small ones work fine with no help. Slightly larger ones get a rotary. Large ones get a single overpass, and no stops required. It had the added benefit of reducing both road surface area, and distance traveled between any two random points.

[identity profile] aishabintjamil.livejournal.com 2008-12-15 11:49 pm (UTC)(link)
One problem you might need to consider that I don't see here. My understanding is that in many cities traffic lights are, at least in theory, set up so that they work well in conjunction with other nearby lights, to distribute traffic flow. A light that was totally independent of its neighbors might well serve to merely shuffle the problem around, rather than improving the situation.