diff --git a/spatial/configs/dangling.json b/spatial/configs/dangling.json index 6886fd2..e166e32 100644 --- a/spatial/configs/dangling.json +++ b/spatial/configs/dangling.json @@ -21,7 +21,8 @@ "area.free", "dof.c6", "dof.c6r", - "dof.c6h" + "dof.c6h", + "dof.set" ], "val_families": [ "area.sup2h" diff --git a/spatial/generator.py b/spatial/generator.py index 62c24a7..301ca97 100644 --- a/spatial/generator.py +++ b/spatial/generator.py @@ -34,6 +34,10 @@ FAMILIES = { "dof.c6": {"domain": "freedom", "n_cons": 6, "hidden": 0}, "dof.c6r": {"domain": "freedom", "n_cons": 7, "hidden": 0}, "dof.c6h": {"domain": "freedom", "n_cons": 6, "hidden": 1}, + # the pure sub-skill: no intervention at all, so the answer is exactly "are + # all six axes covered". If this family cannot be learned, the edit families + # are not the problem -- the set readout is. + "dof.set": {"domain": "freedom", "n_cons": 6, "hidden": 0, "no_edit": 1}, } DOMAIN_OF = {f: spec["domain"] for f, spec in FAMILIES.items()} @@ -191,7 +195,7 @@ def _build_stability(rng, n_blocks: int, hidden: int, free: int = 0): # freedom: constraint sets, optionally redundant on one axis -def _build_freedom(rng, n_cons: int, hidden: int): +def _build_freedom(rng, n_cons: int, hidden: int, no_edit: int = 0): # the axes are drawn, so a family spans both verdicts with the same entity # count: six mates that cover every axis lock the part, six that cover five # do not, and the difference is invisible from the shape of the scene @@ -221,6 +225,8 @@ def _build_freedom(rng, n_cons: int, hidden: int): vis_ents.discard("F5") query = Query(kind="freedom", a="P") + if no_edit: + return ents, edges, query, visible, vis_ents, layers, ["iso"], {"length": "mm", "per_unit": 1} if n_cons == 7: # removing the duplicate must not change the verdict; that is the point query.edit = {"op": "remove_edge", "edge": "k6"} @@ -233,7 +239,8 @@ _BUILDERS = { "connection": lambda rng, spec: _build_connection(rng, spec["n_paths"], spec["hidden"]), "stability": lambda rng, spec: _build_stability(rng, spec["n_blocks"], spec["hidden"], spec.get("free", 0)), - "freedom": lambda rng, spec: _build_freedom(rng, spec["n_cons"], spec["hidden"]), + "freedom": lambda rng, spec: _build_freedom(rng, spec["n_cons"], spec["hidden"], + spec.get("no_edit", 0)), }