fix(spatial): 稳定性家族加入"无害编辑",打破"编辑⇒false"的一位捷径
基线表量出:三个训练家族的标签被"发生过编辑就答 false"完全可分(各 1.000), 模型在 10 个家族里有 6 个与该规则的分数逐位相同,说明四个结构件没有一个被用到。 稳定性家族此前唯一的编辑是移走基座 P,必然倒塌,于是"移走了东西"和"目标失去 支撑"在所有样本上是同一个事件。改为: - 增加诱饵块 D(坐在地面上、不承载任何东西、可见),移走它不改变结论; - 目标固定为 T;n_blocks>=3 时移走 U 也不改变结论; - 编辑分布:40% 移 P(倒塌)、35% 移无害块(无影响)、25% 不编辑。 同时把旧的可分配置留作对照 configs/cross_oneshot.json。
This commit is contained in:
1 parent
14f93019ac
commit
f5443278b9
3 files changed
+64
-12
No files matched your search
+20
-8
@@ -99,13 +99,21 @@ def _build_connection(rng, n_paths: int, hidden: int):
|
||||
|
||||
|
||||
def _build_stability(rng, n_blocks: int, hidden: int):
|
||||
# D is a decoy: it rests on the ground next to the stack and carries
|
||||
# nothing. Without it "something was removed" and "the target lost support"
|
||||
# are the same event on every sample, and a one-bit rule fits the whole
|
||||
# family -- measured: that rule scores 1.000 here while knowing no physics.
|
||||
ents = [Entity("G", "ground", attrs={"plane": 0}),
|
||||
Entity("P", "block", attrs={"box": [40, 40, 0, 60, 60, 20]}),
|
||||
Entity("T", "block", attrs={"box": [42, 42, 20, 58, 58, 36]})]
|
||||
edges = [Edge("kPG", "contact", "P", "G"), Edge("kPT", "contact", "T", "P")]
|
||||
Entity("T", "block", attrs={"box": [42, 42, 20, 58, 58, 36]}),
|
||||
Entity("D", "block", attrs={"box": [80, 40, 0, 100, 60, 16]})]
|
||||
edges = [Edge("kPG", "contact", "P", "G"), Edge("kPT", "contact", "T", "P"),
|
||||
Edge("kDG", "contact", "D", "G")]
|
||||
top = None
|
||||
if n_blocks >= 3:
|
||||
ents.append(Entity("U", "block", attrs={"box": [44, 44, 36, 56, 56, 48]}))
|
||||
edges.append(Edge("kTU", "contact", "U", "T"))
|
||||
top = "U"
|
||||
vis_edges = {e.eid for e in edges}
|
||||
vis_ents = {e.eid for e in ents}
|
||||
layers = set()
|
||||
@@ -118,12 +126,16 @@ def _build_stability(rng, n_blocks: int, hidden: int):
|
||||
vis_edges.discard(e.eid)
|
||||
vis_ents.discard("P")
|
||||
|
||||
target = "U" if n_blocks >= 3 else "T"
|
||||
query = Query(kind="stability", a=target)
|
||||
# an edit can only name something the observation shows; with the pedestal
|
||||
# hidden the only legal edit is "nothing changes"
|
||||
if not hidden and rng.random() < 0.5:
|
||||
query.edit = {"op": "remove_entity", "entity": "P"}
|
||||
# the target is T on purpose: it survives every legal edit except the one
|
||||
# that removes P, so "removed something" no longer implies "answer false"
|
||||
query = Query(kind="stability", a="T")
|
||||
r = rng.random()
|
||||
if not hidden:
|
||||
harmless = top or "D"
|
||||
if r < 0.4:
|
||||
query.edit = {"op": "remove_entity", "entity": "P"} # collapses
|
||||
elif r < 0.75:
|
||||
query.edit = {"op": "remove_entity", "entity": harmless} # no effect
|
||||
return ents, edges, query, vis_edges, vis_ents, layers, ["front", "iso"], {"length": "mm", "per_unit": 1}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user