exp(spatial): 加入 dof.set 探针族,单独测"六个轴是否全覆盖"
dof.c6 的标注被"有无编辑"解释掉 0.789,真正要算集合的只剩无编辑那 40%。造一个 完全没有干预的族:答案就是"六个轴向是否全覆盖"。这一族学不会,说明问题在集合 读出而不是编辑交互。
This commit is contained in:
1 parent
dd906acf4b
commit
76533b7ec3
2 files changed
+11
-3
No files matched your search
@@ -21,7 +21,8 @@
|
|||||||
"area.free",
|
"area.free",
|
||||||
"dof.c6",
|
"dof.c6",
|
||||||
"dof.c6r",
|
"dof.c6r",
|
||||||
"dof.c6h"
|
"dof.c6h",
|
||||||
|
"dof.set"
|
||||||
],
|
],
|
||||||
"val_families": [
|
"val_families": [
|
||||||
"area.sup2h"
|
"area.sup2h"
|
||||||
|
|||||||
@@ -34,6 +34,10 @@ FAMILIES = {
|
|||||||
"dof.c6": {"domain": "freedom", "n_cons": 6, "hidden": 0},
|
"dof.c6": {"domain": "freedom", "n_cons": 6, "hidden": 0},
|
||||||
"dof.c6r": {"domain": "freedom", "n_cons": 7, "hidden": 0},
|
"dof.c6r": {"domain": "freedom", "n_cons": 7, "hidden": 0},
|
||||||
"dof.c6h": {"domain": "freedom", "n_cons": 6, "hidden": 1},
|
"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()}
|
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
|
# 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
|
# 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
|
# 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
|
# 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")
|
vis_ents.discard("F5")
|
||||||
|
|
||||||
query = Query(kind="freedom", a="P")
|
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:
|
if n_cons == 7:
|
||||||
# removing the duplicate must not change the verdict; that is the point
|
# removing the duplicate must not change the verdict; that is the point
|
||||||
query.edit = {"op": "remove_edge", "edge": "k6"}
|
query.edit = {"op": "remove_edge", "edge": "k6"}
|
||||||
@@ -233,7 +239,8 @@ _BUILDERS = {
|
|||||||
"connection": lambda rng, spec: _build_connection(rng, spec["n_paths"], spec["hidden"]),
|
"connection": lambda rng, spec: _build_connection(rng, spec["n_paths"], spec["hidden"]),
|
||||||
"stability": lambda rng, spec: _build_stability(rng, spec["n_blocks"], spec["hidden"],
|
"stability": lambda rng, spec: _build_stability(rng, spec["n_blocks"], spec["hidden"],
|
||||||
spec.get("free", 0)),
|
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)),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user