From 76533b7ec3afdb1cc76dbdecd54f9e6190204151 Mon Sep 17 00:00:00 2001 From: x Date: Thu, 3 Dec 2026 20:33:28 +0800 Subject: [PATCH] =?UTF-8?q?exp(spatial):=20=E5=8A=A0=E5=85=A5=20dof.set=20?= =?UTF-8?q?=E6=8E=A2=E9=92=88=E6=97=8F=EF=BC=8C=E5=8D=95=E7=8B=AC=E6=B5=8B?= =?UTF-8?q?"=E5=85=AD=E4=B8=AA=E8=BD=B4=E6=98=AF=E5=90=A6=E5=85=A8?= =?UTF-8?q?=E8=A6=86=E7=9B=96"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dof.c6 的标注被"有无编辑"解释掉 0.789,真正要算集合的只剩无编辑那 40%。造一个 完全没有干预的族:答案就是"六个轴向是否全覆盖"。这一族学不会,说明问题在集合 读出而不是编辑交互。 --- spatial/configs/dangling.json | 3 ++- spatial/generator.py | 11 +++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) 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)), }