5D Library › 沙盘、宿命与主动推理 · English
第八章 实践与预注册试验
第一部分 四步贝叶斯审计
前七章可以归结为一份可以自己做的审计。它用一个月的简单记录,检查一个可能自我维持的模式。记录只需要一个笔记本或手机备忘录:每当发生一次让你失望的人际或工作事件,写下情境、你自己的第一个动作(敞开还是设防)和结果。
- 重复的挫折模式。 失望集中在哪类情境?(第一章、第二章)
- 自我证实的行为。 在这类情境中,结果是否随你自己的第一个动作而不同?(第二章)
- 感官输入的边界。 每天的信息输入中,有多少来自与你的真实处境无关的低信息量来源?(第三章)
- 高信息增益的微实验。 在风险可控的情境中,有意地换一种动作试若干次,记录结果,并用这些结果更新你的预期。(第四章、第五章)
推导
把审计用于一个虚构的月度记录。
# The four-step audit applied to one month of a (fictional) personal log.
# Each episode: (context, own first move, outcome). 'guard' = a pre-emptive defensive move.
from math import lgamma, exp, log
log_ = ([("proposal at work", "guard", "rejected")] * 7 + [("proposal at work", "open", "accepted")] * 3 +
[("proposal at work", "open", "rejected")] * 1 + [("proposal at work", "guard", "accepted")] * 1 +
[("family", "open", "accepted")] * 5 + [("family", "guard", "rejected")] * 2 +
[("new contact", "guard", "rejected")] * 4 + [("new contact", "open", "accepted")] * 2)
# Step 1 - repeated frustration: where do rejections cluster?
ctx = {}
for c, move, out in log_:
k = ctx.setdefault(c, [0, 0]); k[0] += out == "rejected"; k[1] += 1
print("1 repeated pattern:", ", ".join(f"{c} {r}/{n} rejected" for c, (r, n) in ctx.items()))
# Step 2 - self-confirming moves: rejection rate after one's own guard vs open move
for move in ("guard", "open"):
sel = [o for _, m, o in log_ if m == move]
print(f"2 after the move '{move}': {sum(o == 'rejected' for o in sel)}/{len(sel)} rejected")
# Step 3 - what crosses the boundary: daily input hours by source (from a screen-time export)
inputs = {"news and comment feeds": 2.5, "short-video feed": 1.5, "books and long reads": 0.5, "conversation": 1.0}
low = inputs["news and comment feeds"] + inputs["short-video feed"]
print(f"3 inputs: {low:.1f} of {sum(inputs.values()):.1f} h/day from low-information feeds ({low / sum(inputs.values()):.0%})")
# Step 4 - a micro-experiment: 10 deliberate 'open' proposals, logged as they happen.
remembered = (9, 1) # what memory says: 9 rejections, 1 acceptance (prior counts)
trial = (3, 7) # what the log shows: 3 rejected, 7 accepted
a, b = remembered[0] + trial[0] + 1, remembered[1] + trial[1] + 1
def beta_cdf(x, a, b, n=20000): # P(rate < x) by the midpoint rule
lb = lgamma(a) + lgamma(b) - lgamma(a + b)
h = x / n
return sum(exp((a - 1) * log((i + 0.5) * h) + (b - 1) * log(1 - (i + 0.5) * h) - lb) for i in range(n)) * h
for label, (aa, bb) in (("memory only", (remembered[0] + 1, remembered[1] + 1)),
("memory + experiment", (a, b)), ("experiment only", (trial[0] + 1, trial[1] + 1))):
print(f"4 {label:20s}: mean rejection rate {aa / (aa + bb):.2f}, P(rate > 0.5) = {1 - beta_cdf(0.5, aa, bb):.2f}")
# 1 repeated pattern: proposal at work 8/12 rejected, family 2/7 rejected, new contact 4/6 rejected
# 2 after the move 'guard': 13/14 rejected
# 2 after the move 'open': 1/11 rejected
# 3 inputs: 4.0 of 5.5 h/day from low-information feeds (73%)
# 4 memory only : mean rejection rate 0.83, P(rate > 0.5) = 0.99
# 4 memory + experiment : mean rejection rate 0.59, P(rate > 0.5) = 0.81
# 4 experiment only : mean rejection rate 0.33, P(rate > 0.5) = 0.11在这份虚构的记录里,失望集中在工作中的提案(12 次里被拒 8 次)和结识新人(6 次里 4 次)。第二步显示一个醒目的对比:先设防的 14 次里有 13 次被拒,先敞开的 11 次里只有 1 次。第三步显示,每天 5.5 小时的信息输入里有 73% 来自评论和短视频推送。第四步最能说明贝叶斯更新的意义:记忆里的「9 次被拒、1 次被接纳」给出约 0.83 的预期被拒率;10 次有意敞开的提案中只有 3 次被拒;把两者合在一起,预期降到 0.59。仅看实验本身则是 0.33。记忆本身也是一种有偏的输入,所以记录必须在事件发生时写下,而不是事后回忆。
注
第二步的对比不能直接读成因果:人往往是在已经觉得会被拒绝的情境中才先设防,所以「设防后被拒」可能部分反映了情境本身。第四步的微实验之所以重要,正是因为它让动作的选择不再由预感决定,从而把因果与选择分开。这份审计是一个自我观察的工具,不是心理评估;如果记录让你发现严重的痛苦或伤害,请寻求专业帮助。
第二部分 预注册试验
问题
与时间和讲师投入相当的常规阅读讲授课程相比,结构化的认知沙盘与牌卡推演工作坊,能否提高成年人在不确定决策中的定向探索?
设计
| 要素 | 规定 |
|---|---|
| 受试者 | 18–65 岁成年人,从公众中招募(不从作者的课程学员或社群中招募);排除正在接受精神科治疗或心理治疗、有已诊断的赌博障碍,以及近一个月参加过类似工作坊者 |
| 设计 | 平行两组随机对照试验;个体随机分配后组成 12 人一组的小班授课;按小班聚类分析 |
| 沙盘组 | 两次各 3 小时的结构化沙盘与牌卡推演:情境卡、角色卡与约束卡,按规则推演决定的后果,小组讨论,并为日常生活设计一个低风险微实验 |
| 对照组 | 两次各 3 小时的阅读讲授:同样的主题(预测、先验、探索与利用),阅读材料与讲授,小组讨论,但没有推演与微实验 |
| 讲师 | 同一批讲师按事先写定的手册讲授两种课程;讲师不参与任何测量 |
| 主要结局 | 课程结束一周后,在视野任务中拟合得到的定向探索参数(信息奖励)(Wilson et al. 2014),以基线值为协变量 |
| 次要结局 | 随机探索参数;爱荷华赌博任务最后 40 次选择的净得分 (Bechara et al. 1994);任务转换成本 (Monsell 2003);三个月后的定向探索参数;自报的日常尝试新做法次数 |
| 盲法 | 受试者知道自己上的是哪种课,无法设盲;测量完全由计算机实施,主持测量的研究助理与数据分析者不知道分组,分析代码在揭盲前写定 |
| 分析 | 线性混合模型(小班为随机效应),主要结局双侧 ;次要结局报告置信区间,不作确证性检验 |
设计中的几处修正
最初的设想是「双盲」试验。这里改为单盲(评估者与分析者盲):参与者必然知道自己是在推演牌卡还是在听讲,无法对他们设盲。用可以由计算机自动实施和评分的任务作结局,能在很大程度上弥补这一点。
主要结局选定为视野任务中的定向探索参数,而不是爱荷华赌博任务。爱荷华赌博任务在临床研究中使用广泛,但它的得分混合了学习、风险偏好和探索等多种成分,构念效度受到质疑 (Buelow and Suhr 2009);视野任务的设计正是为了把定向探索和随机探索分开测量 (Wilson et al. 2014)。爱荷华赌博任务保留为次要结局。
两种课程都在小班里进行,同班学员的结果会相互关联,所以样本量要乘以设计效应,分析也要按小班聚类 (Campbell et al. 2012)。
样本量
推导
# Sample size for a two-arm parallel trial. Primary outcome: the directed-exploration parameter
# (information bonus) fitted to the Horizon task (Wilson et al. 2014), one week after the course,
# analysed by ANCOVA adjusting for the baseline value. Effect expressed in baseline SD units.
import math
from statistics import NormalDist
N = NormalDist()
def n_per_arm(d, r=0.5, alpha=0.05, power=0.90):
"""Normal approximation; ANCOVA on a baseline correlated r with the outcome shrinks the
variance by (1 - r^2)."""
za, zb = N.inv_cdf(1 - alpha / 2), N.inv_cdf(power)
return math.ceil(2 * (za + zb) ** 2 * (1 - r ** 2) / d ** 2) + 1
def power(n, d, r=0.5, alpha=0.05):
za = N.inv_cdf(1 - alpha / 2)
return N.cdf(d / math.sqrt(2 * (1 - r ** 2) / n) - za)
for d in (0.3, 0.4, 0.5):
print(f"standardised effect {d}: {n_per_arm(d, power=0.80)} per arm for 80 % power, {n_per_arm(d)} for 90 %"
f" (baseline-outcome correlation 0.5)")
print(f"if the correlation is only 0.3, effect 0.4 needs {n_per_arm(0.4, r=0.3)} per arm for 90 %")
# Both courses are taught in groups of 12, so outcomes within a group are correlated (ICC assumed 0.02).
de = 1 + (12 - 1) * 0.02
n = math.ceil(n_per_arm(0.4) * de)
print(f"design effect for groups of 12, ICC 0.02: {de:.2f} -> {n} completers per arm "
f"(power without clustering would be {power(n, 0.4):.0%}); recruit {math.ceil(n / 0.85)} per arm allowing 15 % loss")
# standardised effect 0.3: 132 per arm for 80 % power, 177 for 90 % (baseline-outcome correlation 0.5)
# standardised effect 0.4: 75 per arm for 80 % power, 100 for 90 % (baseline-outcome correlation 0.5)
# standardised effect 0.5: 49 per arm for 80 % power, 65 for 90 % (baseline-outcome correlation 0.5)
# if the correlation is only 0.3, effect 0.4 needs 121 per arm for 90 %
# design effect for groups of 12, ICC 0.02: 1.22 -> 122 completers per arm (power without clustering would be 95%); recruit 144 per arm allowing 15 % loss按最小值得关注的效应 0.4 个标准差、基线与结局相关 0.5、90% 把握度计算,每组需要 100 人;考虑 12 人小班、组内相关 0.02 的设计效应 1.22,每组需要 122 人完成,按 15% 的脱落招募 144 人,即每组 12 个小班。基线与结局的相关、组内相关都是假设,将在 24 人的预试验中核对;如果基线与结局的相关低于 0.4,正式试验开始前重新计算样本量。
判定规则
推导
SESOI = 0.4 # smallest effect worth acting on, in baseline SD units of the directed-exploration parameter
def verdict(d, lo, hi):
"""d = sandbox-workshop arm minus reading-lecture arm (ANCOVA, standardised) with its 95 % CI.
Positive = more directed exploration. Fixed before any data are seen."""
if lo >= SESOI:
v = "more directed exploration, at least the smallest worthwhile effect"
elif lo > 0:
v = "more directed exploration; size not shown to reach 0.4"
elif hi < 0:
v = "less directed exploration than the reading-lecture course"
elif lo >= -SESOI and hi <= SESOI:
v = "no difference worth acting on"
else:
v = "unclear"
return f"effect {d:+.2f} ({lo:+.2f} to {hi:+.2f}): {v}"
# Invented results, to show in advance how the trial will be reported.
for res in ((0.15, -0.13, 0.43), (0.62, 0.42, 0.82), (0.05, -0.20, 0.30)):
print(verdict(*res))
print("Secondary outcomes (random-exploration parameter, Iowa Gambling Task net score,")
print("task-switching cost) are reported with intervals but cannot make the trial positive.")
# effect +0.15 (-0.13 to +0.43): unclear
# effect +0.62 (+0.42 to +0.82): more directed exploration, at least the smallest worthwhile effect
# effect +0.05 (-0.20 to +0.30): no difference worth acting on
# Secondary outcomes (random-exploration parameter, Iowa Gambling Task net score,
# task-switching cost) are reported with intervals but cannot make the trial positive.示例结果是编造的,用来事先说明结果将怎样报告。只有当效应的置信区间下限达到 0.4 时,报告才会说沙盘组带来了值得关注的提高;置信区间跨越 0.4 时,结论是「不清楚」。
这项试验不能说明什么
试验比较的是一种为期两次的工作坊与一种讲授课程,结局是实验室任务中的行为参数。即使结果为阳性,也不能说明工作坊改变了参与者生活中的重复模式,不能说明它对有心理困扰或创伤的人有效,更不能说明它可以替代心理治疗。实验室任务中的探索参数与日常生活中的行为之间的联系本身还需要研究;三个月随访和自报的日常尝试只是初步的线索。
伦理与利益冲突
试验须经独立伦理委员会批准,取得书面知情同意,并在第一位受试者入组之前登记方案和分析计划 (Chan et al. 2013; Nosek et al. 2018)。受试者按时间获得报酬,任务中的得分不涉及真实金钱赌博,受试者可随时退出。工作坊中如有参与者出现明显的痛苦,讲师按方案暂停并转介专业人员。
利益披露
作者以本书作为其社群认知课程、升维牌卡与 Yafu AI 知识库的底层方法论,因此与本书主题及第八章试验的结果有直接的商业利益关系。本书不推销任何课程、牌卡或产品,也不作任何健康或疗效声称;试验设计为由独立于作者企业的研究人员实施和分析;书中所有代码与研究方案均公开,供任何人检验。为限制利益的影响:受试者不从作者的学员中招募;两种课程的手册在入组前公开;无论结果如何,结果、数据和代码都将公开。
参考文献
Fan, Y. (2026). The Sandbox, Determinism and Active Inference: Markov Blankets, Variational Free-Energy Minimisation, Exploration-Exploitation Trade-offs and East Asian Causality in Computational Neuroscience [沙盘、宿命与主动推理] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23738794 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).