Hacker News

New stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. A Programming Mentality(natemeyvis.com)
    discuss
  2. Vibes vs. Evidence: What delivers AI code review quality(dsifry.github.io)
    discuss
  3. What Makes Jev Different from Other LLMs? A Simple Explanation(medium.com/dolevietthang)
    discuss
  4. Silicon Valley Saw the iPhone Coming 13 Yrs Before Apple [video](youtube.com)
    discuss
  5. Something bugs me about AGI AI LLM, what if we back paddled 1000 year(shatteringtheabyss.substack.com)
    1comments
  6. Context compaction, measured: FutureOS vs. Codex vs. OpenCode(future-os-blog.github.io)
    discuss
  7. Major air traffic controller outage triggers flight chaos [video](youtube.com)
    discuss
  8. Meta's Muse Is Better at Surveilling Than Helping Me(wired.com)
    discuss
  9. Android Bench 2.0 – Long Horizon Android Development Benchmark(android.com)
    discuss
  10. FloatLib: Verified Floating-Point Arithmetic in Lean(leandojo.org)
    discuss
  11. Driscoll's Gave China Its Blueberries–Then China Swiped the Secret to Growing Th(wsj.com)
    discuss
  12. Open-Sourcing Rebalancer: High-Performance Assignment Problem Solver(fb.com)
    discuss
  13. Lifestreams: A storage model for personal data (1996)(acm.org)
    discuss
  14. A zero-day has been released for Meta's Muse(github.com/pwardle)
    discuss
  15. I built an autonomous accounting tool to let AI do my taxes(github.com/codegamedev29)
    1comments
  16. Google fined more than €400M by Irish regulator over its use of location data(theguardian.com)
    discuss
  17. Ask HN: Ceremonious Architecture in Times of AI
    1comments
  18. We're Using AI Wrong. The Chat Window Sucks(stclair.ai)
    discuss
  19. Artificial Intelligence and Labor Market Reallocation [pdf](nber.org)
    discuss
  20. A U.S. Strategy to Secure Geopolitical Advantage on an Path to Superintelligence(rand.org)
    discuss
  21. US threatens to ground Iranian airlines worldwide from Wednesday(aljazeera.com)
    discuss
  22. I shipped 2,500 PRs last month to production(twitter.com/poteto)
    discuss
  23. Monthly Roundup #46: September 2026(thezvi.substack.com)
    discuss
  24. Sa: A Wrapper Around GNU Screen(joshstoolbox.com)
    discuss
  25. OpenAI flags 6 new incidents of 'concerning' behavior, unveils plan to track it(nbcnews.com)
    discuss
  26. The Way of Code by Rick Rubin(thewayofcode.com)
    discuss
  27. Agents on Rails: Maximum Effort and DeepSeek 4.1 Flash(rubyonrails.org)
    discuss
  28. Escaping the OpenAI Codex sandbox, twice(accomplish.ai)
    discuss
  29. Outages across API, Grok.com, and Grok Build – API (us-east-1.api.x.ai) Status(x.ai)
    discuss
  30. Bubble Rumble(bubblerumble.net)
    1comments

How do traffic signals work? (2019)

62 pointsby 10h agopractical.engineering
46 comments
9h agoHN ↗

Actuated signal control [...] inductive loop sensors embedded into the road surface

It blows my mind how many people don't realize that's what those circles near the stop bar of an intersection are for, and will then stop 3+ car lengths behind the stop bar, and then can't figure out why the light is never going green.

two signals closely spaced in a row on a major roadway. If one signal gives a green but the next one doesn’t, cars can back up

This is a major problem at an intersection near me that I used to have to drive through frequently. Two intersections, only about 500 feet between them, and MOST traffic during rush out coming from just one of the directions, yet the lights were often exactly out of sync. The first light would be red while the next one was green. Then the first would go green while the other went red, and traffic would only move about 500 feet then stop for 2 minutes. The backup would last well over a mile.

