Repository navigation
docs(nav): spec the belief-material controller (GRL-SNAM#141's twin) - #1053
Merged
Merged
Conversation
GRL-SNAM#141 added BeliefMaterialController on top of the belief kernels libcvc already has. This spec covers its C++ twin, before any code: - the grl_snam.belief_material contract in a .cvcnm's meta, and the header and runtime refusals built on it; - the robot-relative obstacle and goal tokens, and the obstacle source both Austin tools use; - decide: the witness gate switching lam_soft; - coef_energy_net per agent inside sim_world, next to the coef_mlp (lam mode) or, later, instead of it; - goldens generated from the Python reference. Open decisions E1-E10 are in its section 9.
This was referenced Nov 8, 2026
transfix
added a commit
to CVC-Lab/GRL-SNAM
that referenced
this pull request
Nov 9, 2026
…stacles sort stably (#163) 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.
transfix
added a commit
to CVC-Lab/GRL-SNAM
that referenced
this pull request
Nov 9, 2026
T-a of libcvc's NAV-BELIEF-MATERIAL-CONTROLLER-ROADMAP.md (transfix/libcvc#1053, §6): the Python controller is the reference. The generator writes belief_material_controller_golden.{json,cvcnm}. libcvc commits them in src/cvc/tests/data, and its C1 test reproduces every case. Run python -m grl_snam.tools.belief_material_controller_golden --out DIR. It covers the C1 cases (the spec's G1-G5): - contract: 28 meta strings through from_meta. Accepted ones record the parsed values and to_meta(); refused ones record only the refusal. - header_check: the golden .cvcnm against 12 belief/patch settings. Each records the fields the refusal names: one field each, one case with two, and two within the 1e-6 tolerance. - runtime_check: 6 material_config constant sets (float32 k_sharp/d_hat, as libcvc holds them). - material_config_for: the gate horizon and margin MaterialRuntime derives on 8 cell widths. - obstacles: scan_visible_geometry after each agent's sense tick on the belief golden's scene (max_obstacles 36 and 5), plus a 9 x 9 scene of equal distances. - tokens: build_belief_material_controller_inputs for 3 belief cases x 3 ticks x 3 agents, plus a 7.5 m scale and a no-obstacle variant. Float32 values are written as raw bits. The net (d_tok 16, 1 layer, P 9 over 36 m) takes its weights from numpy's PCG64 stream, so the file does not depend on torch's initialisers. The test regenerates both files and compares bytes with tests/fixtures. .gitattributes keeps git from converting their line endings. C2 adds decide and rollout (G6-G7).
transfix
added a commit
to CVC-Lab/GRL-SNAM
that referenced
this pull request
Nov 9, 2026
…164) T-a of libcvc's NAV-BELIEF-MATERIAL-CONTROLLER-ROADMAP.md (transfix/libcvc#1053, §6): the Python controller is the reference. The generator writes belief_material_controller_golden.{json,cvcnm}. libcvc commits them in src/cvc/tests/data, and its C1 test reproduces every case. Run python -m grl_snam.tools.belief_material_controller_golden --out DIR. It covers the C1 cases (the spec's G1-G5): - contract: 28 meta strings through from_meta. Accepted ones record the parsed values and to_meta(); refused ones record only the refusal. - header_check: the golden .cvcnm against 12 belief/patch settings. Each records the fields the refusal names: one field each, one case with two, and two within the 1e-6 tolerance. - runtime_check: 6 material_config constant sets (float32 k_sharp/d_hat, as libcvc holds them). - material_config_for: the gate horizon and margin MaterialRuntime derives on 8 cell widths. - obstacles: scan_visible_geometry after each agent's sense tick on the belief golden's scene (max_obstacles 36 and 5), plus a 9 x 9 scene of equal distances. - tokens: build_belief_material_controller_inputs for 3 belief cases x 3 ticks x 3 agents, plus a 7.5 m scale and a no-obstacle variant. Float32 values are written as raw bits. The net (d_tok 16, 1 layer, P 9 over 36 m) takes its weights from numpy's PCG64 stream, so the file does not depend on torch's initialisers. The test regenerates both files and compares bytes with tests/fixtures. .gitattributes keeps git from converting their line endings. C2 adds decide and rollout (G6-G7).
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.
This is the spec for the C++ twin of GRL-SNAM's range-limited belief-material controller (CVC-Lab/GRL-SNAM#141,
grl_snam/belief_material_controller.py). The goal is that a.cvcnmv2 net trained bygrl-snam austin-material-traindrives in C++ and makes the same decisions. It is a spec only; there is no code here. It stops here so the design can be reviewed before C1.New:
docs/roadmap/NAV-BELIEF-MATERIAL-CONTROLLER-ROADMAP.md.NAV-BELIEF-MATERIAL-ROADMAP.md§6 andNAV_MATERIAL.mdeach gain a link to it.What it pins
metacontract (grl_snam.belief_material:feature_frame,feature_scale_m,k_sharp,d_hat_sdf_m,material_gate_trigger,geometry_d_hat_m).from_metaparses it: missing fields take their defaults, and an unknown field or no record is refused.from_cvcnm) runs againstbelief_material_paramsand the patch settings, and the runtime check (check_runtime) againstmaterial_config. Each reports all mismatches.material_config_for(contract, ..., cell_w)builds a passing config. It includes Python's 25 m gate horizon in cells; libcvc's default of 12 cells would look 180 m ahead on the Austin 15 m grid.feature_scale_m, with the f32 operation order spelled out. They are BIT exceptdist, which is within 1 ulp (numpy'snormmay go through BLAS).scan_visible_geometry), with a tie-order fix proposed.decide.lam_softis predicted if the gate is active and 0 if not. With the gate disabled it is fail-open, andlam_hardis never gated. The gate bit is BIT; the coefficients are FLOAT (the forward's tier). The predicted and effective coefficients are both returned.sim_world.set_material_controllerattaches on belief material only.lam: the net's lambdas next to thecoef_mlp's alpha/beta/gamma, the twin oflive_material_kwargs.decide_everysets the decision cadence, and the force-bias scale still applies.full(all six coefficients) is deferred to C4.Open decisions (§9)
sim_worldmode;coef_mlprefusal;Work breakdown
decide, rollout; FLOAT goldens), C3 (sim_world, modelam), C4 (modefull, later).