Repository navigation
belief-material: the contract takes only JSON numbers, and visible obstacles sort stably - #163
Merged
Merged
Conversation
…stacles sort stably libcvc is twinning the belief-material controller (transfix/libcvc#1053, its NAV-BELIEF-MATERIAL-CONTROLLER-ROADMAP.md). Joe settled its two Python-side decisions: - E6: BeliefMaterialContract accepts only a string frame and real numbers. "5", true and null were stored as given; they are now refused. Integers are stored as floats, so to_meta writes 20.0 for a file that said 20, as the C++ to_meta does. - E5: scan_visible_geometry sorts by distance with kind="stable". Equal distances keep argwhere's row-major order, so the max_obstacles cutoff picks the same set on both sides. numpy's default sort is unstable on arrays of more than 16 entries. On the new test's 9 x 9 ring it picks a different cell at the cutoff. No committed result changes. There is no trained Austin checkpoint, and the route corpus does not depend on the obstacle order.
This was referenced Nov 8, 2026
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.
These are the two Python-side changes for libcvc's twin of the belief-material controller. The C++ spec is transfix/libcvc#1053 (
docs/roadmap/NAV-BELIEF-MATERIAL-CONTROLLER-ROADMAP.md), and Joe settled its decisions E1–E10 on the first-column picks. C1, the contract and inputs, depends on both.BeliefMaterialContractnow accepts only a stringfeature_frameand real numbers. Until now"5",trueandnullwere stored as given and validated throughfloat(); they are now refused. Integers are stored as floats, soto_metawrites20.0for a file that said20, as libcvc'sto_metawill (byte-compared by the golden).scan_visible_geometrysorts by distance withkind="stable", so equal distances keepargwhere's row-major order. Equal distances are common on a grid, and numpy's default sort is unstable on arrays of more than 16 entries. On the new test's 9 × 9 scene it picks (5, 5) at the cutoff where the stable order picks (3, 5). libcvc'svisible_obstaclesuses the same order.No committed result changes. There is no trained Austin checkpoint yet, and the route corpus does not depend on the obstacle order.
Tests:
test_contract_takes_only_json_numbers_and_a_string_frame(5 cases);test_contract_stores_integers_as_floats;test_visible_geometry_breaks_distance_ties_in_row_major_order.Locally on Windows, with the cvcpkg cp312 prefix (torch 2.8 CPU):
tests/test_belief_material_controller.py,test_austin_material_evaluation.pyandtest_austin_material_training.py: 40 passed;black --checkandruff check: clean.docs/MATERIAL_NAV.mddocuments both rules.The golden generator for libcvc's C1 (T-a in the spec) builds on this branch and follows as its own PR.