Take the 2-minute tour ×  I've been wondering about this ever
since I was a little kid and I used to ride in the back of the
car and my mom would speed like hell towards a green light, only
to slam on the brakes when she realized she wasn't going to make
it.  Here is my question, loosely phrased: Given that we want to
make it across the intersection before the light is up, what
should be our position function? To make things precise, we
could specify some initial conditions, put a cap on the car's
acceleration/deceleration (or its speed or its jerk or
whatever), fix a probability distribution on when the light will
change, and assign some point values to our happiness if we make
the light vs. don't make the light vs. end up entering the
intersection after the light has changed and get a ticket for
it. And then of course we could throw in the extra curveball of
a yellow light warning you that it's about to turn red...  A
similar question arises if you're approaching a red light but
you think it might turn gree