Spaces:
Running on Zero
Running on Zero
File size: 5,138 Bytes
b10f424 a948328 8994edc a948328 8994edc a948328 8994edc a948328 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # Measured replay and car black box
Recording runs the selected unchanged policy in one fresh native CPU drive, including when the policy was trained on GPU. It is not a recording of an earlier training population. Physics and decisions run at 60 Hz with batch_count=1; snapshots are saved at tick 1, every sixth tick and the requested endpoint (5 or 15 seconds). The new single-pass recorder replaces repeated prefix runs. No commands or sensor values are reconstructed in the browser.
Playback starts paused. Full-circuit and follow cameras are manual. Previous/next sample selects actual measurements. Measured poses are the default; optional pose smoothing interpolates position/heading only. The inspector always displays the preceding actual native sample, not an interpolated control or sensor value.
The car black box shows post-physics position, velocity, heading, angular velocity, boost energy, active status, physical contact counter and statistics update count. Native control commands appear beside their normalized values applied by physics. The ordered sensor vector is copied from the inference cache that actually drove the controls, with its pre-physics decision tick. Held decisions retain their original tick; reset clears the cache. Missing output slots are native defaults, not claimed neural outputs. Hidden-layer activations and ray-hit positions are not recorded.
Contact and active-state events mark sampled intervals. A contact increase in (tick A, tick B] does not identify an exact impact tick, and the engine contact counter is not a count of unique crashes. Reward metrics are cumulative native statistics, not instantaneous reward contributions.
Version 2 JSON contains explicit capture provenance and phases, the ordered sensor descriptors/output slots, each frame's raw/applied commands, and its cached decision tick/input vector. The browser rejects mismatched selected track/policy hashes, missing samples, nonfinite values, invalid sensor layouts, normalization mismatches, future or backward decision clocks and decreasing contact counters. Legacy version 1 recordings remain viewable with controls/sensors explicitly unavailable. Open recording and Download recording support repeatable inspection without starting another simulation. Imported recordings are data, not authenticated provenance claims.
The native extension does not change CUDA kernels, GPU ABI, physics or evolutionary policy rules. An actual Linux CPU comparison checks old versus new physical samples exactly. Native cache tests check pre-physics inputs and last decision/reset semantics. GPU execution of the new candidate is a separate quota-checked release gate; CPU replay cannot establish general CPU/GPU or original-game parity.
## Suggested route overlay
The preview derives physical free space from each placed tile square minus the union of the native collision polygons. The renderer uses that exact vector geometry. The planner conservatively rasterizes the same geometry at 8 game units per cell; thin walls, dividers and isolated posts remain blocked, including cells only touched near a corner.
The saved connection order defines the route. Shared openings are found from both neighboring pieces, with separate opening components retained for split lanes. A clearance-weighted grid search plans within each assigned piece; a dynamic program chooses a continuous sequence of opening components across the lap. The saved start remains exact. An unsafe start, disconnected route or failed search reports unavailable without silently moving the start.
The cost uses exact sampled polygon distance rather than an approximate distance transform. Smoothing preserves the shared-opening anchors. Every final polyline segment, including closure and simplified chords, is certified continuously against the native walls and missing neighboring tile squares with a 32 game-unit margin, and must stay inside its assigned route tile. Work is bounded to 256 pieces, 6,000,000 expanded search nodes and 2,048 final points. Opening components are sampled at 8-unit intervals and represented by selected midpoints, so this is a bounded geometric guide rather than a complete or optimal planner.
Dashed yellow is the mask-derived suggestion and green is the recorded trajectory. The road shape comes from native polygons, without guessed rounded pavement or an overlaid nominal connection curve. Dark shapes show static wall polygons. The nearest-line distance uses the selected measured car sample, including when pose interpolation is enabled. It is not a reward or a driving-quality score. Changing tracks clears the suggestion and recording. Changing policy clears the recording but can retain this geometry-only suggestion.
This is a local geometric heuristic, not a guaranteed minimum-curvature or minimum-time path. It does not model vehicle dimensions, steering, grip, surface traction, braking, boost, opponents or dynamic collisions. Static wall clearance does not establish that a vehicle can follow it. It never changes policy inputs, rewards, training or physics. The overlay needs no GPU or simulator call.
|