The obvious next step in efficiency is coordination of most or all the signals within a traffic network. This is the job of adaptive signal control technologies, or ASCT. [..] These types of systems can dramatically reduce congestion

My cynical ass would not be surprised at all if oil/gas companies were lobbying against ASCT because idling cars are buying more fuel. Wouldn't be too hard to convince people that an ASCT would cost too much to implement while not producing significant traffic benefits.

9h agoHN ↗

This is a major problem at an intersection near me that I used to have to drive through frequently. Two intersections, only about 500 feet between them

In San Francisco (as well as other cities I've lived in) they put police in the middle of intersections during rush hour to guide traffic (i.e., stop cars before they drive into an intersection that they'll get stuck in the middle of). Seems woefully inefficient

8h agoHN ↗

When traffic is really heavy humans are better than machines at getting traffic through. However they cost a lot of money and so are only rarely worth the cost.

8h agoHN ↗

The traffic cops greatly improve throughput.

Imagine how much gas would be saved if the city spent a little effort on the traffic lights.

7h agoHN ↗

How much gas would be saved by turning half of each 4-lane stroad into a bike lane! :)

1h agoHN ↗

There are many bike lanes where I live, all installed in the last few years.

The bike traffic remains 1% of the car traffic, and 0% when it's cold/rainy.

9h agoHN ↗

ASCT is standard practice (and has been standard practice) on most junctions in most towns and cities in the UK for over 20 years.

8h agoHN ↗

Curious...in the UK, is the implementation of something like that done by government employees?

In the USA, a significant amount of tax-funded infrastructure is actually built out by contractors, which means there's profit going to a corporation, and there's often a cynical idea that the contracts go out to whoever will send a kickback in the form of a campaign contribution to whoever makes the decision on which contractor to use.

8h agoHN ↗

The local councils (local Authority) usually get external companies to design the systems, but there are standard, off the shelf solutions that are specified to be used. These systems range from time synced junctions (with Vehicle attenuation) up to full Urban Traffic Control systems, the protocols used are mostly standard (UTMC), so the local Authority just needs to say what they need. For a UTC system it used to be that the council would run the instation, but with cloud computing, that's mostly run for them now as a hosted system. Usually this is all controlled by the standard local council procurement rules, and run by council employees not elected officials. The elected officials can say a scheme is needed and approve costs, but not who does it.

8h agoHN ↗

If I had a nickle for every time I’ve had to get out of my car and walk up to the person in front of me and explain that they need to pull forward for the light to change - I’d have two nickels, yadda yadda yadda.

8h agoHN ↗

My cynical ass would not be surprised at all if oil/gas companies were lobbying against ASCT because idling cars are buying more fuel. Wouldn't be too hard to convince people that an ASCT would cost too much to implement while not producing significant traffic benefits.

I don't think you need a vast conspiracy to point out that connecting traffic signals costs more (fancier signal equipment, running cable, maintaining the cables, etc) and the benefits may be subtle, hard to predict, and maybe even hard to measure.

Additionally, you have a lot of people that would prefer to slow traffic. Depending on local culture, investing in traffic control can be difficult (although upgrading traffic signal systems may be better able to accomodate priority for transit and bicycle detection)

5h agoHN ↗

Back when I rode I had to add a giant hunk of iron to the bottom of my motorcycle so these fuckin things could see me. Sometimes that still isn't enough and after a few minutes of shimmying back and forth over it I'd just run the red

5h agoHN ↗

Yup. It becomes crystal clear that nobody in authority in roadworks & traffic drives a motorcycle.

3h agoHN ↗

"that's bad, peasants shouldn't do that, so we won't support it to make it suck"

1h agoHN ↗

M y cynical ass would not be surprised at all if oil/gas companies were lobbying against ASCT because idling cars are buying more fuel

This is a bizarre conspiracy theory that you just invented. Stop making up things to get angry about.

9h agoHN ↗

