Skip to content

Commit 5361a05

Browse files
committed
eventline: remove inferred outcomes and emit only observed deltas
1 parent 091a5c7 commit 5361a05

2 files changed

Lines changed: 7 additions & 10 deletions

File tree

scripts/observe_agent_eventline.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def _render_event(e: Event) -> list[str]:
123123

124124
if t == "social_attempt_end":
125125
return [
126-
f"- t={e.step} 社交结束:partner={_fmt(p.get('partnerEntityId'))} inferredSuccess={_fmt(p.get('inferredSuccess'))} socialDelta={_fmt_float(p.get('socialDelta'))} intendedRelief={_fmt_float(p.get('intendedRelief'))}"
126+
f"- t={e.step} 社交结束:partner={_fmt(p.get('partnerEntityId'))} socialDelta={_fmt_float(p.get('socialDelta'))} ({_fmt_float(p.get('socialStart'))}{_fmt_float(p.get('socialEnd'))}) intendedRelief={_fmt_float(p.get('intendedRelief'))}"
127127
]
128128

129129
return [f"- t={e.step} {t}: {json.dumps(p, ensure_ascii=False)}"]
@@ -147,7 +147,7 @@ def render_markdown(eventline_path: Path, from_step: int | None, to_step: int |
147147

148148
social_starts = sum(1 for e in events if e.type == "social_attempt_start")
149149
social_ends = [e for e in events if e.type == "social_attempt_end"]
150-
social_success = sum(1 for e in social_ends if bool(e.payload.get("inferredSuccess")))
150+
# No inference in eventline; success can be derived in downstream lenses if desired.
151151

152152
resource_attempts = [e for e in events if e.type == "resource_attempt"]
153153
resource_fail = 0
@@ -168,7 +168,7 @@ def render_markdown(eventline_path: Path, from_step: int | None, to_step: int |
168168
out.append("## 摘要\n")
169169
out.append(f"- 事件总数: `{len(events)}`(截断上限 maxEvents={max_events})")
170170
out.append(f"- 资源尝试: `{len(resource_attempts)}` 失败: `{resource_fail}`")
171-
out.append(f"- 社交尝试: start `{social_starts}` end `{len(social_ends)}` inferredSuccess `{social_success}`\n")
171+
out.append(f"- 社交尝试: start `{social_starts}` end `{len(social_ends)}`\n")
172172

173173
out.append("## 事件计数(按类型)\n")
174174
for k in sorted(counts.keys()):
@@ -204,4 +204,3 @@ def main() -> int:
204204

205205
if __name__ == "__main__":
206206
raise SystemExit(main())
207-

src/apps/runtime_cli/Main.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,8 +1012,7 @@ struct ResourceEconomy {
10121012
}();
10131013
meta["params"] = {
10141014
{"needDeltaAbsMin", 8.0},
1015-
{"socialSuccessDeltaFrac", 0.25},
1016-
{"notes", "eventline is sparse facts for one observed agent; not a full log"},
1015+
{"notes", "eventline is sparse facts for one observed agent; no outcome inference is performed"},
10171016
};
10181017
(*eventlineOut) << meta.dump() << "\n";
10191018
}
@@ -1141,13 +1140,12 @@ struct ResourceEconomy {
11411140
}
11421141
const float delta = socialNow - eventlineState.socialPrevNeedValue;
11431142
const float intended = std::max(0.0f, eventlineState.socialIntendedRelief);
1144-
const float successDeltaThreshold = -0.25f * intended;
1145-
const bool inferredSuccess = (intended > 0.0f) ? (delta <= successDeltaThreshold) : (delta < -0.5f);
11461143
emit("social_attempt_end",
11471144
{{"partnerEntityId", eventlineState.socialPartner},
11481145
{"intendedRelief", intended},
1149-
{"socialDelta", delta},
1150-
{"inferredSuccess", inferredSuccess}});
1146+
{"socialStart", eventlineState.socialPrevNeedValue},
1147+
{"socialEnd", socialNow},
1148+
{"socialDelta", delta}});
11511149
eventlineState.socialInProgress = false;
11521150
eventlineState.socialPartner = 0;
11531151
eventlineState.socialIntendedRelief = 0.0f;

0 commit comments

Comments
 (0)