feat(spatial): 悬空关系与未知槽位,让"缺哪一段"落到位置而不是计数
此前"少了一条接触"只是全局计数,模型只能说"我在猜";它无法区分"目标根本没支撑" 和"目标的那条支撑被挡住了"。现在: - Observation.dangling:一端可见、另一端不可见的关系,锚在可见那一端,不带身份。 它说的是无知挂在哪儿,不是答案是什么。 - 模型多一个未知槽位(位置 1),悬空边的远端指向它;有悬空关系的锚定实体与它 相距一跳。一条链走到它上面,就是一条链走进了问题。 - 悬空边不参与连通计算、不进入实体的入射边求和、边特征里带 dangling 标志。 - 新增 area.free 家族:T 的唯一接触连到一个自身悬空的块,什么也没藏、什么也不悬空, 所以"没有支撑"是事实而非缺口,正确答案是 false,弃权才是错的。 它与 area.sup2h 构成最小对:同样是一条接触,一个通到未知、一个通到死路。
This commit is contained in:
1 parent
68380900ce
commit
40f6bb52fa
8 files changed
+251
-141
No files matched your search
+16
-6
@@ -86,12 +86,20 @@ class Edge:
|
||||
class Observation:
|
||||
"""What the model sees. Only visible items are stored here.
|
||||
|
||||
``hidden`` is the one thing here that is not visible, and it is deliberate:
|
||||
it counts what the full state contains that this view does not. Without it
|
||||
"nothing is there" and "it is behind the part" are the same input, and the
|
||||
two have different answers -- no reasoning can recover a distinction that
|
||||
the input never carried. It records counts by kind, never identities, so it
|
||||
says *that* a support is missing, not *which* one.
|
||||
``hidden`` and ``dangling`` are the two things here that are not visible, and
|
||||
they are deliberate.
|
||||
|
||||
``hidden`` counts by kind what the full state contains and this view does
|
||||
not. Without it "nothing is there" and "it is behind the part" are the same
|
||||
input, and the two have different answers -- no reasoning can recover a
|
||||
distinction the input never carried.
|
||||
|
||||
``dangling`` is the sharper form of the same idea: a relation whose one end
|
||||
is visible and whose other end is not. It carries no identity -- the anchor
|
||||
is the entity you can already see, never the one you cannot -- so it says
|
||||
*where* the unknown attaches, not *what* the answer is. A support that
|
||||
dangles still does not decide anything, which is why a chain that ends in a
|
||||
dangling edge is evidence of ignorance rather than evidence of support.
|
||||
"""
|
||||
|
||||
entities: list = field(default_factory=list)
|
||||
@@ -101,6 +109,7 @@ class Observation:
|
||||
hidden_layers: list = field(default_factory=list)
|
||||
hidden_faces: list = field(default_factory=list)
|
||||
hidden: dict = field(default_factory=lambda: {"entity": {}, "edge": {}})
|
||||
dangling: list = field(default_factory=list)
|
||||
|
||||
def entity_ids(self) -> set:
|
||||
return {e.eid for e in self.entities}
|
||||
@@ -114,6 +123,7 @@ class Observation:
|
||||
"hidden_layers": sorted(self.hidden_layers),
|
||||
"hidden_faces": sorted(self.hidden_faces),
|
||||
"hidden": {k: dict(sorted(v.items())) for k, v in sorted(self.hidden.items())},
|
||||
"dangling": [e.to_dict() for e in sorted(self.dangling, key=lambda x: x.eid)],
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user