What I find most interesting about the computer side of traffic signal controllers is the interlock design needed to prevent a glitch or memory fault from activating conflicting phases at once, eg two intersecting approaches getting green simultaneously. That's about as safety-critical as it gets for a piece of everyday infrastructure. Would've liked to see more depth on that, though I imagine the specifics are controller/vendor-specific.

I think that interlock design also goes some way toward mitigating the security risks ASCT systems would otherwise pose, as mentioned in the article. On any decent controller, even the control room shouldn't be able to deliberately trigger conflicting phases.

6h agoHN ↗

A typical signal cabinet has a conflict monitor, also called a malfunction management unit, that’s physically distinct from the controller. It supervises the controller outputs and can force the signal to all-way flashing red if green (or yellow or WALK) is shown for conflicting phases or if red or DON’T WALK is missing. More sophisticated units can also detect problems with sequencing or change or clearance interval timing.

8h agoHN ↗

The two-adjacent signals causing extra traffic is something I encounter daily in Berkeley -- Ashby / Claremont & Ashby / Domingo. I probably blow an average of 5 minutes a day cause of that double intersection.

To highlight one other point from the video: You want a light to be able to clear the line built up each time. If not, flux in > flux out and that's a recipe for a growing line, which causes a traffic jam.

6h agoHN ↗

They are very common all down the SF Peninsula because of the Caltrain tracks. There's California/Carolan all through Burlingame (which has some of the most dangerous train crossings in the country because you can get stuck on the tracks between the lights), and then it follows El Camino on one side while the other one goes from Delaware (San Mateo) to Old County (San Mateo / Belmont / San Carlos) to Alma (Palo Alto) to Central Expressway (Mountain View / Sunnyvale).

The Old County lights at least are staggered so they are almost always green at the same time. The Central Expressway ones, not so much - there've been times I've been stuck for 20 minutes trying to cross the 100 feet from Moffett to Castro in Mountain View, because the light timing never lined up with the train signals.

1h agoHN ↗

there've been times I've been stuck for 20 minutes trying to cross the 100 feet from Moffett to Castro in Mountain View, because the light timing never lined up with the train signals.

They've conveniently solved this by closing the Moffett->Castro side of that intersection entirely. You can still go Castro->Moffett, but they're planning on closing that to eliminate the grade crossing entirely.

8h agoHN ↗

There's a major arterial near my house. One day, the power went out in the area, and the traffic lights went dead. I discovered to my amusement that throughput on the arterial and its crossings increased dramatically, as drivers simply cooperated with each other.

There are already cameras on top of all the lights. How hard can it be to hook them up to AI that is instructed to maximize throughput? The current system will block 3 directions while having a green light on the 4th which has no traffic.

I once complained to a friend about this, and he told me that the traffic engineers were experts and I was lying. The next day I was driving on that road, and got a red light. You could see on down the distance 3 greens. There was no other traffic, and no cross traffic. So I sent him a photo. He conceded :-)

8h agoHN ↗

I guess the main reason traffic lights exist is to avoid incidents, not necessarily to maximize throughput. Maximizing throughput is just a nice no have, and so no one bothers. Just a guess though, I've no idea what I'm talking about.

8h agoHN ↗

How hard can it be to hook them up to AI that is instructed to maximize throughput? The current system will block 3 directions while having a green light on the 4th which has no traffic.

You don't need AI for that, you just need the system configured properly. Lights near my parents' house have been running cycles adapted to actual traffic for at least two decades, probably three... although using inductive loops in pavement rather than cameras.

There are reasons you might want a short green every so often even with no detected traffic... it would help manage worst case situations for a stuck open detector, etc. But those wasted greens shouldn't be long enough to notice. You might also have situations where locally suboptimal behaviors improves performance or safety elsewhere and that may lead to a better overall system results. I'm not claiming this is the situation in your scenario, but it can explain some negative experiences.

7h agoHN ↗

Red lights also regulate speed, although I don't know if they are intentionally de-optimized from green for this reason.

1h agoHN ↗

I often hear that the lights are timed. I've never encountered a street where they were timed.

53m agoHN ↗

