CodingTrain / CodingTrain/Suggestion-Box
Natural selection for traffic lights at a difficult intersection
- Dominant language
- No language data
- Stars
- 570
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
So I have a really annoying intersection right near where I live, and despite being on the main roads I always actively avoid it because the lights are always green at the wrong times. Today I thought this would be fun to code, finding the optimal times to have each light on. I've drawn up a rough idea of what the intersection looks like in Paint, here it is: [https://imgur.com/tHawph9](url)
It's complicated to convey the exact details in the image, but each road section has 2 lanes in each direction, I've shown the division with pink lines, so one can go straight and one can turn. Also, and this makes things easier, you get roughly equal traffic in each direction and roughly equal decisions for turning, so when given an option to turn it's basically a 50/50 probability each car will turn left or right (or straight depending on the position) (this is for cars driving on the right side of the road).
The reason this intersection is so problematic is the yellow region, because if you just constantly send cars into that region, it clogs up and you don't get anything through. It would be cool to see if you could assign weights and probabilities of green or red lights with respect to, say, which other lights are on and how long the current light has been on or off, with the aim of optimising traffic flow.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.