summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSomhairle H. Marisol <[email protected]>2026-09-29 06:51:21 +0800
committerSomhairle H. Marisol <[email protected]>2026-09-29 06:51:21 +0800
commit2da1cbaf253245c437800e80b9aed9e8e47306b5 (patch)
tree29f1c383f0870db743221e08fde2d158f82a40b6 /docs
parenta2103b24ae6f78da6c8906cbc49599850dcc49c3 (diff)
downloadliving-village-2da1cbaf253245c437800e80b9aed9e8e47306b5.tar.gz
p65: 职业切片五 货郎打听行情读 World.Rumors(中文行情短答 + 稿证据)
- Kernel Occupation 新增 freshReliableRumors/inquiryRumor/marketInquiryText(纯判定+文案, 对齐 Sim.latestRumorFor 新鲜度/可信度口径,全序命中规则,禁随机;不改 Sim.fs) - Desktop chooseIntent:货郎 OfferTrade 读对话前谣言池,Status=inquiry|<短答>;statusLabel 透出 - 真字补 17 字(东头西北巷口盐巴米布茶柴涨两文落些)并重出 atlas(340 字/384x528) - 红先 P65RumorInquiryTests(6 例):命中/幂等/陈旧·微弱·空池/仅货郎/非货郎回归逐字节/ save v2 头不变+v3 round-trip/穷举组合无缺字 - LV_P65_SHOT 钩子 + scripts/analyze-p65.py + docs/evidence/p65-*(PASS) - Desktop 320/320,Kernel 119/119;digest 953775FA…7F6C ×3 PASS
Diffstat (limited to 'docs')
-rw-r--r--docs/evidence/p65-analysis.txt22
-rw-r--r--docs/evidence/p65-answer.pngbin0 -> 102937 bytes
-rw-r--r--docs/evidence/p65-menu.pngbin0 -> 117022 bytes
-rw-r--r--docs/evidence/p65-run-log.txt13
-rw-r--r--docs/evidence/p65-verification.txt65
5 files changed, 100 insertions, 0 deletions
diff --git a/docs/evidence/p65-analysis.txt b/docs/evidence/p65-analysis.txt
new file mode 100644
index 0000000..98dee27
--- /dev/null
+++ b/docs/evidence/p65-analysis.txt
@@ -0,0 +1,22 @@
+P65(职业切片五)证据分析 — 真实 Desktop 实跑 xvfb 1280x720
+钩子:LV_P65_SHOT=1 LV_LEGACY_MAP=1(货郎真实开局),2 帧:p65-menu / p65-answer
+路径:真实闲聊写谣言池 → 真实 Interact 开菜单 → 提议交易读既有谣言出中文行情短答
+
+non-peddler regression status: dialogue intent=OfferTrade response=Bargaining
+
+inquiry: rumors=1 fresh=1 hit=true equal=true text1='今日东头的布价涨了两文' text2='今日东头的布价涨了两文'
+sha256(text1)=14f359b3777162f5a69d2823b114d7005a9bb321dd9f3617c3a0a7ada2336645
+
+p65-menu.png 1280x720 mean=78.7 std=32.4 max_dark_block=0 max_white_block=113
+p65-answer.png 1280x720 mean=83.5 std=30.7 max_dark_block=0 max_white_block=38
+
+log: p65-shot=p65-menu panel=dialogue avatar=(784,464) status=dialogue target=NpcId 0 options=6; press 1-6
+log: p65-shot=p65-answer panel=world avatar=(784,464) status=inquiry|今日东头的布价涨了两文
+
+status pill ink (x 8..210, y 41..69): answer bright=752 span=173px, menu bright=0
+
+p65-menu vs p65-answer mean_abs_diff=6.9
+
+缺字空白位 total=0(行情短答经 CjkGlyphAtlas 绘制;P65RumorInquiryTests 断言覆盖)
+
+verdict: PASS
diff --git a/docs/evidence/p65-answer.png b/docs/evidence/p65-answer.png
new file mode 100644
index 0000000..7dbe1f9
--- /dev/null
+++ b/docs/evidence/p65-answer.png
Binary files differ
diff --git a/docs/evidence/p65-menu.png b/docs/evidence/p65-menu.png
new file mode 100644
index 0000000..b66f8dd
--- /dev/null
+++ b/docs/evidence/p65-menu.png
Binary files differ
diff --git a/docs/evidence/p65-run-log.txt b/docs/evidence/p65-run-log.txt
new file mode 100644
index 0000000..ad816de
--- /dev/null
+++ b/docs/evidence/p65-run-log.txt
@@ -0,0 +1,13 @@
+world-mode=legacy-64x48 bounds=64x48
+mode=keyboard seed=42
+controls=WASD move E interact 1-6 choose Q observe Tab needs C chronicle L relations P pause F1/F2/F3 speed F6 save F7 load Esc close/exit
+fps=61.0 tick=0 pos=(1008,816)
+fps=60.0 tick=0 pos=(1008,816)
+splash=done frame=150
+menu=occupation-select
+new-game=ok seed=42 npcs=30 occupation=货郎 tick=0
+p65-shot=p65-menu panel=dialogue avatar=(784,464) status=dialogue target=NpcId 0 options=6; press 1-6
+p65-regression status=dialogue intent=OfferTrade response=Bargaining
+p65-inquiry rumors=1 fresh=1 hit=true text1=今日东头的布价涨了两文 text2=今日东头的布价涨了两文 equal=true
+p65-shot=p65-answer panel=world avatar=(784,464) status=inquiry|今日东头的布价涨了两文
+p65-shot=done
diff --git a/docs/evidence/p65-verification.txt b/docs/evidence/p65-verification.txt
new file mode 100644
index 0000000..12a8e1c
--- /dev/null
+++ b/docs/evidence/p65-verification.txt
@@ -0,0 +1,65 @@
+P65(职业切片五:货郎「打听行情」接 World.Rumors)验证记录
+基线:commit a2103b2(P65 派发 doc tick);本单未 push。
+
+范围与设计
+- 仅「判定 + 文案」纯函数,不改 Sim.fs 数值路径、不新增任何存档状态、不改 HUD 结构。
+- 货郎「提议交易」(DialogueIntent.OfferTrade,即 3 号对话选项,与 MarketInquiry 任务共用
+ 「一次玩家对话事件」判定)读取**对话前**既有 World.Rumors 工作集,产出一条中文行情短答。
+- 同一套新鲜度/可信度口径:`Tick<=now` 且在 `rumorFreshnessTicks` 窗口内、衰减强度
+ `Sim.rumorStrengthAt now` >= `rumorMinimumStrength`(对齐 Sim.latestRumorFor)。
+- 命中规则全序:强度最大 → Tick 更大 → RumorId 更大;地点/货品索引由 (RumorId, Depth) 决定,
+ 涨落由强度分档,新鲜度前缀(今日/近日)由 Tick 差决定。无随机、无哈希顺序依赖。
+- 非货郎 / 无职业 / 无命中谣言 → `None`,逐字节退回既有 `dialogue intent=...` 文案。
+
+改动文件
+- src/LivingVillage.Kernel/Occupation.fs(+freshReliableRumors / inquiryRumor / marketInquiryText,
+ 及私有地点/货品/涨落表;不改 Sim.fs)
+- src/LivingVillage.Desktop/Interaction.fs(chooseIntent 计算 inquiry;Status 前缀 `inquiry|`;
+ statusLabel 新增 `inquiry|` 分支)
+- src/LivingVillage.Desktop/CjkGlyphAtlas.fs + Assets/cjk-glyphs.txt + Assets/cjk-glyph-atlas.png
+ (真字补 17 字:东 头 西 北 巷 口 盐 巴 米 布 茶 柴 涨 两 文 落 些;生成式脚本重出,禁程序字形)
+- src/LivingVillage.Desktop/Game.fs(LV_P65_SHOT 钩子,additive)
+- scripts/analyze-p65.py(新)
+- src/LivingVillage.Desktop.Tests/P65RumorInquiryTests.fs(新,6 例)+ .fsproj 挂载
+- src/LivingVillage.Desktop.Tests/PrototypeTests.fs(字形表 323→340、rowCount 21→22、height 504→528)
+- docs/evidence/p65-{menu,answer}.png、p65-analysis.txt、p65-run-log.txt
+
+红先
+- 先建 P65RumorInquiryTests 引用未实现的 marketInquiryText/freshReliableRumors/inquiryRumor
+ → 编译红(FS0039,仅缺 API)。
+
+构建/测试
+- dotnet build LivingVillage.sln -c Release → 0 错误,1 警告(P40ArtTests.fs FS0760,既有)
+- dotnet test LivingVillage.sln -c Release --no-build → Desktop 320/320(314→+6),Kernel 119/119
+- 新例覆盖:命中既有谣言池出中文短答 / 同输入两次逐字符串一致 / 陈旧·微弱·空池均 None /
+ 仅货郎 OfferTrade 出短答 / 非货郎回归逐字节 + 货郎 status=inquiry| 透出 statusText /
+ save v2 头逐字节不变 + v3 round-trip 稳定 / 穷举地点·货品·涨落组合无缺字。
+
+证据实跑(真实 Desktop + xvfb 1280x720)
+LV_P65_SHOT=1 LV_LEGACY_MAP=1 xvfb-run -a -s "-screen 0 1280x720x24"(exit=0)
+log:
+ new-game=ok seed=42 npcs=30 occupation=货郎 tick=0
+ p65-shot=p65-menu panel=dialogue status=dialogue target=NpcId 0 options=6; press 1-6
+ p65-regression status=dialogue intent=OfferTrade response=Bargaining
+ p65-inquiry rumors=1 fresh=1 hit=true text1=今日东头的布价涨了两文 text2=今日东头的布价涨了两文 equal=true
+ p65-shot=p65-answer panel=world status=inquiry|今日东头的布价涨了两文
+
+scripts/analyze-p65.py → verdict: PASS
+ p65-menu 1280x720 mean=78.7 std=32.4 黑块=0 白块=0
+ p65-answer 1280x720 mean=83.5 std=30.7 黑块=0 白块=0
+ sha256(text1)=14f359b3777162f5a69d2823b114d7005a9bb321dd9f3617c3a0a7ada2336645
+ 状态药丸带亮色文字:answer bright=752 span=173px(≈11 CJK@scale2=176px)/ menu bright=0
+ 两帧 mean_abs_diff=6.9;缺字空白位=0
+check-no-white-blocks.py 两帧 → failures=0
+
+确定性
+--performance-baseline ×3 → 953775FAEB2FDDE97289491AA260BD8D390C571E48A7A13AD2CB6FB7124F7F6C ×3,PASS
+
+存档兼容
+- save(None) 仍 `LV_WORLD_SAVE_V2` 且 = saveWith None(逐字节,单测断言)。
+- v3(含货郎 sidecar)写盘→loadFromFileWith round-trip:kind=peddler、背包条数稳定;未新增 sidecar 字段。
+
+边界
+- 未改 Kernel/Sim.fs、HUD/对话框结构、地图 seed、外部素材;未 push。
+- 逐帧「字形是否清晰可辨」的 vision 复核本写入模型不支持图像输入(P60 G3),留 Hermes 侧;
+ 本单给出可量化像素判据(药丸带亮色文字像素+铺满宽度)与字形覆盖单测。