I've certainly seen it in places... There's routes I drove where if you had a green and you keep within narrow speed ranges, you get greens, and if you go at the inbetween speeds, you get reds. Some of those might not be 100% consistent if something interrupts the regular cycle like a pedestrian crossing or an emergency vehicle.

Otoh, Milwaukee circa 2003 had all the lights on a schedule. Every intersection made the same changes every day. Super frustrating when I was consistently slow to get out of the house for a scheduled pickup and missed the light everytime.

7h agoHN ↗

There are already cameras on top of all the lights.

Those are infrared sensors that pick up the heat from car engines. They've had to be modified to pick up electric cars.

How hard can it be to hook them up to AI that is instructed to maximize throughput?

The equipment cabinet at the intersection has been engineered to prevent all sorts of fatal things that happened in the past. Such as one set of relays being stuck so that one direction always gets a green light while the other direction gets red/yellow/green. They're designed so that can never happen again (when "broken", you'll see blinking red in all directions).

The controllers need to be standardized so that you don't need experts to be able to diagnose & repair them. They also need to be certified. It is not possible to certify an expert system (or as they're now called "AI") because it is not possible to use formal methods to prove correctness.

The current system will block 3 directions while having a green light on the 4th which has no traffic.

That specific intersection is set on a timer. For a single, 2-lane each way, non-complicated intersection, it can cost $100k for the lights, poles, sensors and equipment cabinet. Every wire is underground in pipes so that the expansion of concrete in weather won't stretch/break the wires.

as drivers simply cooperated with each other.

That's something that most people learn in kindergarten: "share with others" and "take turns".

Where I live (fly-over country), when the power is out, traffic backs up significantly.

Disclaimer: I used to work for my state's combination DMV & highway department.

7h agoHN ↗

Actual "Expert systems" could in principle get certified because they have explicable behaviour. The juice isn't worth the squeeze but it could be done. However the LLMs do not, we don't really know why this does anything even vaguely useful and we can't say if it might fail, or how we'd know. Useless.

5h agoHN ↗

Those are infrared sensors that pick up the heat from car engines. They've had to be modified to pick up electric cars.

Do they pick up ICE motorcycles ? Electric motorcycles ?

1h agoHN ↗

I'm sorry, but that all sounds like excuses. None of it looks like it should impede using AI-developed algorithms.

Heck, an AI isn't even needed. A simple cost function could be easily developed, where each car accrues priority as it waits, and the lights go green on the ones with the highest priority.

5h agoHN ↗

I used to work at a traffic signal controller company. We were under strict orders not to use AI. We did anyway, in a simulation, and let it optimize over the weekend. When we got back it had blown all of our previous attempts out of the water. We huddled around my coworker's workstation eager to see its masterful new pattern. It just made one phase red all the time and one phase green all the time, effectively closing one road. The throughput on the other road was through the roof though, since its light was always green. We did not present these results to the boss.

1h agoHN ↗

A parameter that gives a max wait time for cross traffic is needed.

3h agoHN ↗

A lot of lights exist not to add throughput, but to replace 2-way stops where less performant traffic (so like idiots, grandmas and heavy trucks) would have problems getting in, say fuggit (or get honked at, get flustered) and cause a near miss at least.

48m agoHN ↗

Yeah, my city traffic engineer is an ass too. There was an intersection I went through every time I left my old house. Outside of rush hour, it functioned much better as a four-way stop than a signalled intersection. I pointed this out and he said “that is inappropriate for two arterials”. Um, I live there. You don’t.

8h agoHN ↗

I highly recommend Traffic Light Doctor on YT, if you're into this sort of thing.

7h agoHN ↗

Better not, it would just get me even more pissed off at how crude and incompetent German traffic engineering is. Pretty sure some frustrated worker is making it worse on purpose - you don't reach certain peaks of crappiness accidentally, it takes _work_.

6h agoHN ↗

Can't speak to Germany, but one thing I like in the Netherlands is that if you approach an empty intersection the light will automatically turn green for you. Have never seen anything like that in North America.

