Corridor alignment, then AI that actually races

· Dirt Bowl Rally

Progress

Closed t-7bd7 (OFF-002) and t-2624 (OFF-003). Trucks keep the May arcade loop (WASD, 4 trucks, 5 laps, 320×240) but the Frenet frame no longer uses a constant 6 px tube or Manhattan prev/next normals.

Learnings

Do not slide the 4-connected polyline toward the visual median along noisy normals. A first attempt grew lap length from 4042 to ~4700, reversed local order, and painted spaghetti through ponds. Measuring left/right width independently (and clamping lane per side) is safer than moving vertices.

A centered tangent window at hairpins/folds averages incoming and outgoing directions into a near-zero or 180° flip. Forward-only differencing plus “don’t smooth across >80° neighbors” keeps the start heading west-northwest, matching the first stretch.

AI progress must not treat the first start-line wrap as a finished lap, and the grid cannot sit on the fold. Both mistakes look like “they’re racing” in world space while place and rubber are lying.

A 46 px lookahead chord through a hairpin is an infield shortcut. The 28 px tube overlaps there, so the mask still says “on dirt” while Loic sees trucks outside the red/white fences.

Failures

Recenter-on-median was reverted. The authored BFS centerline is still not the painted dirt median (t-f1f9 / t-e31a). Overlay chords are downsampled so the ribbon is readable; physics still uses every sample.

First AI pass treated the grid wrap as a finished lap (totalProgress = trackLength), so rubber thought the pack was a lap ahead and place stuck at 4/4. A later launch put trucks 6–30 px behind s=0, where the fold tangent points east — one AI never left the gate.

Screenshots

Start grid with cyan centerline and magenta/yellow half-width ribbons over the dirt oval
Grid + corridor overlay — cyan path on dirt, ribbons toward the striped barriers (t-7bd7).
Trucks driving the first stretch with corridor overlay still hugging the oval
W cruise a few seconds in — player on dirt, heading along the west-then-north opening (t-2624).
Four trucks on the dirt oval mid-race, clustered on the painted corridor rather than a single-file rail
25 s W cruise — pack on the orange dirt, not Frenet rails (t-ai-race). Median spread ~208 on a 4042 lap.