scorecard: mirror the cvc::nav Track-1 base fields (Python parity, Track 2) - #96
Merged
Merged
Conversation
…ack 2)
Bring the Python base scorecard field-for-field in step with the merged C++
cvc::nav base (transfix/libcvc #421-#424), so a grl-snam eval and a cvcdbg
dbg_arrival_check3 --episodes run report identical base numbers.
- NavCoverage dataclass (twin of nav_coverage) + compute_coverage reducer
(plane-major idx, broadcast single truth plane, believed_free/phantom over the
binary to_occupancy output — same p_thresh 0.5 / band 0.15 / optimistic).
- VehStats += convoy_id, formation_parent, slot_error_mean_m, formation_arrived,
stall_steps, closest_approach_m (1e30 sentinel), sense_flips, drive_steps,
{alpha,beta,gamma,mu,mrisk,ext_force}_mean.
- EpisodeStats.coverage; NavScorecard += the Track-1 scorecard fields (formation
rates, progress means, mean_coverage, mean_sense_flips, drive means) + to_dict.
- aggregate_nav mirrors the C++ reduction exactly: formation-mission convoy
keying, coverage over ALL episodes, sense_flips/stall over ALL runs, closest
over finite runs, drive means over drive_steps>0 runs (0-ULP, verified).
- test_scorecard.py += 7 cases pinned to the SAME hand-computed values as the C++
nav_stats_test feature-ON cases (formation 0.5/0.5/10.75; progress 4/2; coverage
0.625/0.25/0.625/0.25 -> means 0.5; sense_flips 5; drive a2/b4/g2/mu.5/mr.5/ext2).
Cross-language parity confirmed by an adversarial 3-lens review (aggregate /
compute_coverage / corpus): identical accumulators, divisors and branches; the only
constructible divergence needs an invalid convoy_id<0 (unreachable from the
collector) — documented as a >=0 contract. Stale cvc::dbg doc references corrected
to cvc::nav. 11/11 test_scorecard pass.
The collector-layer twin (from_nav_stats seeding the new per-step fields + a
formation_slot sampler hook) follows with the drive/training integration, mirroring
the deferred C++ sim_world wiring.
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.
Track 2 of the nav-stats cross-repo build — the Python twin of the merged C++
cvc::navbase (transfix/libcvc #421–#424). Bringsgrl_snam.scorecardfield-for-field and value-for-value in step, so a grl-snam eval and a cvcdbgdbg_arrival_check3 --episodesrun report identical base scorecard numbers.What lands (
grl_snam/scorecard.py)NavCoveragedataclass (twin ofnav_coverage) +compute_coveragereducer — plane-major indexing, a single broadcasttruthplane,believed_free/phantomover the binaryto_occupancyoutput (samep_thresh 0.5/band 0.15/ optimistic contract).VehStats+=convoy_id, formation_parent, slot_error_mean_m, formation_arrived, stall_steps, closest_approach_m, sense_flips, drive_steps, {alpha,beta,gamma,mu,mrisk,ext_force}_mean.EpisodeStats.coverage;NavScorecard+= the Track-1 scorecard fields (formation rates, progress means,mean_coverage,mean_sense_flips, drive means) +to_dict.aggregate_navreduction mirrors the C++ exactly: formation-mission convoy keying, coverage over all episodes, sense_flips/stall over all runs, closest over finite runs, drive means overdrive_steps>0runs.Parity
test_scorecard.py+= 7 cases pinned to the same hand-computed values as the C++nav_stats_testfeature-ON cases (formation0.5/0.5/10.75; progress4/2; coverage0.625/0.25/0.625/0.25→ means0.5; sense_flips5; driveα2/β4/γ2/μ0.5/mrisk0.5/ext2). 11/11 pass, ruff clean.An adversarial 3-lens cross-language review (aggregate / compute_coverage / corpus) confirmed 0-ULP parity — identical accumulators, divisors, and branches. The only constructible divergence needs an invalid
convoy_id < 0(unreachable from the collector; Python's dict is more robust than the C++ vector index) — now documented as a>= 0contract. Stalecvc::dbgdoc references corrected tocvc::nav.The collector-layer twin (
from_nav_statsseeding the new per-step fields + aformation_slotsampler hook) follows with the drive/training integration, mirroring the deferred C++sim_worldwiring.