自动化测试:造一批 多样的虚拟学生 → 跑游戏 → 元分析。用来在规模上验证 WTE 是否真的因人而异地轮换维度,以及抓回归。代码:
gaokao/eval/。Automated eval: generate a diverse batch of synthetic students → run the game → meta-analyze. Validates at scale that the WTE actually rotates dimensions per-person, and catches regressions. Code:
gaokao/eval/.
三部分 / Three parts
中文。
- 多样 profile 生成(
gen_profiles.py)——铺开一个轴的网格(不是自由生成,会聚堆):家庭压力(无/中/强) × 自我清晰度(清晰/迷茫) × 风险(稳健/冒险) × 价值倾向(物质/意义/声望/技能) × 地域(一线/省会/县城) × 去向(考公/就业/创业/考研/出国)。每格 → 一个 LLM 充实的 profile(自我描述 + 去向 + 3 个候选)。 - 无头批量跑(
run_batch.py)——每个 profile 合成画像 → 跑 N 站,记录每站 {场景, target_dim(人类维度), 问题, 排序}。并发。 - 元分析(
analyze.py)——维度轮换健康度、family-default 率、人类维度/场景覆盖、个性化、失败率。
English. (1) gen_profiles.py spans a grid of axes (not free-gen, which clusters). (2) run_batch.py runs each profile headless through N stages, logging per-stage {scene, target_dim, question, ranking}. (3) analyze.py computes rotation health, family-default rate, coverage, personalization.
结果 / Results
首批 First batch — 15 profiles × 4 stages (204s): rotation 3.47/4 · family-default 5% · personalization 15/15 · scene coverage 12/18(集中,5 个孤儿场景结构上够不到).
扩规模 + 修复后 Scaled + fixed — 24 grid profiles × 7 stages (460s):
| 指标 Metric | 结果 | 读法 |
|---|---|---|
| 维度轮换 rotation | 5.08 / 7 distinct (0.73 frac) | WTE 因人换维度 ✓ |
| family-default 率 | 6% (10/168) | 守住了(修复前 ~85%) ✓ |
| 个性化 personalization | 23/24 = 96% 独特维度集 | 不同 profile → 不同维度组合 ✓ |
| 场景覆盖 scene coverage | 18 / 18 distinct ✓ | 修复孤儿映射后,全部 18 个场景都够得到了(原先 12/18) |
| 人类维度覆盖 | 17 distinct(全部 14 + 变体) | material/truth/prestige/voice… 铺得开 |
| 失败率 | 0/24 | — |
两个修复 / Two fixes shipped (4566f5f):
- 场景覆盖 —— 原因是 5 个孤儿场景(课程·兴趣·信息差·热门内卷·考研门槛)没映射到任何人类维度 → WTE 永远选不到。给
scenes.json每个场景加probes:[human-dim]映射(0 孤儿)、把可照见维度喂进unified_turnprompt、并加”优先选没用过/更具体场景”的提示 → 12/18 → 18/18。 - 多样生成扩规模 ——
gen_profiles.py改成确定性 6 轴 720 格网格枚举 + 分批 LLM 充实 + 去重;N_PROFILES直接放大到几百/几千都有结构性多样(原来单次 LLM 生成过 ~30 就聚堆)。
全量 1K — 1000 grid profiles × 7 stages (6156s ≈ 1.7h, 996/1000 ok, 4 = 429 限流): 这是对「扩到 1000 还分散吗?」的直接回答 —— 分散。
| 指标 Metric | 24×7 | 1000×7 | 读法 |
|---|---|---|---|
| 维度轮换 rotation | 5.08/7 | 5.43/7 (0.78) | 规模越大反而更稳 ✓ |
| family-default | 6% | 3% | 守得更死 ✓ |
| 场景覆盖 | 18/18 | 18/18 | 全覆盖,均匀(经济与回报 930 · 外部噪音vs内省 859 · 代价与放弃 491 …) ✓ |
| 独特维度集 | 96% | 58% (580/996) | 1000 人里 580 种不同的维度组合;占比按鸽笼必然下降,但绝对多样性很健康 ✓ |
- target_dim 卫生: 97%(6784/6972)是 14 个规范人类维度;2.5% 把场景 key 错填进了 target_dim(ai_replaceability / postgraduate_and_barrier …),0.2% 是规范键的中/英变体。轻微噪音,不影响结论;待办:把 target_dim 收敛到 14 个规范键(校验/snap)。
truth_vs_protection(真实vs保护)是普遍性,不是卡死 —— ZH 问过:它在 24 局里被重复选(同一局出现 ≥2 次)只有 2/24,且只 1 局连出 3 次。它是近乎普世的张力(几乎每个人填志愿都在”对自己/对父母说真话 vs 维护期待”间),高频出现合理,不动它。
- 注意: 排序变化 0/24 是无头测产物(没模拟用户重排)——真人测才有重排信号。
复跑 / Re-run
N_PROFILES=24 python3 gaokao/eval/gen_profiles.py → STAGES=7 WORKERS=6 python3 gaokao/eval/run_batch.py → python3 gaokao/eval/analyze.py. 加大 N_PROFILES 即扩规模。
Related
world-turning-engine · ideal-preference-dimensions · scenes · log