And the roads themselves are good in NL (huge contrast when I moved to Montreal, where we'd have a metal mesh underneath bridges to catch falling concrete)

1h agoHN ↗

According to Claude, NL only has 5500-6000 signaled intersections and of those approximately 900-1450 are of the type you are suggesting (iVRI). The benefit is also higher in NL due to the density and amount of cyclists. iVRI is also not latency sensitive and so installation costs are low as signaling can traverse the regular cellular network.

In the US, we have many more lights due to the road layout (grid). There are more than 3200 signaled intersections in my county in California alone despite being 1/14th of the land area of the NL.

The robot also estimates that there are 300,000 signaled intersections in the US. We honestly don't know how many there are because they are all operated by different agencies.

For US arterial roads iVRI has limited benefit. So the focus in the US has been on V2X development which focuses more on crash avoidance and has much higher installation costs due to latency requirements. In the end there's a lot of low hanging fruit here in the US if signals could just be retimed.

https://transportationops.org/publications/2012-national-tra...

NL has one procurement entity. In the US there is no single coordinating entity to standardize traffic lights. Each state standardizes its own lights and then each municipality handles its own procurement.

5h agoHN ↗

you don't reach certain peaks of crappiness accidentally, it takes _work_.

Have you really never seen what happens when something grows organically without global maintenance? Not saying that this is what happened in Germany, but "it takes work" sounds naive.

It doesn't take work to write a crappy codebase: all you have to do is add code without really caring about the overall architecture.

Or said differently, if you can fix the German traffic engineering, you should apply there because I'm sure they would be happy to have an easy and perfect solution.

5h agoHN ↗

came here to say that also...its like 1 of 5 reasons I still use instagram, did not know he was on YT.

8h agoHN ↗

I always thought that traffic signals should be trying to minimize squared anger, where anger increases linearly with time spent waiting at intersection.

1h agoHN ↗

one thing that drives me nuts is a left turn arrow that isn't long enough to clear all the cars waiting in the left turn lane. So often, it would only need another 5-10 seconds but it seems to have a limit that it can't exceed. This leads to frustrated drivers trying to squeeze through on the yellow light or even the red.

Also red left turn signals should not be a thing. If there's a gap in the oncoming traffic you should be allowed to turn left across it as long as the straight-ahead traffic has a green light.

6h agoHN ↗

As sensors become more ubiquitous and computing power increases, traffic management may slowly but surely be relegated from civil engineers to software developers and data scientists. But, that also means that ASCT systems may be more vulnerable to security threats, a scary thought if they’re controlling the signals for an entire city.

I feel like software engineers would write more secure software than civil engineers. It would be the opposite. I'm also not scared that much of someone controlling traffic lights. It's already possible using emergency lights.

4h agoHN ↗

One thing that I noticed about traffic lights in CA -- there will be like 4-5 cars who are driving on the major road and approaching the traffic light. Then a car arrived from the small road at the intersection. The traffic light will then turn red for cars on the major road, so all 4-5 cars will brake and stop at the light. The small car proceed to turn left into the major road. A few seconds later, the light for the major road turns green again and the 4-5 cars proceed.

I have seen this so often that I sometimes wonder if it'd be more fuel efficient to let the 4-5 cars on the major roadway proceed (the traffic lights have cameras anyway) while letting the one car from the small street wait slightly longer or wait for a fixed amount of time.

I wonder if there's any traffic engineer on HN from California and if so, I'd love to hear an explanation/rationale behind the current approach.

3h agoHN ↗

I live in BC near a highway intersection and in my experience they seem to do what you suggest.

I approach from my street and if the highway is empty, almost instant green. Otherwise I have to wait some time until the road clears. During peak hours when the road doesn’t clear, it just seems to go green after a fixed time.

3h agoHN ↗

My son and I observed similar behaviour at a puffin crossing on the way to his school, and we’re buildng a model of it using an Arduino Uno with a RCWL-0516.