Repository navigation
plant_log: record vehicle contact; the power fit is judged on runs that hit no other vehicle - #875
Merged
Merged
Conversation
…at hit no other vehicle PlantLogPowerConvergence.FitsTheLedgerAndPredictsHeldOutSeeds has failed on every package-linux release lane since #782 added it (41673b3): the RoboRacer's held-out tick r2 is 0.598 against > 0.8, the same on every push run since. It was calibrated on Windows, where it is 0.91, and the Linux fit has not moved since. The runs that drag it down are city runs in which the vehicle hit another one. On Windows the RoboRacer's two worst held-out runs (-35%, -8%) are the only two that touched another vehicle: two contact ticks and two impact ticks each, then a long stall with the wheels spinning. Every other run is within 8%, though nearly every city run touches the scene's walls. On Linux, four of its city runs miss, by -52% to +31%. The planar power model has no collisions and no wheel spin (docs/NAV_TRAINING.md), so no term of its state sees that energy. Which runs collide depends on the platform's floating point. - planar_sample gains vehicle_contact: the other agent the vehicle touched that tick, from nav_plant::vehicle_contact_step (-1 none). - The test judges the held-out prediction on the runs that hit no other vehicle (no vehicle_contact and no impact past kImpactG), and requires them to be at least three quarters of the held-out runs. The others are printed with their errors. The fit itself is unchanged and still uses every run and tick. - docs/NAV_TRAINING.md: the measured table on that basis (Windows: Humvee r2 0.90, RoboRacer 0.97, 22 of 24 runs each), and the excluded runs.
transfix
added a commit
that referenced
this pull request
Nov 11, 2026
…rary (#1121) plant_log_scene.cpp's three seeded picks were std::uniform_int_distribution<std::size_t>: the city's and the bundle's scatter, the bundle's route goals in the 5-15% ring, and the city's new goal at each arrival. They are nav::detail::pick_below now (#1118's), as cvc::nav's own are. Checked by running one program built by MSVC 19.44, g++ 13.2 (libstdc++) and em++ 21 (libc++, under node): - With a 32-bit mt19937, uniform_int_distribution<std::size_t> on 64-bit libstdc++ and MSVC still takes the 32-bit Lemire path while the range is below 2^32 (libstdc++'s urngrange == UINT32_MAX branch; MSVC's _Rng_from_urng_v2 with one 32-bit draw and a 128-bit product): 0 of 260000 picks differ from pick_below, n from 1 to 2^32 - 1, the streams in step. The same with a mersenne_twister_engine<uint64_t, 32, ...>, which is glibc's std::mt19937 (uint_fast32_t is 64 bits there). libc++ masks and rejects: 237086 of 260000 differ. - So Linux and Windows draw what they drew. On Windows the drives are bit for bit the same before and after (every sample of the Humvee's and the RoboRacer's swerve and city, seeds 7, 100 and 101, 20 s), and so is physics_plant_log_test's output, the power fits included. - The speeds and the swerve's gates stay std::uniform_real_distribution<double>: libstdc++ and libc++ agree bit for bit, and MSVC's P0952R2 generate_canonical truncates where they round, at most 2^-53 of the canonical apart. It is two draws each on all three, and none of 160000 floats of the kind plant_log keeps from them differ. Tests: - PlantLogScene.CityStartsAreTheSameOnEveryStandardLibrary pins seed 7's eight Humvee starts as city cells, read back from the rear axles after the settle (each within 0.02 of a cell's centre). It passes against the library before this change too: these are the cells Windows drew. libc++'s draw began (5, 55), (57, 5), (20, 75). - No gate was loosened for macOS's plant-log draws. PlantLogPowerConvergence's collision filter (#875) is for Linux's and Windows' floating point, and stays. The bundle scene's ring pick is not driven by a test: it needs a city bundle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PlantLogPowerConvergence.FitsTheLedgerAndPredictsHeldOutSeedsis the only failing test on master's push runs (e.g. 40814344105, 40807834022), onpackage-linux / libcvc-release,-release-grpcand-release-grpc-static. PR runs skip it (it is inSTRESS_REGEX).Not a regression
Linux has failed it since #782 added it (41673b3, 10-24), with the same numbers every time. The RoboRacer's held-out tick r² is 0.598 against
> 0.8, and its fit (k_pos 1.470, k_neg -0.651, total -1.34%) is identical in:It was calibrated on Windows, where r² is 0.91. No commit since has moved the Linux result.
Root cause
The runs that pull r² down are city runs in which the vehicle hit another one.
nav_plant::vehicle_contact_step): the RoboRacer's two worst held-out runs, -34.9% and -7.8%, are the only two that touched another vehicle. Each had two contact ticks and two impact ticks, then a long stall with the wheels spinning (vx 0.16 m/s, 6.4 J of tire loss in one tick). Every other run is within 8%. Static contacts don't separate the runs: nearly every city run touches the walls 2-20 times and still fits.The plant log didn't record vehicle contact then, so whether these four are collisions is not yet shown. The push run below will show it.
docs/NAV_TRAINING.mdalready says the planar power model has no collisions or wheel spin, "so no term of its state can price them". Which runs collide depends on the platform's floating point.Fix
planar_sample::vehicle_contact: the other agent the vehicle touched that tick (-1 none), fromnav_plant::vehicle_contact_step, which existed but wasn't logged.vehicle_contactand no impact pastkImpactG. It requires those to be at least three quarters of the held-out runs. The others are printed with their errors.fit_poweris unchanged and still fits every run and tick, as its comment says.docs/NAV_TRAINING.md: the measured table on that basis, and the excluded runs.Tested
Locally (Windows, MSVC 14.44 Release, master 8380876 + this): all 13
physics_plant_log_testtests pass, and clang-format is clean.CI: PR runs skip this test, so the same commit is pushed to
ci/full/plant-log-vehicle-contactfor a push run with the heavy suites: run 40905620841. That run's Linux release lanes will show the Linux runs judged, the excluded ones and their errors (results to follow).