关于「实战工具与检查器规格:双账本台账、判红规则与预注册检验」,《效用、真实与双账本》给出的定量结论是什么?
结论:第八章给出实战工具与检查器规格、台账字段与预注册检验。全书以标注框区分已发表证据、可运行计算(22 段程序)、原典与作者假说。
数据口径:书中参数与数据均为示意或合成,全部计算由书中程序生成;本书不是医疗建议,不提供任何临床心理服务,不是个人投资建议,不承诺任何收益;功能性信念只用于自己的行动框架,不用于欺骗他人。 第六章建立双账本:行动框架可按效用编码,概率账以 Brier 分数校准,硬边界账不让步;框架改写概率账时,示意破产比例从 0.0925 升到 0.7055。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库
| history 60, calibration gap +0.0850, Brier 0.2165, ledger AMBER | ||||||
| id | p_cal | Kelly cap | stake/cap | ruin | grade | rules |
| D1 | 0.515 | 0.1917 | 0.10 | 0.0000 | GREEN | - |
| D2 | 0.615 | 0.3583 | 0.08 | 0.0000 | RED | R1 |
| D3 | 0.465 | 0.1975 | 0.10 | 0.0000 | RED | R4 |
| D4 | 0.535 | 0.0700 | 3.57 | 0.4136 | RED | R2 R5 |
| D5 | 0.495 | 0.1583 | 0.19 | 0.0000 | RED | R3 |
| D6 | 0.415 | 0.1225 | 0.41 | 0.0025 | AMBER | R3 |
| D7 | 0.575 | 0.2917 | 0.55 | 0.0114 | AMBER | R2 R5 |
| D8 | 0.535 | 0.2250 | 0.09 | 0.0000 | GREEN | - |
查看完整验算程序
# Chapter 8. p81: the dual-ledger and hard-boundary checker, demo run
# Same core as distill/tool.py; its no-argument demo prints these lines.
# History: 60 resolved forecasts from a synthetic ledger that states
# probabilities 0.06 above what happens (fixed seed). Calibration gap =
# mean stated minus observed frequency; Brier score of the history.
# Each open decision is checked:
# R1 frame rewrote the ledger: p raised over p_before, no new evidence
# R2 stake against the Kelly cap on the CALIBRATED p (p minus the gap)
# R3 a hard boundary broken (feasibility, runway, single loss) while
# the decision is marked to execute; on hold it is only flagged
# R4 a forecast with no due date
# R5 ruin chance of repeating the stake with the calibrated p: the
# chance that wealth hits 0.2 of its start before it doubles, by
# the drift-diffusion barrier formula on log wealth
# Grades: RED if any red rule fires, else AMBER if any amber, else GREEN.
import math
import random
GAP_AMBER, RUIN_RED, RUIN_AMBER, FLOOR = 0.05, 0.05, 0.01, 0.2
DEMO = [ # id, p_before, p, evidence, due, stake, odds,
# feasible, runway, min_runway, loss_share, loss_cap, execute
("D1", 0.60, 0.60, 0, 30, 0.02, 1.5, 1, 240, 90, 0.02, 0.10, 1),
("D2", 0.45, 0.70, 0, 45, 0.03, 1.5, 1, 240, 90, 0.03, 0.10, 1),
("D3", 0.55, 0.55, 0, 0, 0.02, 2.0, 1, 240, 90, 0.02, 0.10, 1),
("D4", 0.62, 0.62, 0, 60, 0.25, 1.0, 1, 240, 90, 0.25, 0.30, 1),
("D5", 0.58, 0.58, 0, 30, 0.03, 1.5, 1, 60, 90, 0.03, 0.10, 1),
("D6", 0.50, 0.50, 0, 90, 0.05, 2.0, 0, 240, 90, 0.05, 0.10, 0),
("D7", 0.66, 0.66, 0, 30, 0.16, 1.5, 1, 240, 90, 0.16, 0.20, 1),
("D8", 0.50, 0.62, 1, 30, 0.02, 1.5, 1, 240, 90, 0.02, 0.10, 1),
]
def demo_history():
rng = random.Random(42781)
hist = []
for _ in range(60):
p = rng.choice((0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9))
hist.append((p, 1 if rng.random() < p - 0.06 else 0))
return hist
def calibration(hist):
gap = (math.fsum(p for p, _ in hist)
- len([1 for _, o in hist if o])) / len(hist)
brier = math.fsum((p - o) ** 2 for p, o in hist) / len(hist)
return gap, brier
def kelly(p, odds):
return max(0.0, (p * (odds + 1) - 1) / odds)
def ruin(p, stake, odds):
up, down = math.log(1 + odds * stake), math.log(1 - stake)
mu = p * up + (1 - p) * down
var = p * (1 - p) * (up - down) ** 2
lo, hi = math.log(FLOOR), math.log(2.0)
if abs(mu) < 1e-12:
return hi / (hi - lo)
th = 2 * mu / var
return (1 - math.exp(-th * hi)) / (math.exp(-th * lo)
- math.exp(-th * hi))
def check(d, gap):
(did, p0, p, ev, due, stake, odds, feas, run, minrun,
loss, cap, exe) = d
red, amber = [], []
if p > p0 and not ev:
red.append("R1")
pc = min(0.99, max(0.01, p - gap))
k = kelly(pc, odds)
ratio = stake / k if k > 0 else float("inf")
if ratio > 1:
red.append("R2")
elif ratio > 0.5:
amber.append("R2")
bound = (not feas) or run < minrun or loss > cap
if bound and exe:
red.append("R3")
elif bound:
amber.append("R3")
if due <= 0:
red.append("R4")
r = ruin(pc, stake, odds)
if r > RUIN_RED:
red.append("R5")
elif r > RUIN_AMBER:
amber.append("R5")
grade = "RED" if red else ("AMBER" if amber else "GREEN")
return did, pc, k, ratio, r, grade, red + amber
def report(decisions, hist):
gap, brier = calibration(hist)
lines = ["history %d, calibration gap %+.4f, Brier %.4f, ledger %s" % (
len(hist), gap, brier, "AMBER" if abs(gap) > GAP_AMBER else "GREEN")]
lines.append("id p_cal Kelly cap stake/cap ruin grade rules")
for d in decisions:
did, pc, k, ratio, r, grade, rules = check(d, gap)
lines.append("%-3s %5.3f %9.4f %9.2f %6.4f %-5s %s" % (
did, pc, k, min(ratio, 99.99), r, grade,
" ".join(rules) or "-"))
return lines
for line in report(DEMO, demo_history()):
print(line)唯一数据源与引用
范雅福(Fan, Y.). (2026). 《效用优先于字面真实:演化适存度博弈、功能性信念重塑与物理硬边界母典》第 8 章「实战工具与检查器规格:双账本台账、判红规则与预注册检验」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-427 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026427,
author = {Fan, Yafu},
title = {When Utility Outperforms Literal Truth: Evolutionary Fitness-Payoff Games, Functional Belief Engineering and Physical Guardrails},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}