Progress Report on Yellow Brick Half-Plane

Status report on the key visual aspect of the Yellow Brick Half-Plane project, thanks to Uluc (@saranli)! This is all deep in the guts of Beebrain and, as usual in this thread, users don’t need to care about this at all, other than how the graph ends up looking, which is very much in flux.

Our technical term for this is days-to-derail (dtd) isolines. Oh and the yellow brick road (ybr) itself is now assumed to be zero width. It’s the bright line that you derail if you cross. Well, if you end the day on the wrong side of. So the ybr is the 1-day isoline. (Technically 0-day in the implementation right now. We have a big off-by-one error in everything that follows. See item #0 below.) The 2-day isoline is the boundary between being in the orange and being in the blue. Beyond 3 days of safety buffer is green. Seems simple enough so far but this is much easier said than done and Uluc is a literal genius.

(My favorite quote from when we were hashing this out and he wrote a Matlab script to figure out how it should work: “I just lifted the PPR function to the continuous domain as a vector, taken the integral of its negation and plotted a curve through its isopoints.”)

Here are questions and comments for each other as we get ready to ship this for a few intrepid guinea pigs:

  1. We’re currently drawing this with the first region closest to the road as red but you’re actually safe for more than 24 hours in that region so we need to shift all the colors. It’s the bad half-plane that’s red. The shading for the oinkzone (nee pinkzone) is kinda perfect but then we need another way to visually represent the oinkzone. Grayed out? Something like caution tape?

  2. The ppr() function in broad.js enforced ppr=0 for t < asof. We put in an option to that function to force computation of past PPRs as well so we can show colored regions for t < asof. Otherwise the entire region before asof appeared green, which is technically correct but not very useful. We want to see what the dtd margins looked like in the past.

  3. We haven’t yet implemented the yellow guiding lines for dtd > 7, but that will be really easy. We have the green region up until dtd - 7 for now, but any region between any two dtd values can be drawn. The algorithm Uluc devised can generically compute isolines for any dtd value, which are by definition guidelines anyway.

  4. The current color selection is too saturated; region colors should probably be less pronounced.

  5. If you open roadeditor_test.html in the browser, you should be able to edit the road and see the regions change in real-time.

  6. Regions can be somewhat unintuitive for doless goals, but we’re fairly certain they’re correct. Inflection points in isolines either coincide with t=t_node for inflection points on the road, or when they cross boundaries across which the ppr function changes.

  7. Palette optimization has not yet been done for png outputs, but we can do that once and for all once we decide on the colors.

  8. Uluc is lobbying for not cutting of the green region at the 7-day boundary as Dreev suggested. It might be ugly or confusing. Maybe much lighter colors but having the green region cover the half-plane all the way out. We can still have the yellow guiding line to indicate the special 7-day boundary.

  9. Still need to change the color and style of the centerline-cum-bright-derailment-line. Dreev was thinking it could be bright red or something. (The dotted line was a cute thing for emulating the painted line in the center of a physical road and doesn’t make sense in the new world order.)

Finally, there are some technically incorrect aspects of the isolines for do-more goals with downward sloping segments that we’re working on. Some parts of the isolines are closer to the actual derailment points on the road since they are offset from further parts of the road. A picture should make that make more sense:

Normally, that should just be a flatline up until the point where the isoline goes above the inflection point. (Uluc was hoping to avoid another pass over the isolines for monotonicity enforcement but probably not actually a big deal if that’s the best way to do it.)

Here is a do-less example:

For do-less goals with upward vertical slopes on the road, Uluc ensured consistency with very steep segments by shifting the dtd isoline by 2*delta where delta is the vertical displacement associated with that segment. That’s why you see weird looking blocky parts on the do-less graph above.

To get a better understanding, compare the following two graphs:

This way, regions don’t jump around when going from near-vertical to true vertical. We should probably do something similarly consistent for flat road segments, says Uluc. One possible interpretation for this vertical fix is that the PPR would be twice as much as the vertical displacement on the road. The ppr() function may also want to reflect that for consistency, but that’s probably an extreme edge case.

(PS: the centerline of the road appears wrong in those screenshots because it’s from the dynamic road editor which shows the centerline pre-edits.)

3 Likes