Files
InfoRSI/tests/fixtures/rules/ablation.json
T
iomgaa 60c21ae346 feat: 研究规则 rules 模块(任务书 02)
rules 是纯计算,src/rules 共 1761 行:方法.md 第六部分的全部公式、第七部分的余额与扣次、4.2 的入口分配,以及种子与规则登记表。

预期值有三个来源:方法.md 的手算例;tests/fixtures/rules/ 下不看实现写的 Python 脚本;参考项目 calc15、calc14b 里与现行方法一致的部分。审阅做了两轮,每轮都换一个全新上下文的子 Agent,提出的问题都已修复或写明不修的理由。

用户确认的约定(原话"1–8 都同意"):入池、采纳、消融中发现都用严格不等号;成本用 max(0, ĝ₀);没测的格附"含它的最好组合"的净值;战绩在分数原值上判。三个数改为严格递增后,删掉了尖峰的全部专门处理(bfb96ba)。vocab 里 Range 的说明同步改为严格递增。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 01:50:21 -04:00

3863 lines
79 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"generator": "gen_ablation.py",
"tolerance": {
"exact": "有理数精确算出的量(G、撑、i、h、权重、成分期望收益、ĝ₀、voiFullExact、exactK1VOI、成本、m′):绝对误差 1e-12",
"grid": "网格 VOI 及由它得到的价值、净值:|差| ≤ 1e-12 + 1e-9·|值|(逐项浮点累加顺序不同,约 1e-13 量级)",
"discrete": "标签、选中组合、原因、押的因子、状态:必须完全相同",
"gridVsExact": "同一输入全测时 gridFullVOI 与 voiFullExact 的对照(两种算法之间,不是实现与本脚本之间):k ≤ 3 时 |差| ≤ 5e-4·|精确值|,k = 4 时 ≤ 3e-3·|精确值|;本脚本实测相对差 7.3e-6(calc15,k=2)、4.7e-5(minimize,k=2)、1.05e-4(r1real,k=3,s=5–7)、1.0e-3(fourCells,k=4,s=1 和 0)。理由:网格用小段中点代表整段,误差随小段宽度平方缩小、随格数增多(m 变小)变大;s ≥ 1 时各成分在小段内是均匀分布,max 是凸函数,按 Jensen 不等式网格值不会超过精确值,所以还可以断言 gridFullVOI ≤ voiFullExact + 1e-12(fourCells 有 s = 0 的格,不适用)。"
},
"models": {
"calc15": {
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"B": 0.9597642169962064,
"full": 2.6276819772628,
"knownBest": 2.635,
"direction": "maximize",
"cells": [
"p1",
"p2"
],
"explanations": [
{
"id": "e1",
"author": "researcher-1",
"cells": {
"p1": {
"q1": 1.4,
"q5": 1.75,
"q9": 2.1
},
"p2": {
"q1": 1.9,
"q5": 2.05,
"q9": 2.18
}
}
},
{
"id": "e2",
"author": "researcher-1",
"cells": {
"p1": {
"q1": 1.9,
"q5": 2.3,
"q9": 2.55
},
"p2": {
"q1": 1.8,
"q5": 1.95,
"q9": 2.1
}
}
},
{
"id": "e3",
"author": "researcher-1",
"cells": {
"p1": {
"q1": 1.65,
"q5": 2.05,
"q9": 2.4
},
"p2": {
"q1": 1.8,
"q5": 1.98,
"q9": 2.15
}
}
},
{
"id": "e4",
"author": "researcher-2",
"cells": {
"p1": {
"q1": 2.3,
"q5": 2.45,
"q9": 2.58
},
"p2": {
"q1": 1.85,
"q5": 2.02,
"q9": 2.18
}
}
},
{
"id": "e5",
"author": "researcher-2",
"cells": {
"p1": {
"q1": 1.5,
"q5": 1.95,
"q9": 2.35
},
"p2": {
"q1": 1.9,
"q5": 2.06,
"q9": 2.2
}
}
},
{
"id": "e6",
"author": "researcher-2",
"cells": {
"p1": {
"q1": 1.8,
"q5": 2.05,
"q9": 2.3
},
"p2": {
"q1": 1.85,
"q5": 2,
"q9": 2.15
}
}
},
{
"id": "e7",
"author": "researcher-3",
"cells": {
"p1": {
"q1": 1.9,
"q5": 2.15,
"q9": 2.4
},
"p2": {
"q1": 1.95,
"q5": 2.1,
"q9": 2.2
}
}
},
{
"id": "e8",
"author": "researcher-3",
"cells": {
"p1": {
"q1": 2.25,
"q5": 2.45,
"q9": 2.55
},
"p2": {
"q1": 1.7,
"q5": 1.9,
"q9": 2.05
}
}
},
{
"id": "e9",
"author": "researcher-3",
"cells": {
"p1": {
"q1": 1.7,
"q5": 1.95,
"q9": 2.2
},
"p2": {
"q1": 1.85,
"q5": 2,
"q9": 2.15
}
}
}
]
}
},
"r1real": {
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"B": 0.9597642169962064,
"full": 1.552176048093269,
"knownBest": 2.635983,
"direction": "maximize",
"cells": [
"p1",
"p2",
"p3"
],
"explanations": [
{
"id": "r1-e1-1",
"author": "researcher-1",
"cells": {
"p1": {
"q1": 1.2,
"q5": 2,
"q9": 2.44
},
"p2": {
"q1": 1.49,
"q5": 1.54,
"q9": 1.58
},
"p3": {
"q1": 2.3,
"q5": 2.44,
"q9": 2.45
}
}
},
{
"id": "r1-e1-2",
"author": "researcher-1",
"cells": {
"p1": {
"q1": 1.22,
"q5": 1.4,
"q9": 1.52
},
"p2": {
"q1": 1.49,
"q5": 1.54,
"q9": 1.58
},
"p3": {
"q1": 1.2,
"q5": 1.42,
"q9": 1.55
}
}
},
{
"id": "r1-e2-1",
"author": "researcher-2",
"cells": {
"p1": {
"q1": 1.05,
"q5": 1.35,
"q9": 1.95
},
"p2": {
"q1": 1.44,
"q5": 1.53,
"q9": 1.59
},
"p3": {
"q1": 0.85,
"q5": 2.4,
"q9": 2.45
}
}
},
{
"id": "r1-e2-2",
"author": "researcher-2",
"cells": {
"p1": {
"q1": 0.95,
"q5": 1.3,
"q9": 2.1
},
"p2": {
"q1": 1.4,
"q5": 1.52,
"q9": 1.62
},
"p3": {
"q1": 0.6,
"q5": 1.45,
"q9": 2.45
}
}
},
{
"id": "r1-e3-1",
"author": "researcher-3",
"cells": {
"p1": {
"q1": 1.15,
"q5": 1.36,
"q9": 1.55
},
"p2": {
"q1": 1.49,
"q5": 1.535,
"q9": 1.58
},
"p3": {
"q1": 1.8,
"q5": 2.42,
"q9": 2.58
}
}
},
{
"id": "r1-e3-2",
"author": "researcher-3",
"cells": {
"p1": {
"q1": 1.2,
"q5": 1.42,
"q9": 2.46
},
"p2": {
"q1": 1.5,
"q5": 1.53,
"q9": 1.58
},
"p3": {
"q1": 1.9,
"q5": 2.44,
"q9": 2.57
}
}
}
]
}
},
"minimize": {
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"B": 0.4,
"full": 0.35,
"knownBest": 0.33,
"direction": "minimize",
"cells": [
"p1",
"p2"
],
"explanations": [
{
"id": "e1",
"author": "ra",
"cells": {
"p1": {
"q1": 0.36,
"q5": 0.37,
"q9": 0.39
},
"p2": {
"q1": 0.35,
"q5": 0.36,
"q9": 0.37
}
}
},
{
"id": "e2",
"author": "ra",
"cells": {
"p1": {
"q1": 0.35,
"q5": 0.355,
"q9": 0.36
},
"p2": {
"q1": 0.36,
"q5": 0.38,
"q9": 0.4
}
}
},
{
"id": "e3",
"author": "rb",
"cells": {
"p1": {
"q1": 0.37,
"q5": 0.38,
"q9": 0.4
},
"p2": {
"q1": 0.355,
"q5": 0.365,
"q9": 0.38
}
}
}
]
}
},
"fourCells": {
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"B": 0.9597642169962064,
"full": 2.6276819772628,
"knownBest": 2.635,
"direction": "maximize",
"cells": [
"p1",
"p2",
"p3",
"p4"
],
"explanations": [
{
"id": "e1",
"author": "researcher-1",
"cells": {
"p1": {
"q1": 1.4,
"q5": 1.75,
"q9": 2.1
},
"p2": {
"q1": 1.9,
"q5": 2.05,
"q9": 2.18
},
"p3": {
"q1": 1.1,
"q5": 1.45,
"q9": 1.8
},
"p4": {
"q1": 2.0,
"q5": 2.15,
"q9": 2.28
}
}
},
{
"id": "e2",
"author": "researcher-1",
"cells": {
"p1": {
"q1": 1.9,
"q5": 2.3,
"q9": 2.55
},
"p2": {
"q1": 1.8,
"q5": 1.95,
"q9": 2.1
},
"p3": {
"q1": 1.6013,
"q5": 2.0013,
"q9": 2.2513
},
"p4": {
"q1": 1.9007,
"q5": 2.0507,
"q9": 2.2007
}
}
},
{
"id": "e3",
"author": "researcher-1",
"cells": {
"p1": {
"q1": 1.65,
"q5": 2.05,
"q9": 2.4
},
"p2": {
"q1": 1.8,
"q5": 1.98,
"q9": 2.15
},
"p3": {
"q1": 1.3526,
"q5": 1.7526,
"q9": 2.1026
},
"p4": {
"q1": 1.9014,
"q5": 2.0814,
"q9": 2.2514
}
}
},
{
"id": "e4",
"author": "researcher-2",
"cells": {
"p1": {
"q1": 2.3,
"q5": 2.45,
"q9": 2.58
},
"p2": {
"q1": 1.85,
"q5": 2.02,
"q9": 2.18
},
"p3": {
"q1": 2.0039,
"q5": 2.1539,
"q9": 2.2839
},
"p4": {
"q1": 1.9521,
"q5": 2.1221,
"q9": 2.2821
}
}
},
{
"id": "e5",
"author": "researcher-2",
"cells": {
"p1": {
"q1": 1.5,
"q5": 1.95,
"q9": 2.35
},
"p2": {
"q1": 1.9,
"q5": 2.06,
"q9": 2.2
},
"p3": {
"q1": 1.2052,
"q5": 1.6552,
"q9": 2.0552
},
"p4": {
"q1": 2.0028,
"q5": 2.1628,
"q9": 2.3028
}
}
},
{
"id": "e6",
"author": "researcher-2",
"cells": {
"p1": {
"q1": 1.8,
"q5": 2.05,
"q9": 2.3
},
"p2": {
"q1": 1.85,
"q5": 2,
"q9": 2.15
},
"p3": {
"q1": 1.5065,
"q5": 1.7565,
"q9": 2.0065
},
"p4": {
"q1": 1.9535,
"q5": 2.1035,
"q9": 2.2535
}
}
},
{
"id": "e7",
"author": "researcher-3",
"cells": {
"p1": {
"q1": 1.9,
"q5": 2.15,
"q9": 2.4
},
"p2": {
"q1": 1.95,
"q5": 2.1,
"q9": 2.2
},
"p3": {
"q1": 1.6078,
"q5": 1.8578,
"q9": 2.1078
},
"p4": {
"q1": 2.0542,
"q5": 2.2042,
"q9": 2.3042
}
}
},
{
"id": "e8",
"author": "researcher-3",
"cells": {
"p1": {
"q1": 2.25,
"q5": 2.45,
"q9": 2.55
},
"p2": {
"q1": 1.7,
"q5": 1.9,
"q9": 2.05
},
"p3": {
"q1": 1.9591,
"q5": 2.1591,
"q9": 2.2591
},
"p4": {
"q1": 1.8049,
"q5": 2.0049,
"q9": 2.1549
}
}
},
{
"id": "e9",
"author": "researcher-3",
"cells": {
"p1": {
"q1": 1.7,
"q5": 1.95,
"q9": 2.2
},
"p2": {
"q1": 1.85,
"q5": 2,
"q9": 2.15
},
"p3": {
"q1": 1.4104,
"q5": 1.6604,
"q9": 1.9104
},
"p4": {
"q1": 1.9556,
"q5": 2.1056,
"q9": 2.2556
}
}
}
]
}
},
"gainNotPositive": {
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"B": 1.0,
"full": 2.0,
"knownBest": null,
"direction": "maximize",
"cells": [
"p1",
"p2"
],
"explanations": [
{
"id": "e1",
"author": "ra",
"cells": {
"p1": {
"q1": 1.9,
"q5": 2.0,
"q9": 2.1
},
"p2": {
"q1": 2.1,
"q5": 2.2,
"q9": 2.3
}
}
},
{
"id": "e2",
"author": "rb",
"cells": {
"p1": {
"q1": 1.95,
"q5": 2.0,
"q9": 2.05
},
"p2": {
"q1": 2.05,
"q5": 2.15,
"q9": 2.25
}
}
}
]
}
},
"negativeG0": {
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"B": 1.0,
"full": 2.0,
"knownBest": null,
"direction": "maximize",
"cells": [
"p1",
"p2"
],
"explanations": [
{
"id": "e1",
"author": "ra",
"cells": {
"p1": {
"q1": 2.05,
"q5": 2.15,
"q9": 2.3
},
"p2": {
"q1": 1.9,
"q5": 2.1,
"q9": 2.2
}
}
},
{
"id": "e2",
"author": "rb",
"cells": {
"p1": {
"q1": 2.0,
"q5": 2.1,
"q9": 2.2
},
"p2": {
"q1": 2.02,
"q5": 2.08,
"q9": 2.15
}
}
},
{
"id": "e3",
"author": "rb",
"cells": {
"p1": {
"q1": 1.95,
"q5": 2.05,
"q9": 2.1
},
"p2": {
"q1": 1.85,
"q5": 2.0,
"q9": 2.2
}
}
}
]
}
}
},
"scenarios": [
{
"name": "label_method_example_independent",
"section": "6.6;约定 17–19",
"params": {},
"input": {
"B": 1.0,
"full": 1.5,
"direction": "maximize",
"cells": [
{
"factor": "p1",
"kind": "valid",
"value": 1.45
},
{
"factor": "p2",
"kind": "valid",
"value": 1.1
}
]
},
"expected": {
"G": 0.5,
"supports": {
"p1": 0.10000000000000009,
"p2": 0.7999999999999998
},
"interaction": -0.10000000000000009,
"label": "independent"
},
"note": "方法 6.6 示例:撑 0.10、0.80,i = −0.10,各管各(independent)。"
},
{
"name": "label_calc15_substitute",
"section": "6.6;约定 17–19",
"params": {},
"input": {
"B": 0.9597642169962064,
"full": 2.6276819772628,
"direction": "maximize",
"cells": [
{
"factor": "p1",
"kind": "valid",
"value": 2.5989997592071172
},
{
"factor": "p2",
"kind": "valid",
"value": 1.7602769492805097
}
]
},
"expected": {
"G": 1.6679177602665936,
"supports": {
"p1": 0.017196422233131125,
"p2": 0.5200526360746033
},
"interaction": -0.46275094169226555,
"label": "substitute"
},
"note": "calc15 实测:撑 0.017、0.518,i ≈ −0.465 < −0.2,替代(substitute)。"
},
{
"name": "label_r1_negative",
"section": "6.6;约定 17–19",
"params": {},
"input": {
"B": 0.9597642169962064,
"full": 1.552176048093269,
"direction": "maximize",
"cells": [
{
"factor": "p1",
"kind": "valid",
"value": 2.250011787062861
},
{
"factor": "p2",
"kind": "valid",
"value": 1.9535929459502979
},
{
"factor": "p3",
"kind": "valid",
"value": 2.4389662413796342
}
]
},
"expected": {
"G": 0.5924118310970625,
"supports": {
"p1": -1.1779571276915577,
"p2": -0.6775977061661005,
"p3": -1.4969150626923773
},
"interaction": null,
"label": "negative"
},
"note": "真实第 1 轮:三格关掉后分数都比完整高,撑全 < 0,negative(不贴标签,i 不给)。"
},
{
"name": "label_incomplete_with_other_outcomes",
"section": "6.6;约定 17–19",
"params": {},
"input": {
"B": 1.0,
"full": 1.5,
"direction": "maximize",
"cells": [
{
"factor": "p1",
"kind": "valid",
"value": 1.45
},
{
"factor": "p2",
"kind": "insufficient"
},
{
"factor": "p3",
"kind": "joint",
"value": 1.2
},
{
"factor": "p4",
"kind": "untested"
},
{
"factor": "p5",
"kind": "cannotRun"
}
]
},
"expected": {
"G": 0.5,
"supports": {
"p1": 0.10000000000000009,
"p2": null,
"p3": null,
"p4": null,
"p5": null
},
"interaction": null,
"label": "incomplete"
},
"note": "只有有效分数进标签:p2–p5 都不是 valid(joint 有分数也不算),有因子没有有效格 → incomplete。"
},
{
"name": "label_negative_beats_incomplete",
"section": "6.6;约定 17–19",
"params": {},
"input": {
"B": 1.0,
"full": 1.5,
"direction": "maximize",
"cells": [
{
"factor": "p1",
"kind": "valid",
"value": 1.6
},
{
"factor": "p2",
"kind": "insufficient"
}
]
},
"expected": {
"G": 0.5,
"supports": {
"p1": -0.20000000000000018,
"p2": null
},
"interaction": null,
"label": "negative"
},
"note": "表从上往下判:任一有效格撑 < 0 先命中 negative,即使另一格没有有效分数。"
},
{
"name": "label_indispensable",
"section": "6.6;约定 17–19",
"params": {},
"input": {
"B": 1.0,
"full": 2.0,
"direction": "maximize",
"cells": [
{
"factor": "p1",
"kind": "valid",
"value": 1.05
},
{
"factor": "p2",
"kind": "valid",
"value": 1.0
}
]
},
"expected": {
"G": 1.0,
"supports": {
"p1": 0.95,
"p2": 1.0
},
"interaction": 0.95,
"label": "indispensable"
},
"note": "撑 0.95、1.0,都 > 0.9:缺一不可(indispensable),虽然 i = 0.95 > 0.2 也先命中这一条。"
},
{
"name": "label_complementary",
"section": "6.6;约定 17–19",
"params": {},
"input": {
"B": 1.0,
"full": 2.0,
"direction": "maximize",
"cells": [
{
"factor": "p1",
"kind": "valid",
"value": 1.3
},
{
"factor": "p2",
"kind": "valid",
"value": 1.4
}
]
},
"expected": {
"G": 1.0,
"supports": {
"p1": 0.7,
"p2": 0.6000000000000001
},
"interaction": 0.30000000000000004,
"label": "complementary"
},
"note": "撑 0.7、0.6,i = 0.3 > 0.2:互补(complementary)。"
},
{
"name": "label_boundary_exact_0.9",
"section": "6.6;约定 17–19",
"params": {},
"input": {
"B": 1.0,
"full": 2.0,
"direction": "maximize",
"cells": [
{
"factor": "p1",
"kind": "valid",
"value": 1.0
},
{
"factor": "p2",
"kind": "valid",
"value": 1.125
}
]
},
"expected": {
"G": 1.0,
"supports": {
"p1": 1.0,
"p2": 0.875
},
"interaction": 0.875,
"label": "complementary"
},
"note": "撑 1.0、0.875;0.875 不 > 0.9,不是缺一不可;i = 0.875 > 0.2 → 互补。用二进制精确数避免舍入。"
},
{
"name": "label_minimize_substitute",
"section": "6.6;约定 17–19",
"params": {},
"input": {
"B": 0.4,
"full": 0.35,
"direction": "minimize",
"cells": [
{
"factor": "p1",
"kind": "valid",
"value": 0.372
},
{
"factor": "p2",
"kind": "valid",
"value": 0.361
}
]
},
"expected": {
"G": 0.050000000000000044,
"supports": {
"p1": 0.44,
"p2": 0.22
},
"interaction": -0.34,
"label": "substitute"
},
"note": "越小越好:G = 0.40−0.35;撑(p) = (x − 0.35)/G = 0.44、0.22;i = −0.34 → 替代。"
},
{
"name": "label_G_not_positive",
"section": "6.6;约定 17–19",
"params": {},
"input": {
"B": 1.5,
"full": 1.5,
"direction": "maximize",
"cells": [
{
"factor": "p1",
"kind": "valid",
"value": 1.45
}
]
},
"expected": {
"error": "totalGainNotPositive"
},
"note": "G = 0 时报错。"
},
{
"name": "label_G_negative_minimize",
"section": "6.6;约定 17–19",
"params": {},
"input": {
"B": 0.4,
"full": 0.41,
"direction": "minimize",
"cells": [
{
"factor": "p1",
"kind": "valid",
"value": 0.405
}
]
},
"expected": {
"error": "totalGainNotPositive"
},
"note": "越小越好时完整比基线还大,G < 0,报错。"
},
{
"name": "confirm_r1_real",
"section": "6.6 确认与否定、现有测法分不开;约定 21–22",
"params": {},
"input": {
"model": "r1real",
"valid": {
"p1": 2.250011787062861,
"p2": 1.9535929459502979,
"p3": 2.4389662413796342
}
},
"expected": {
"verdicts": {
"r1-e1-1": {
"p1": "confirmed",
"p2": "refuted",
"p3": "confirmed"
},
"r1-e1-2": {
"p1": "refuted",
"p2": "refuted",
"p3": "refuted"
},
"r1-e2-1": {
"p1": "refuted",
"p2": "refuted",
"p3": "confirmed"
},
"r1-e2-2": {
"p1": "refuted",
"p2": "refuted",
"p3": "confirmed"
},
"r1-e3-1": {
"p1": "refuted",
"p2": "refuted",
"p3": "confirmed"
},
"r1-e3-2": {
"p1": "confirmed",
"p2": "refuted",
"p3": "confirmed"
}
},
"inseparableGroups": [
[
"r1-e1-1",
"r1-e3-2"
],
[
"r1-e2-1",
"r1-e2-2",
"r1-e3-1"
]
]
},
"note": "落在 [q1,q9](含两端)记确认。分不开:在全部 valid 格上确认/否定序列相同的两条以上解释为一组(组内按解释顺序)。"
},
{
"name": "confirm_calc15",
"section": "6.6 确认与否定、现有测法分不开;约定 21–22",
"params": {},
"input": {
"model": "calc15",
"valid": {
"p1": 2.5989997592071172,
"p2": 1.7602769492805097
}
},
"expected": {
"verdicts": {
"e1": {
"p1": "refuted",
"p2": "refuted"
},
"e2": {
"p1": "refuted",
"p2": "refuted"
},
"e3": {
"p1": "refuted",
"p2": "refuted"
},
"e4": {
"p1": "refuted",
"p2": "refuted"
},
"e5": {
"p1": "refuted",
"p2": "refuted"
},
"e6": {
"p1": "refuted",
"p2": "refuted"
},
"e7": {
"p1": "refuted",
"p2": "refuted"
},
"e8": {
"p1": "refuted",
"p2": "confirmed"
},
"e9": {
"p1": "refuted",
"p2": "refuted"
}
},
"inseparableGroups": [
[
"e1",
"e2",
"e3",
"e4",
"e5",
"e6",
"e7",
"e9"
]
]
},
"note": "calc15 两格都有效。"
},
{
"name": "confirm_endpoint_inclusive",
"section": "6.6 确认与否定、现有测法分不开;约定 21–22",
"params": {},
"input": {
"model": "gainNotPositive",
"valid": {
"p1": 2.1,
"p2": 2.05
}
},
"expected": {
"verdicts": {
"e1": {
"p1": "confirmed",
"p2": "refuted"
},
"e2": {
"p1": "refuted",
"p2": "confirmed"
}
},
"inseparableGroups": []
},
"note": "端点:e1 的 p1 上沿正好 2.1、e2 的 p2 下沿正好 2.05,都算确认;e2 在 p1(上沿 2.05)否定,e1 在 p2(下沿 2.1)否定。"
},
{
"name": "discovery_r1real",
"section": "4.3 ⑰、6.5;约定 23",
"params": {
"eps": 0.01
},
"input": {
"model": "r1real",
"cells": [
{
"factor": "p1",
"kind": "valid",
"value": 2.250011787062861
},
{
"factor": "p2",
"kind": "valid",
"value": 1.9535929459502979
},
{
"factor": "p3",
"kind": "valid",
"value": 2.4389662413796342
}
]
},
"expected": {
"line": 0.01,
"overLine": [
"p1",
"p2",
"p3"
],
"newBaseline": "p3"
},
"note": "B 取 f(完整)=1.5522,采纳线 min(0.01,(2.635983−1.5522)/4)=0.01。三格都过线,取分数最好的 p3。"
},
{
"name": "discovery_calc15",
"section": "4.3 ⑰、6.5;约定 23",
"params": {
"eps": 0.01
},
"input": {
"model": "calc15",
"cells": [
{
"factor": "p1",
"kind": "valid",
"value": 2.5989997592071172
},
{
"factor": "p2",
"kind": "joint",
"value": 2.64
}
]
},
"expected": {
"line": 0.001829505684299959,
"overLine": [
"p2"
],
"newBaseline": "p2"
},
"note": "采纳线 = (2.635−2.62768)/4 ≈ 0.00183;p1 低于完整不过线;p2 是构造的一起关格、分数 2.64(不是真实数据),参与并过线。"
},
{
"name": "discovery_gainNotPositive",
"section": "4.3 ⑰、6.5;约定 23",
"params": {
"eps": 0.01
},
"input": {
"model": "gainNotPositive",
"cells": [
{
"factor": "p1",
"kind": "valid",
"value": 2.5
},
{
"factor": "p2",
"kind": "valid",
"value": 2.5
}
]
},
"expected": {
"line": 0.01,
"overLine": [
"p1",
"p2"
],
"newBaseline": "p1"
},
"note": "无已知最好,采纳线 ε;两格同分 2.5 都过线,取因子编号小的 p1。"
},
{
"name": "voi_calc15",
"section": "6.7 方向收益、成分与权重、信息价值;约定 24–27",
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"model": "calc15"
},
"expected": {
"G": 1.6679177602665936,
"h": 0.007318022737199836,
"componentNames": [
"e1",
"e2",
"e3",
"e4",
"e5",
"e6",
"e7",
"e8",
"e9",
"reserve"
],
"weights": [
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
],
"reserve": {
"p1": [
0.17499999999999982,
3.675
],
"p2": [
1.0799999999999998,
2.7600000000000007
]
},
"componentExpectedPayoff": {
"e1": {
"p1": 0.0038508473371091563,
"p2": 0.0025653039409786215
},
"e2": {
"p1": 0.001668056075761235,
"p2": 0.002973343312446675
},
"e3": {
"p1": 0.002611372902273402,
"p2": 0.0028570740291788965
},
"e4": {
"p1": 0.0008102958916536589,
"p2": 0.0026815732242463997
},
"e5": {
"p1": 0.003050124914604642,
"p2": 0.002521428739745497
},
"e6": {
"p1": 0.0025345913001154348,
"p2": 0.0027539673062810547
},
"e7": {
"p1": 0.0020958392877841944,
"p2": 0.002391996896107781
},
"e8": {
"p1": 0.0009331464551064064,
"p2": 0.003269500920770263
},
"e9": {
"p1": 0.002973343312446675,
"p2": 0.0027539673062810547
},
"reserve": {
"p1": 0.003083031315529486,
"p2": 0.0031049689161460467
}
},
"priorExpectedPayoff": {
"p1": 0.002361064879238429,
"p2": 0.002787312459218229
},
"g0": 0.002787312459218229,
"voiFullExact": 0.0006313506372333815,
"partial": [
{
"cells": [
"p1"
],
"voiGrid": 0.0005820672232162904,
"grid": {
"k": 1,
"m": 4000000,
"cells": {
"p1": {
"breakpoints": 32,
"segments": 31,
"s": 20,
"subsegments": 620
}
},
"method": "grid"
},
"exactK1VOI": 0.0005820672330401876,
"gridMinusExact": -9.823897229553624e-12
},
{
"cells": [
"p2"
],
"voiGrid": 0.00020536458175531578,
"grid": {
"k": 1,
"m": 4000000,
"cells": {
"p2": {
"breakpoints": 31,
"segments": 30,
"s": 20,
"subsegments": 600
}
},
"method": "grid"
},
"exactK1VOI": 0.00020536666249124859,
"gridMinusExact": -2.0807359328090577e-09
}
],
"gridFullVOI": 0.0006313460547053657,
"gridFullInfo": {
"k": 2,
"m": 2000,
"cells": {
"p1": {
"breakpoints": 32,
"segments": 31,
"s": 20,
"subsegments": 620
},
"p2": {
"breakpoints": 31,
"segments": 30,
"s": 20,
"subsegments": 600
}
}
},
"gridFullMinusExact": -4.582528015796387e-09
},
"note": "weights/componentExpectedPayoff 的成分顺序 = explanations 顺序 + reserve。voiFullExact:全部格都测,一维精确(有理数 Stieltjes 积分)。partial[].voiGrid:照约定 27 的网格。partial[].exactK1VOI:只测一格时的精确值,只用来看网格误差,实现不需要算。gridFullVOI:全测时也用网格算一份,与 voiFullExact 对照(gridFullMinusExact)。grid.cells 给出每格折点数、段数、s、小段数:网格折点在浮点上按 q1-(q5-q1)、q9+(q9-q5)、L-W/2、U+W/2 计算后去重,实现应先核对这几个数一致(差一个 ulp 就会多出一段宽约 2e-16 的段,例如 calc15 p1 里 1.0499999999999998 与 1.05 并存)。"
},
{
"name": "voi_r1real",
"section": "6.7 方向收益、成分与权重、信息价值;约定 24–27",
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"model": "r1real"
},
"expected": {
"G": 0.5924118310970625,
"h": 1.083806951906731,
"componentNames": [
"r1-e1-1",
"r1-e1-2",
"r1-e2-1",
"r1-e2-2",
"r1-e3-1",
"r1-e3-2",
"reserve"
],
"weights": [
0.15,
0.15,
0.15,
0.15,
0.15,
0.15,
0.1
],
"reserve": {
"p1": [
-1.1500000000000001,
5.05
],
"p2": [
1.0599999999999996,
1.9400000000000004
],
"p3": [
-2.7750000000000004,
5.525
]
},
"componentExpectedPayoff": {
"r1-e1-1": {
"p1": -0.5887712197116215,
"p2": 0.028679052324877385,
"p3": -1.5410167503634666
},
"r1-e1-2": {
"p1": 0.316822512608577,
"p2": 0.028679052324877385,
"p3": 0.29944243087717926
},
"r1-e2-1": {
"p1": 0.1777818587573949,
"p2": 0.059780251212641806,
"p3": -0.5906007019991372
},
"r1-e2-2": {
"p1": 0.17320815303860604,
"p2": 0.0716718860814929,
"p3": 0.09088145010040616
},
"r1-e3-1": {
"p1": 0.3643890520839813,
"p2": 0.031423275756150774,
"p3": -1.2931219004051093
},
"r1-e3-2": {
"p1": -0.28324767769652415,
"p2": 0.02776431118111961,
"p3": -1.3617274861869422
},
"reserve": {
"p1": -0.7278118735628034,
"p2": 0.09545515581919511,
"p3": 0.32414044175863876
}
},
"priorExpectedPayoff": {
"p1": -0.0487537854942183,
"p2": 0.04674518991409349,
"p3": -0.6270073995206966
},
"g0": 0.04674518991409349,
"voiFullExact": 0.6768856765570694,
"partial": [
{
"cells": [
"p1"
],
"voiGrid": 0.3932819565009106,
"grid": {
"k": 1,
"m": 4000000,
"cells": {
"p1": {
"breakpoints": 31,
"segments": 30,
"s": 20,
"subsegments": 600
}
},
"method": "grid"
},
"exactK1VOI": 0.39328196654270475,
"gridMinusExact": -1.0041794173965002e-08
},
{
"cells": [
"p2"
],
"voiGrid": 0.04469391965086199,
"grid": {
"k": 1,
"m": 4000000,
"cells": {
"p2": {
"breakpoints": 21,
"segments": 20,
"s": 20,
"subsegments": 400
}
},
"method": "grid"
},
"exactK1VOI": 0.04469959609954742,
"gridMinusExact": -5.676448685432156e-06
},
{
"cells": [
"p3"
],
"voiGrid": 0.41273577238295406,
"grid": {
"k": 1,
"m": 4000000,
"cells": {
"p3": {
"breakpoints": 29,
"segments": 28,
"s": 20,
"subsegments": 560
}
},
"method": "grid"
},
"exactK1VOI": 0.41273577238295456,
"gridMinusExact": -4.996003610813204e-16
},
{
"cells": [
"p1",
"p2"
],
"voiGrid": 0.40801451007605366,
"grid": {
"k": 2,
"m": 2000,
"cells": {
"p1": {
"breakpoints": 31,
"segments": 30,
"s": 20,
"subsegments": 600
},
"p2": {
"breakpoints": 21,
"segments": 20,
"s": 20,
"subsegments": 400
}
},
"method": "grid"
}
},
{
"cells": [
"p1",
"p3"
],
"voiGrid": 0.6745232756112371,
"grid": {
"k": 2,
"m": 2000,
"cells": {
"p1": {
"breakpoints": 31,
"segments": 30,
"s": 20,
"subsegments": 600
},
"p3": {
"breakpoints": 29,
"segments": 28,
"s": 20,
"subsegments": 560
}
},
"method": "grid"
}
},
{
"cells": [
"p2",
"p3"
],
"voiGrid": 0.43115260873837397,
"grid": {
"k": 2,
"m": 2000,
"cells": {
"p2": {
"breakpoints": 21,
"segments": 20,
"s": 20,
"subsegments": 400
},
"p3": {
"breakpoints": 29,
"segments": 28,
"s": 20,
"subsegments": 560
}
},
"method": "grid"
}
}
],
"gridFullVOI": 0.6768144593327583,
"gridFullInfo": {
"k": 3,
"m": 158,
"cells": {
"p1": {
"breakpoints": 31,
"segments": 30,
"s": 5,
"subsegments": 150
},
"p2": {
"breakpoints": 21,
"segments": 20,
"s": 7,
"subsegments": 140
},
"p3": {
"breakpoints": 29,
"segments": 28,
"s": 5,
"subsegments": 140
}
}
},
"gridFullMinusExact": -7.121722431113753e-05
},
"note": "weights/componentExpectedPayoff 的成分顺序 = explanations 顺序 + reserve。voiFullExact:全部格都测,一维精确(有理数 Stieltjes 积分)。partial[].voiGrid:照约定 27 的网格。partial[].exactK1VOI:只测一格时的精确值,只用来看网格误差,实现不需要算。gridFullVOI:全测时也用网格算一份,与 voiFullExact 对照(gridFullMinusExact)。grid.cells 给出每格折点数、段数、s、小段数:网格折点在浮点上按 q1-(q5-q1)、q9+(q9-q5)、L-W/2、U+W/2 计算后去重,实现应先核对这几个数一致(差一个 ulp 就会多出一段宽约 2e-16 的段,例如 calc15 p1 里 1.0499999999999998 与 1.05 并存)。"
},
{
"name": "voi_minimize",
"section": "6.7 方向收益、成分与权重、信息价值;约定 24–27",
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"model": "minimize"
},
"expected": {
"G": 0.050000000000000044,
"h": 0.019999999999999962,
"componentNames": [
"e1",
"e2",
"e3",
"reserve"
],
"weights": [
0.225,
0.225,
0.45,
0.1
],
"reserve": {
"p1": [
0.30749999999999994,
0.4575000000000001
],
"p2": [
0.29999999999999993,
0.4600000000000001
]
},
"componentExpectedPayoff": {
"e1": {
"p1": 0.009399999999999983,
"p2": 0.003999999999999992
},
"e2": {
"p1": 0.001999999999999996,
"p2": 0.011999999999999978
},
"e3": {
"p1": 0.013399999999999974,
"p2": 0.006699999999999987
},
"reserve": {
"p1": 0.012999999999999975,
"p2": 0.011999999999999978
}
},
"priorExpectedPayoff": {
"p1": 0.009894999999999982,
"p2": 0.007814999999999985
},
"g0": 0.009894999999999982,
"voiFullExact": 0.003645968749999993,
"partial": [
{
"cells": [
"p1"
],
"voiGrid": 0.0029590833333333205,
"grid": {
"k": 1,
"m": 4000000,
"cells": {
"p1": {
"breakpoints": 13,
"segments": 12,
"s": 20,
"subsegments": 240
}
},
"method": "grid"
},
"exactK1VOI": 0.002959083333333328,
"gridMinusExact": -7.37257477290143e-18
},
{
"cells": [
"p2"
],
"voiGrid": 0.0026489437499999935,
"grid": {
"k": 1,
"m": 4000000,
"cells": {
"p2": {
"breakpoints": 13,
"segments": 12,
"s": 20,
"subsegments": 240
}
},
"method": "grid"
},
"exactK1VOI": 0.0026490793951612856,
"gridMinusExact": -1.3564516129207713e-07
}
],
"gridFullVOI": 0.0036457966536462376,
"gridFullInfo": {
"k": 2,
"m": 2000,
"cells": {
"p1": {
"breakpoints": 13,
"segments": 12,
"s": 20,
"subsegments": 240
},
"p2": {
"breakpoints": 13,
"segments": 12,
"s": 20,
"subsegments": 240
}
}
},
"gridFullMinusExact": -1.7209635375537574e-07
},
"note": "weights/componentExpectedPayoff 的成分顺序 = explanations 顺序 + reserve。voiFullExact:全部格都测,一维精确(有理数 Stieltjes 积分)。partial[].voiGrid:照约定 27 的网格。partial[].exactK1VOI:只测一格时的精确值,只用来看网格误差,实现不需要算。gridFullVOI:全测时也用网格算一份,与 voiFullExact 对照(gridFullMinusExact)。grid.cells 给出每格折点数、段数、s、小段数:网格折点在浮点上按 q1-(q5-q1)、q9+(q9-q5)、L-W/2、U+W/2 计算后去重,实现应先核对这几个数一致(差一个 ulp 就会多出一段宽约 2e-16 的段,例如 calc15 p1 里 1.0499999999999998 与 1.05 并存)。"
},
{
"name": "voi_fourCells",
"section": "6.7 方向收益、成分与权重、信息价值;约定 24–27",
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"model": "fourCells"
},
"expected": {
"G": 1.6679177602665936,
"h": 0.007318022737199836,
"componentNames": [
"e1",
"e2",
"e3",
"e4",
"e5",
"e6",
"e7",
"e8",
"e9",
"reserve"
],
"weights": [
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1,
0.1
],
"reserve": {
"p1": [
0.17499999999999982,
3.675
],
"p2": [
1.0799999999999998,
2.7600000000000007
],
"p3": [
-0.1256499999999997,
3.37695
],
"p4": [
1.1859499999999996,
2.8617500000000002
]
},
"componentExpectedPayoff": {
"e1": {
"p1": 0.0038508473371091563,
"p2": 0.0025653039409786215,
"p3": 0.005167103374102878,
"p4": 0.002126551928647381
},
"e2": {
"p1": 0.001668056075761235,
"p2": 0.002973343312446675,
"p3": 0.00297860833659465,
"p4": 0.002531520036029116
},
"e3": {
"p1": 0.002611372902273402,
"p2": 0.0028570740291788965,
"p3": 0.003916221386946511,
"p4": 0.002412179488675019
},
"e4": {
"p1": 0.0008102958916536589,
"p2": 0.0026815732242463997,
"p3": 0.0021094406001664623,
"p4": 0.0022336074196562038
},
"e5": {
"p1": 0.003050124914604642,
"p2": 0.002521428739745497,
"p3": 0.004343565846957139,
"p4": 0.002070391671068982
},
"e6": {
"p1": 0.0025345913001154348,
"p2": 0.0027539673062810547,
"p3": 0.0038223284563076256,
"p4": 0.002299858973518221
},
"e7": {
"p1": 0.0020958392877841944,
"p2": 0.002391996896107781,
"p3": 0.003377872667816079,
"p4": 0.001934817299258629
},
"e8": {
"p1": 0.0009331464551064064,
"p2": 0.003269500920770263,
"p3": 0.002209476058977985,
"p4": 0.002809250059834791
},
"e9": {
"p1": 0.002973343312446675,
"p2": 0.0027539673062810547,
"p3": 0.004243969140157947,
"p4": 0.002290645181259265
},
"reserve": {
"p1": 0.003083031315529486,
"p2": 0.0031049689161460467,
"p3": 0.004396435464443053,
"p4": 0.0026493249513400543
}
},
"priorExpectedPayoff": {
"p1": 0.002361064879238429,
"p2": 0.002787312459218229,
"p3": 0.003656502133247033,
"p4": 0.0023358147009287663
},
"g0": 0.003656502133247033,
"voiFullExact": 0.0007241714702604439,
"partial": [
{
"cells": [
"p1",
"p2",
"p3"
],
"voiGrid": 0.0006802215037563838,
"grid": {
"k": 3,
"m": 158,
"cells": {
"p1": {
"breakpoints": 32,
"segments": 31,
"s": 5,
"subsegments": 155
},
"p2": {
"breakpoints": 31,
"segments": 30,
"s": 5,
"subsegments": 150
},
"p3": {
"breakpoints": 47,
"segments": 46,
"s": 3,
"subsegments": 138
}
},
"method": "grid"
}
}
],
"gridFullVOI": 0.0007234478512161647,
"gridFullInfo": {
"k": 4,
"m": 44,
"cells": {
"p1": {
"breakpoints": 32,
"segments": 31,
"s": 1,
"subsegments": 31
},
"p2": {
"breakpoints": 31,
"segments": 30,
"s": 1,
"subsegments": 30
},
"p3": {
"breakpoints": 47,
"segments": 46,
"s": 0,
"subsegments": 44
},
"p4": {
"breakpoints": 47,
"segments": 46,
"s": 0,
"subsegments": 44
}
}
},
"gridFullMinusExact": -7.236190442791619e-07
},
"note": "weights/componentExpectedPayoff 的成分顺序 = explanations 顺序 + reserve。voiFullExact:全部格都测,一维精确(有理数 Stieltjes 积分)。partial[].voiGrid:照约定 27 的网格。partial[].exactK1VOI:只测一格时的精确值,只用来看网格误差,实现不需要算。gridFullVOI:全测时也用网格算一份,与 voiFullExact 对照(gridFullMinusExact)。grid.cells 给出每格折点数、段数、s、小段数:网格折点在浮点上按 q1-(q5-q1)、q9+(q9-q5)、L-W/2、U+W/2 计算后去重,实现应先核对这几个数一致(差一个 ulp 就会多出一段宽约 2e-16 的段,例如 calc15 p1 里 1.0499999999999998 与 1.05 并存)。"
},
{
"name": "voi_negativeG0",
"section": "6.7 方向收益、成分与权重、信息价值;约定 24–27",
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"model": "negativeG0"
},
"expected": {
"G": 1.0,
"h": 1.0,
"componentNames": [
"e1",
"e2",
"e3",
"reserve"
],
"weights": [
0.45,
0.225,
0.225,
0.1
],
"reserve": {
"p1": [
1.5500000000000003,
2.7499999999999996
],
"p2": [
1.3499999999999994,
2.750000000000001
]
},
"componentExpectedPayoff": {
"e1": {
"p1": -0.16749999999999984,
"p2": -0.06500000000000006
},
"e2": {
"p1": -0.10000000000000009,
"p2": -0.08349999999999999
},
"e3": {
"p1": -0.03249999999999996,
"p2": -0.017500000000000092
},
"reserve": {
"p1": -0.1499999999999999,
"p2": -0.050000000000000044
}
},
"priorExpectedPayoff": {
"p1": -0.12018749999999993,
"p2": -0.05697500000000005
},
"g0": -0.05697500000000005,
"voiFullExact": 0.049642821428571494,
"partial": [
{
"cells": [
"p1"
],
"voiGrid": 0.023196666666666692,
"grid": {
"k": 1,
"m": 4000000,
"cells": {
"p1": {
"breakpoints": 15,
"segments": 14,
"s": 20,
"subsegments": 280
}
},
"method": "grid"
},
"exactK1VOI": 0.02319666666666669,
"gridMinusExact": 3.469446951953614e-18
},
{
"cells": [
"p2"
],
"voiGrid": 0.029396450892857223,
"grid": {
"k": 1,
"m": 4000000,
"cells": {
"p2": {
"breakpoints": 16,
"segments": 15,
"s": 20,
"subsegments": 300
}
},
"method": "grid"
},
"exactK1VOI": 0.02939925782355029,
"gridMinusExact": -2.8069306930653126e-06
}
],
"gridFullVOI": 0.04964022946875037,
"gridFullInfo": {
"k": 2,
"m": 2000,
"cells": {
"p1": {
"breakpoints": 15,
"segments": 14,
"s": 20,
"subsegments": 280
},
"p2": {
"breakpoints": 16,
"segments": 15,
"s": 20,
"subsegments": 300
}
}
},
"gridFullMinusExact": -2.591959821121592e-06
},
"note": "weights/componentExpectedPayoff 的成分顺序 = explanations 顺序 + reserve。voiFullExact:全部格都测,一维精确(有理数 Stieltjes 积分)。partial[].voiGrid:照约定 27 的网格。partial[].exactK1VOI:只测一格时的精确值,只用来看网格误差,实现不需要算。gridFullVOI:全测时也用网格算一份,与 voiFullExact 对照(gridFullMinusExact)。grid.cells 给出每格折点数、段数、s、小段数:网格折点在浮点上按 q1-(q5-q1)、q9+(q9-q5)、L-W/2、U+W/2 计算后去重,实现应先核对这几个数一致(差一个 ulp 就会多出一段宽约 2e-16 的段,例如 calc15 p1 里 1.0499999999999998 与 1.05 并存)。"
},
{
"name": "select_calc15",
"section": "6.7 价值减成本、选格;约定 28–29、文末",
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"model": "calc15",
"balances": [
0,
1,
2,
3,
10
]
},
"expected": {
"g0": 0.002787312459218229,
"byBalance": [
{
"balance": 0,
"combos": [],
"selected": [],
"selectedNet": 0.0,
"unselected": {
"p1": {
"reason": "insufficientBudget",
"bestCombo": null,
"bestNet": null
},
"p2": {
"reason": "insufficientBudget",
"bestCombo": null,
"bestNet": null
}
},
"fullRule": {
"selected": [],
"insufficientBudget": [
"p1",
"p2"
]
}
},
{
"balance": 1,
"combos": [],
"selected": [],
"selectedNet": 0.0,
"unselected": {
"p1": {
"reason": "insufficientBudget",
"bestCombo": null,
"bestNet": null
},
"p2": {
"reason": "insufficientBudget",
"bestCombo": null,
"bestNet": null
}
},
"fullRule": {
"selected": [],
"insufficientBudget": [
"p1",
"p2"
]
}
},
{
"balance": 2,
"combos": [
{
"combo": [
"p1"
],
"voi": 0.0005820672232162904,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.0002910336116081452,
"cost": 0.0004645520765363715,
"net": -0.0001735184649282263
},
{
"combo": [
"p2"
],
"voi": 0.00020536458175531578,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.00010268229087765789,
"cost": 0.0004645520765363715,
"net": -0.0003618697856587136
}
],
"selected": [],
"selectedNet": 0.0,
"unselected": {
"p1": {
"reason": "notWorthCost",
"bestCombo": [
"p1"
],
"bestNet": -0.0001735184649282263
},
"p2": {
"reason": "notWorthCost",
"bestCombo": [
"p2"
],
"bestNet": -0.0003618697856587136
}
},
"fullRule": {
"selected": [
"p1"
],
"insufficientBudget": [
"p2"
]
}
},
{
"balance": 3,
"combos": [
{
"combo": [
"p1"
],
"voi": 0.0005820672232162904,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.0002910336116081452,
"cost": 0.0004645520765363715,
"net": -0.0001735184649282263
},
{
"combo": [
"p2"
],
"voi": 0.00020536458175531578,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.00010268229087765789,
"cost": 0.0004645520765363715,
"net": -0.0003618697856587136
},
{
"combo": [
"p1",
"p2"
],
"voi": 0.0006313506372333815,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.00031567531861669077,
"cost": 0.0007432833224581943,
"net": -0.00042760800384150356
}
],
"selected": [],
"selectedNet": 0.0,
"unselected": {
"p1": {
"reason": "notWorthCost",
"bestCombo": [
"p1"
],
"bestNet": -0.0001735184649282263
},
"p2": {
"reason": "notWorthCost",
"bestCombo": [
"p2"
],
"bestNet": -0.0003618697856587136
}
},
"fullRule": {
"selected": [
"p1",
"p2"
],
"insufficientBudget": []
}
},
{
"balance": 10,
"combos": [
{
"combo": [
"p1"
],
"voi": 0.0005820672232162904,
"Rhat": 5,
"mPrime": 1.9375,
"value": 0.0005638776224907813,
"cost": 0.0004645520765363715,
"net": 9.932554595440982e-05
},
{
"combo": [
"p2"
],
"voi": 0.00020536458175531578,
"Rhat": 5,
"mPrime": 1.9375,
"value": 0.00019894693857546217,
"cost": 0.0004645520765363715,
"net": -0.00026560513796090933
},
{
"combo": [
"p1",
"p2"
],
"voi": 0.0006313506372333815,
"Rhat": 4,
"mPrime": 1.875,
"value": 0.0005918912224062952,
"cost": 0.0007432833224581943,
"net": -0.00015139210005189914
}
],
"selected": [
"p1"
],
"selectedNet": 9.932554595440982e-05,
"unselected": {
"p2": {
"reason": "notWorthCost",
"bestCombo": [
"p1",
"p2"
],
"bestNet": -0.00015139210005189914
}
},
"fullRule": {
"selected": [
"p1",
"p2"
],
"insufficientBudget": []
}
}
]
},
"note": "余额 0、1 不做消融,各格 reason=insufficientBudget、bestCombo=null;余额 2 只能选单格;余额 3 起可以两格全测(VOI 用一维精确值),部分格用网格。R̂ = ⌈(余额−|S|)/每批上限⌉,m′ = Σ_{j<R̂} 0.5^j,成本 = 2·max(0,ĝ₀)·[(K+|S|)/(K+|S|+1) − K/(K+1)]。unselected 里附“含这一格的可选组合中净值最大的那个”。fullRule = 全测规则(格数超过余额−1 时按编号取前余额−1 格)。"
},
{
"name": "select_r1real",
"section": "6.7 价值减成本、选格;约定 28–29、文末",
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"model": "r1real",
"balances": [
0,
1,
2,
4,
12
]
},
"expected": {
"g0": 0.04674518991409349,
"byBalance": [
{
"balance": 0,
"combos": [],
"selected": [],
"selectedNet": 0.0,
"unselected": {
"p1": {
"reason": "insufficientBudget",
"bestCombo": null,
"bestNet": null
},
"p2": {
"reason": "insufficientBudget",
"bestCombo": null,
"bestNet": null
},
"p3": {
"reason": "insufficientBudget",
"bestCombo": null,
"bestNet": null
}
},
"fullRule": {
"selected": [],
"insufficientBudget": [
"p1",
"p2",
"p3"
]
}
},
{
"balance": 1,
"combos": [],
"selected": [],
"selectedNet": 0.0,
"unselected": {
"p1": {
"reason": "insufficientBudget",
"bestCombo": null,
"bestNet": null
},
"p2": {
"reason": "insufficientBudget",
"bestCombo": null,
"bestNet": null
},
"p3": {
"reason": "insufficientBudget",
"bestCombo": null,
"bestNet": null
}
},
"fullRule": {
"selected": [],
"insufficientBudget": [
"p1",
"p2",
"p3"
]
}
},
{
"balance": 2,
"combos": [
{
"combo": [
"p1"
],
"voi": 0.3932819565009106,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.1966409782504553,
"cost": 0.007790864985682248,
"net": 0.18885011326477305
},
{
"combo": [
"p2"
],
"voi": 0.04469391965086199,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.022346959825430994,
"cost": 0.007790864985682248,
"net": 0.014556094839748745
},
{
"combo": [
"p3"
],
"voi": 0.41273577238295406,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.20636788619147703,
"cost": 0.007790864985682248,
"net": 0.1985770212057948
}
],
"selected": [
"p3"
],
"selectedNet": 0.1985770212057948,
"unselected": {
"p1": {
"reason": "insufficientBudget",
"bestCombo": [
"p1"
],
"bestNet": 0.18885011326477305
},
"p2": {
"reason": "insufficientBudget",
"bestCombo": [
"p2"
],
"bestNet": 0.014556094839748745
}
},
"fullRule": {
"selected": [
"p1"
],
"insufficientBudget": [
"p2",
"p3"
]
}
},
{
"balance": 4,
"combos": [
{
"combo": [
"p1"
],
"voi": 0.3932819565009106,
"Rhat": 2,
"mPrime": 1.5,
"value": 0.29496146737568296,
"cost": 0.007790864985682248,
"net": 0.2871706023900007
},
{
"combo": [
"p2"
],
"voi": 0.04469391965086199,
"Rhat": 2,
"mPrime": 1.5,
"value": 0.03352043973814649,
"cost": 0.007790864985682248,
"net": 0.02572957475246424
},
{
"combo": [
"p3"
],
"voi": 0.41273577238295406,
"Rhat": 2,
"mPrime": 1.5,
"value": 0.30955182928721553,
"cost": 0.007790864985682248,
"net": 0.30176096430153326
},
{
"combo": [
"p1",
"p2"
],
"voi": 0.40801451007605366,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.20400725503802683,
"cost": 0.012465383977091597,
"net": 0.19154187106093523
},
{
"combo": [
"p1",
"p3"
],
"voi": 0.6745232756112371,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.3372616378056186,
"cost": 0.012465383977091597,
"net": 0.324796253828527
},
{
"combo": [
"p2",
"p3"
],
"voi": 0.43115260873837397,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.21557630436918698,
"cost": 0.012465383977091597,
"net": 0.20311092039209538
},
{
"combo": [
"p1",
"p2",
"p3"
],
"voi": 0.6768856765570694,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.3384428382785347,
"cost": 0.015581729971364497,
"net": 0.32286110830717024
}
],
"selected": [
"p1",
"p3"
],
"selectedNet": 0.324796253828527,
"unselected": {
"p2": {
"reason": "notWorthCost",
"bestCombo": [
"p1",
"p2",
"p3"
],
"bestNet": 0.32286110830717024
}
},
"fullRule": {
"selected": [
"p1",
"p2",
"p3"
],
"insufficientBudget": []
}
},
{
"balance": 12,
"combos": [
{
"combo": [
"p1"
],
"voi": 0.3932819565009106,
"Rhat": 6,
"mPrime": 1.96875,
"value": 0.38713692593058385,
"cost": 0.007790864985682248,
"net": 0.3793460609449016
},
{
"combo": [
"p2"
],
"voi": 0.04469391965086199,
"Rhat": 6,
"mPrime": 1.96875,
"value": 0.04399557715631727,
"cost": 0.007790864985682248,
"net": 0.03620471217063503
},
{
"combo": [
"p3"
],
"voi": 0.41273577238295406,
"Rhat": 6,
"mPrime": 1.96875,
"value": 0.4062867759394704,
"cost": 0.007790864985682248,
"net": 0.3984959109537881
},
{
"combo": [
"p1",
"p2"
],
"voi": 0.40801451007605366,
"Rhat": 5,
"mPrime": 1.9375,
"value": 0.395264056636177,
"cost": 0.012465383977091597,
"net": 0.3827986726590854
},
{
"combo": [
"p1",
"p3"
],
"voi": 0.6745232756112371,
"Rhat": 5,
"mPrime": 1.9375,
"value": 0.653444423248386,
"cost": 0.012465383977091597,
"net": 0.6409790392712944
},
{
"combo": [
"p2",
"p3"
],
"voi": 0.43115260873837397,
"Rhat": 5,
"mPrime": 1.9375,
"value": 0.41767908971529977,
"cost": 0.012465383977091597,
"net": 0.4052137057382082
},
{
"combo": [
"p1",
"p2",
"p3"
],
"voi": 0.6768856765570694,
"Rhat": 5,
"mPrime": 1.9375,
"value": 0.655732999164661,
"cost": 0.015581729971364497,
"net": 0.6401512691932965
}
],
"selected": [
"p1",
"p3"
],
"selectedNet": 0.6409790392712944,
"unselected": {
"p2": {
"reason": "notWorthCost",
"bestCombo": [
"p1",
"p2",
"p3"
],
"bestNet": 0.6401512691932965
}
},
"fullRule": {
"selected": [
"p1",
"p2",
"p3"
],
"insufficientBudget": []
}
}
]
},
"note": "真实第 1 轮三格。余额 4 时可选到三格全测;12 时 R̂ 更大、价值更高。"
},
{
"name": "select_minimize",
"section": "6.7 价值减成本、选格;约定 28–29、文末",
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"model": "minimize",
"balances": [
2,
3,
6
]
},
"expected": {
"g0": 0.009894999999999982,
"byBalance": [
{
"balance": 2,
"combos": [
{
"combo": [
"p1"
],
"voi": 0.0029590833333333205,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.0014795416666666603,
"cost": 0.0016491666666666636,
"net": -0.00016962500000000332
},
{
"combo": [
"p2"
],
"voi": 0.0026489437499999935,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.0013244718749999967,
"cost": 0.0016491666666666636,
"net": -0.00032469479166666684
}
],
"selected": [],
"selectedNet": 0.0,
"unselected": {
"p1": {
"reason": "notWorthCost",
"bestCombo": [
"p1"
],
"bestNet": -0.00016962500000000332
},
"p2": {
"reason": "notWorthCost",
"bestCombo": [
"p2"
],
"bestNet": -0.00032469479166666684
}
},
"fullRule": {
"selected": [
"p1"
],
"insufficientBudget": [
"p2"
]
}
},
{
"balance": 3,
"combos": [
{
"combo": [
"p1"
],
"voi": 0.0029590833333333205,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.0014795416666666603,
"cost": 0.0016491666666666636,
"net": -0.00016962500000000332
},
{
"combo": [
"p2"
],
"voi": 0.0026489437499999935,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.0013244718749999967,
"cost": 0.0016491666666666636,
"net": -0.00032469479166666684
},
{
"combo": [
"p1",
"p2"
],
"voi": 0.003645968749999993,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.0018229843749999965,
"cost": 0.0026386666666666616,
"net": -0.0008156822916666651
}
],
"selected": [],
"selectedNet": 0.0,
"unselected": {
"p1": {
"reason": "notWorthCost",
"bestCombo": [
"p1"
],
"bestNet": -0.00016962500000000332
},
"p2": {
"reason": "notWorthCost",
"bestCombo": [
"p2"
],
"bestNet": -0.00032469479166666684
}
},
"fullRule": {
"selected": [
"p1",
"p2"
],
"insufficientBudget": []
}
},
{
"balance": 6,
"combos": [
{
"combo": [
"p1"
],
"voi": 0.0029590833333333205,
"Rhat": 3,
"mPrime": 1.75,
"value": 0.0025891979166666555,
"cost": 0.0016491666666666636,
"net": 0.0009400312499999919
},
{
"combo": [
"p2"
],
"voi": 0.0026489437499999935,
"Rhat": 3,
"mPrime": 1.75,
"value": 0.0023178257812499943,
"cost": 0.0016491666666666636,
"net": 0.0006686591145833307
},
{
"combo": [
"p1",
"p2"
],
"voi": 0.003645968749999993,
"Rhat": 2,
"mPrime": 1.5,
"value": 0.002734476562499995,
"cost": 0.0026386666666666616,
"net": 9.580989583333338e-05
}
],
"selected": [
"p1"
],
"selectedNet": 0.0009400312499999919,
"unselected": {
"p2": {
"reason": "notWorthCost",
"bestCombo": [
"p2"
],
"bestNet": 0.0006686591145833307
}
},
"fullRule": {
"selected": [
"p1",
"p2"
],
"insufficientBudget": []
}
}
]
},
"note": "越小越好的合成例。"
},
{
"name": "select_negativeG0",
"section": "6.7 价值减成本、选格;约定 28–29、文末",
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"model": "negativeG0",
"balances": [
3,
5
]
},
"expected": {
"g0": -0.05697500000000005,
"byBalance": [
{
"balance": 3,
"combos": [
{
"combo": [
"p1"
],
"voi": 0.023196666666666692,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.011598333333333346,
"cost": 0.0,
"net": 0.011598333333333346
},
{
"combo": [
"p2"
],
"voi": 0.029396450892857223,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.014698225446428612,
"cost": 0.0,
"net": 0.014698225446428612
},
{
"combo": [
"p1",
"p2"
],
"voi": 0.049642821428571494,
"Rhat": 1,
"mPrime": 1.0,
"value": 0.024821410714285747,
"cost": 0.0,
"net": 0.024821410714285747
}
],
"selected": [
"p1",
"p2"
],
"selectedNet": 0.024821410714285747,
"unselected": {},
"fullRule": {
"selected": [
"p1",
"p2"
],
"insufficientBudget": []
}
},
{
"balance": 5,
"combos": [
{
"combo": [
"p1"
],
"voi": 0.023196666666666692,
"Rhat": 2,
"mPrime": 1.5,
"value": 0.017397500000000017,
"cost": 0.0,
"net": 0.017397500000000017
},
{
"combo": [
"p2"
],
"voi": 0.029396450892857223,
"Rhat": 2,
"mPrime": 1.5,
"value": 0.022047338169642917,
"cost": 0.0,
"net": 0.022047338169642917
},
{
"combo": [
"p1",
"p2"
],
"voi": 0.049642821428571494,
"Rhat": 2,
"mPrime": 1.5,
"value": 0.03723211607142862,
"cost": 0.0,
"net": 0.03723211607142862
}
],
"selected": [
"p1",
"p2"
],
"selectedNet": 0.03723211607142862,
"unselected": {},
"fullRule": {
"selected": [
"p1",
"p2"
],
"insufficientBudget": []
}
}
]
},
"note": "ĝ₀ < 0(各因子事前期望收益都为负):g0 照记原始负值,成本 = 2·max(0, ĝ₀)·[…] = 0,净值 = 价值。"
},
{
"name": "value_cost_pure",
"section": "6.7 价值减成本;约定 28",
"params": {
"u": 0.5,
"r": 0.5
},
"input": {
"cases": [
{
"balance": 5,
"size": 1,
"batchCap": 2,
"g0": 0.01,
"voi": 0.004
},
{
"balance": 13,
"size": 2,
"batchCap": 2,
"g0": 0.01,
"voi": 0.004
},
{
"balance": 3,
"size": 3,
"batchCap": 2,
"g0": 0.01,
"voi": 0.004
},
{
"balance": 4,
"size": 1,
"batchCap": 3,
"g0": 0.02,
"voi": 0.01
},
{
"balance": 6,
"size": 2,
"batchCap": 2,
"g0": -0.005,
"voi": 0.003
}
]
},
"expected": {
"cases": [
{
"Rhat": 2,
"mPrime": 1.5,
"value": 0.003,
"cost": 0.0016666666666666668,
"net": 0.0013333333333333333
},
{
"Rhat": 6,
"mPrime": 1.96875,
"value": 0.0039375,
"cost": 0.0026666666666666666,
"net": 0.0012708333333333335
},
{
"Rhat": 0,
"mPrime": 0.0,
"value": 0.0,
"cost": 0.0033333333333333335,
"net": -0.0033333333333333335
},
{
"Rhat": 1,
"mPrime": 1.0,
"value": 0.005,
"cost": 0.002,
"net": 0.003
},
{
"Rhat": 2,
"mPrime": 1.5,
"value": 0.0022500000000000003,
"cost": 0.0,
"net": 0.0022500000000000003
}
]
},
"note": "R̂ = ⌈(余额−|S|)/每批上限⌉,余额−|S| = 0 时 R̂ = 0、m′ = 0;m′ = Σ_{j<R̂} r^j;成本 = 2·max(0,ĝ₀)·[(K+|S|)/(K+|S|+1) − K/(K+1)],ĝ₀ < 0 时成本 0。例:余额 13、|S| 2、K 2 → R̂ 6、m′ 1.96875。"
},
{
"name": "select_pure_net_at_tolerance",
"section": "6.7 选格第 2–3 条;约定 29",
"params": {
"tolerance": 1e-12
},
"input": {
"cells": [
"p1",
"p2"
],
"balance": 3,
"nets": {
"p1": 1e-12,
"p2": 9e-13,
"p1,p2": 1e-12
}
},
"expected": {
"selected": [],
"selectedNet": 0.0,
"unselected": {
"p1": {
"reason": "notWorthCost",
"bestCombo": [
"p1"
],
"bestNet": 1e-12
},
"p2": {
"reason": "notWorthCost",
"bestCombo": [
"p2"
],
"bestNet": 9e-13
}
}
},
"note": "净值都不大于 1e-12:一格都不测;各格 notWorthCost,附各自含它的最大净值组合(同一条规则:差不到 1e-12 视为相同,先取格数少的)。p2 的附带组合曾是 {p1,p2}(1e-12,按“严格更大才替换”);改后 {p2}(0.9e-12)与它差不到 1e-12,格数少,取 {p2}。"
},
{
"name": "select_pure_just_above_tolerance",
"section": "6.7 选格第 2–3 条;约定 29",
"params": {
"tolerance": 1e-12
},
"input": {
"cells": [
"p1",
"p2"
],
"balance": 3,
"nets": {
"p1": 2.5e-12,
"p2": 1e-12,
"p1,p2": 3e-12
}
},
"expected": {
"selected": [
"p1"
],
"selectedNet": 2.5e-12,
"unselected": {
"p2": {
"reason": "notWorthCost",
"bestCombo": [
"p1",
"p2"
],
"bestNet": 3e-12
}
}
},
"note": "p1 = 2.5e-12 > 1e-12,入选;{p1,p2} = 3.0e-12 只比当前最好多 0.5e-12(不超过 1e-12),视为相同,保留格数少的 p1。"
},
{
"name": "select_pure_tie_chain",
"section": "6.7 选格第 2–3 条;约定 29",
"params": {
"tolerance": 1e-12
},
"input": {
"cells": [
"p1",
"p2",
"p3"
],
"balance": 4,
"nets": {
"p1": 0.01,
"p2": 0.010000000000800001,
"p3": 0.0100000000016,
"p1,p2": 0.0,
"p1,p3": 0.0,
"p2,p3": 0.0,
"p1,p2,p3": -1.0
}
},
"expected": {
"selected": [
"p2"
],
"selectedNet": 0.010000000000800001,
"unselected": {
"p1": {
"reason": "notWorthCost",
"bestCombo": [
"p1"
],
"bestNet": 0.01
},
"p3": {
"reason": "notWorthCost",
"bestCombo": [
"p3"
],
"bestNet": 0.0100000000016
}
}
},
"note": "最大净值 M = p3 = 0.01+1.6e-12;净值 ≥ M − 1e-12 的 p2、p3 视为相同,同格数按编号取小的 p2。(预期值曾按“逐个扫描、比当前最好多 1e-12 才替换”的接力写法选 p3;审阅指出方法 6.7 是先求最大净值、再在差不到 1e-12 的组合里按格数和编号挑,改后选 p2。)"
},
{
"name": "select_pure_filter_before_max",
"section": "6.7 选格第 2–3 条;约定 29",
"params": {
"tolerance": 1e-12
},
"input": {
"cells": [
"p1",
"p2"
],
"balance": 3,
"nets": {
"p1": 6e-13,
"p2": -1.0,
"p1,p2": 1.5e-12
}
},
"expected": {
"selected": [
"p1",
"p2"
],
"selectedNet": 1.5e-12,
"unselected": {}
},
"note": "第二轮审阅的反例:先只留净值 > 1e-12 的组合(只剩 {p1,p2}),再在其中求最大值和容差窗口,选 {p1,p2}。若先在全部组合里求 M = 1.5e-12、窗口 ≥ 0.5e-12,{p1}(0.6e-12)会因格数少被选中,而它的净值并不 > 1e-12。p1、p2 都被选中,没有没测的格。"
},
{
"name": "select_pure_tolerance_relay",
"section": "6.7 选格第 2–3 条;约定 29",
"params": {
"tolerance": 1e-12
},
"input": {
"cells": [
"p1",
"p2"
],
"balance": 3,
"nets": {
"p1": 1.0,
"p2": 1.0000000000009,
"p1,p2": 1.0000000000018
}
},
"expected": {
"selected": [
"p2"
],
"selectedNet": 1.0000000000009,
"unselected": {
"p1": {
"reason": "notWorthCost",
"bestCombo": [
"p1",
"p2"
],
"bestNet": 1.0000000000018
}
}
},
"note": "审阅给的接力反例:M = {p1,p2} = 1+1.8e-12,窗口 ≥ 1+0.8e-12 内有 {p2} 和 {p1,p2},先取格数少的 {p2}。接力写法会因 {p2} 比 {p1} 只多 0.9e-12 不替换、{p1,p2} 比 {p1} 多 1.8e-12 替换而选 {p1,p2}。p1 没选中,含它的组合 {p1}、{p1,p2} 里同样按这条挑:M = 1+1.8e-12,窗口内只有 {p1,p2}。"
},
{
"name": "select_pure_budget_reason",
"section": "6.7 选格第 2–3 条;约定 29",
"params": {
"tolerance": 1e-12
},
"input": {
"cells": [
"p1",
"p2",
"p3"
],
"balance": 2,
"nets": {
"p1": 0.002,
"p2": 0.003,
"p3": -0.001
}
},
"expected": {
"selected": [
"p2"
],
"selectedNet": 0.003,
"unselected": {
"p1": {
"reason": "insufficientBudget",
"bestCombo": [
"p1"
],
"bestNet": 0.002
},
"p3": {
"reason": "insufficientBudget",
"bestCombo": [
"p3"
],
"bestNet": -0.001
}
}
},
"note": "余额 2 只能测 1 格:选 p2;p1、p3 再加进来就超过余额−1,reason = insufficientBudget。"
},
{
"name": "bet_calc15_all_valid",
"section": "6.8;约定 30",
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"model": "calc15",
"outcomes": {
"p1": {
"kind": "valid",
"value": 2.5989997592071172
},
"p2": {
"kind": "valid",
"value": 1.7602769492805097
}
}
},
"expected": {
"weightsUpdated": true,
"weights": {
"e1": 0.0,
"e2": 0.08322400974382729,
"e3": 0.049538101037992416,
"e4": 0.14121721110377944,
"e5": 0.04876406820927372,
"e6": 0.0,
"e7": 0.0,
"e8": 0.6241800730787067,
"e9": 0.0,
"reserve": 0.053076536826420426
},
"payoffs": {
"p1": 0.00012584380890054235,
"p2": 0.0038057570153346588
},
"picked": "p2",
"predictedGain": 0.0038057570153346588,
"status": "bet",
"negativeFactors": []
},
"note": "两格都有效:收益用实测换算,押 p2。weights 是按两格密度更新后的成分权重(只用于没有有效分数的格,这里只是记录)。"
},
{
"name": "bet_calc15_p2_insufficient",
"section": "6.8;约定 30",
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"model": "calc15",
"outcomes": {
"p1": {
"kind": "valid",
"value": 2.5989997592071172
},
"p2": {
"kind": "insufficient"
}
}
},
"expected": {
"weightsUpdated": true,
"weights": {
"e1": 0.0,
"e2": 0.11797115540431034,
"e3": 0.08426511100307879,
"e4": 0.22686760654675084,
"e5": 0.07373197212769395,
"e6": 0.0,
"e7": 0.11797115540431034,
"e8": 0.2949278885107769,
"e9": 0.0,
"reserve": 0.08426511100307882
},
"payoffs": {
"p1": 0.00012584380890054235,
"p2": 0.002893886609905632
},
"picked": "p2",
"predictedGain": 0.002893886609905632,
"status": "bet",
"negativeFactors": []
},
"note": "p2 证据不足:权重 ∝ 起始权重 × 各成分在 p1 实测处的密度,再用新权重估 p2 的期望收益。"
},
{
"name": "bet_calc15_joint_ignored",
"section": "6.8;约定 30",
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"model": "calc15",
"outcomes": {
"p1": {
"kind": "valid",
"value": 2.5989997592071172
},
"p2": {
"kind": "joint",
"value": 1.76
}
}
},
"expected": {
"weightsUpdated": true,
"weights": {
"e1": 0.0,
"e2": 0.11797115540431034,
"e3": 0.08426511100307879,
"e4": 0.22686760654675084,
"e5": 0.07373197212769395,
"e6": 0.0,
"e7": 0.11797115540431034,
"e8": 0.2949278885107769,
"e9": 0.0,
"reserve": 0.08426511100307882
},
"payoffs": {
"p1": 0.00012584380890054235,
"p2": 0.002893886609905632
},
"picked": "p2",
"predictedGain": 0.002893886609905632,
"status": "bet",
"negativeFactors": []
},
"note": "p2 是一起关,它的分数不参与权重更新,也不当实测用;结果应与 p2 证据不足那一例完全相同。"
},
{
"name": "bet_r1_negative_support",
"section": "6.8;约定 30",
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"model": "r1real",
"outcomes": {
"p1": {
"kind": "valid",
"value": 2.250011787062861
},
"p2": {
"kind": "valid",
"value": 1.9535929459502979
},
"p3": {
"kind": "valid",
"value": 2.4389662413796342
}
}
},
"expected": {
"weightsUpdated": false,
"weights": {
"r1-e1-1": 0.15,
"r1-e1-2": 0.15,
"r1-e2-1": 0.15,
"r1-e2-2": 0.15,
"r1-e3-1": 0.15,
"r1-e3-2": 0.15,
"reserve": 0.1
},
"payoffs": {
"p1": -1.276678124040195,
"p2": -0.7343851045388742,
"p3": -1.6223669513598986
},
"picked": "p2",
"predictedGain": -0.7343851045388742,
"status": "noBetNegativeSupport",
"negativeFactors": [
{
"factor": "p1",
"offBetterBy": 0.697835738969592
},
{
"factor": "p2",
"offBetterBy": 0.40141689785702894
},
{
"factor": "p3",
"offBetterBy": 0.8867901932863653
}
]
},
"note": "三格撑都 < 0:不押,negativeFactors 记“关掉反而更好”的分数(x − 完整,按方向,正数)。挑出的因子与预测收益照记。另外:p2 实测 1.9536 落在 p2 所有成分(含预留 [1.06,1.94])之外,各成分在三格密度连乘全为 0,权重无从更新、保持起始权重(weightsUpdated=false)——真实数据里就出现了这种情况。"
},
{
"name": "bet_gain_not_positive",
"section": "6.8;约定 30",
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"model": "gainNotPositive",
"outcomes": {
"p1": {
"kind": "valid",
"value": 2.0
},
"p2": {
"kind": "untested"
}
}
},
"expected": {
"weightsUpdated": true,
"weights": {
"e1": 0.325791855203619,
"e2": 0.6515837104072408,
"reserve": 0.02262443438914021
},
"payoffs": {
"p1": 0.0,
"p2": -0.16685520361990938
},
"picked": "p1",
"predictedGain": 0.0,
"status": "noBetNonPositiveGain",
"negativeFactors": []
},
"note": "p1 实测正好等于完整,收益 0(撑 0,不是负);p2 各成分都预计关掉更好,估计收益为负。最大收益 0 ≤ 0,不押。"
},
{
"name": "bet_weights_not_updatable",
"section": "6.8;约定 30",
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"model": "gainNotPositive",
"outcomes": {
"p1": {
"kind": "valid",
"value": -5.0
},
"p2": {
"kind": "untested"
}
}
},
"expected": {
"weightsUpdated": false,
"weights": {
"e1": 0.45,
"e2": 0.45,
"reserve": 0.1
},
"payoffs": {
"p1": 7.0,
"p2": -0.17499999999999993
},
"picked": "p1",
"predictedGain": 7.0,
"status": "bet",
"negativeFactors": []
},
"note": "p1 实测 −5 落在所有成分(含预留)之外,密度全为 0,权重无从更新:保持起始权重,weightsUpdated=false。"
},
{
"name": "bet_minimize",
"section": "6.8;约定 30",
"params": {
"eps": 0.01,
"lambda": 0.1,
"u": 0.5,
"r": 0.5,
"batchCap": 2
},
"input": {
"model": "minimize",
"outcomes": {
"p1": {
"kind": "valid",
"value": 0.372
},
"p2": {
"kind": "cannotRun"
}
}
},
"expected": {
"weightsUpdated": true,
"weights": {
"e1": 0.19424460431654675,
"e2": 0.0,
"e3": 0.776978417266187,
"reserve": 0.02877697841726619
},
"payoffs": {
"p1": 0.008799999999999983,
"p2": 0.006328057553956823
},
"picked": "p1",
"predictedGain": 0.008799999999999983,
"status": "bet",
"negativeFactors": []
},
"note": "越小越好:收益 = h·(x − 完整)/G,h = max(完整 − K*, ε/100) = 0.02。"
}
]
}