feat(spatial): 观测声明自己的盲区(按类别计数,不含身份)
cond.p1 从 0.602 到 1.000 证实了这一点:缺的不是容量,是"我看不到什么"这个输入。
剩下 area.sup2h / dof.c6h 弃权率仍为 0,是同一个病在另两个域——生成器把底座/配合
藏起来了,却不让观测声明。
schema 增加 Observation.hidden:{entity: {kind: 数量}, edge: {kind: 数量}},
由 _observe 从"全状态减可见"自动导出,所以新增遮挡物不可能忘记声明。
只记数量不记身份:"少了一条接触"是能据以行动的事实,"少的是 kPT"是泄题。
scene 特征扩到 17 维:隐藏层指示、未见面的数量、各实体类别缺失数、各边类别缺失数、
是否有任何缺失、场景规模。
This commit is contained in:
1 parent
08153b987d
commit
515bee2f01
4 files changed
+37
-7
No files matched your search
+12
-2
@@ -115,14 +115,24 @@ def scene_features(sc: Scenario) -> list:
|
||||
the model as the same input with opposite labels. That is not an
|
||||
under-fitting problem; it is information the contract promised and the
|
||||
tensorisation dropped.
|
||||
|
||||
Counts by kind, not identities: "one contact is missing" is a fact the
|
||||
agent can act on, "kPT is missing" would be a leak of the answer.
|
||||
"""
|
||||
f = [0.0] * SCENE_DIM
|
||||
for layer in sc.obs.hidden_layers:
|
||||
if 1 <= layer <= 3:
|
||||
f[layer - 1] = 1.0
|
||||
f[3] = min(1.0, len(sc.obs.hidden_faces) / 6.0)
|
||||
f[4] = 1.0 if (sc.obs.hidden_layers or sc.obs.hidden_faces) else 0.0
|
||||
f[5] = len(sc.obs.entities) / 32.0
|
||||
hidden = sc.obs.hidden or {}
|
||||
for kind, cnt in (hidden.get("entity") or {}).items():
|
||||
if kind in ENTITY_KINDS:
|
||||
f[4 + ENTITY_KINDS.index(kind)] = min(1.0, cnt / 2.0)
|
||||
for kind, cnt in (hidden.get("edge") or {}).items():
|
||||
if kind in EDGE_KINDS:
|
||||
f[4 + len(ENTITY_KINDS) + EDGE_KINDS.index(kind)] = min(1.0, cnt / 3.0)
|
||||
f[-2] = 1.0 if (hidden.get("entity") or hidden.get("edge")) else 0.0
|
||||
f[-1] = len(sc.obs.entities) / 32.0
|
||||
return f
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user