Skip to content

Commit 39f5807

Browse files
author
NBL Agent
committed
v1.2.3: BattlePower release consistency + sustain health fix + fixture provenance
BattlePower single source of truth (audit 1/5/6): - New src/battlepower-model.js registry (BATTLE_POWER_MODEL_VERSION=MODEL_V123, BATTLE_POWER_WEIGHTS, deterministic modelHash). battlepower.js, UI, calibration and tests all read the same model; the v1.2.2 split (calibration selected fitted 0.25/0.60/0.05 vs shipped 0.22/0.45/0.25) is eliminated. - Selected model == shipped model: selectedModelHash=1ddb2797 === shippedModelHash=1ddb2797; static test tests/battlepower-model.test.js enforces it (audit 5). NEW FINAL holdout (audit 2/19): the old FINAL_TEST and interim NEW_FINAL_2026_09 seeds were already published; v1.2.3 uses brand-new seed space NEW_FINAL_V123, evaluated ONLY after the model is frozen. FINAL reports Spearman 0.815 / pairwise 0.957 / similar-BP 0.534 (canonical standalone) / Brier 0.195 / LogLoss 0.580 / ECE 0.228. Candidate fairness model-misalignment fixed (audit 3/4/6): buildPairsForModel re-computes EVERY card BP with the candidate weights, re-decides hi/lo and <=5% closeness, builds the pair set per model (no stale stored-BP preselection); all metrics (pairwise / similar-BP / win-prob / Spearman) take an explicit model via scoreRow(row, model) and never read a cached row.battlePower. Sustain health fix (audit 7-13): overall stalemate 6.40% [5.41-7.56] -> n=3000 point 0.97% [0.67-1.38] (target <4%, hard gate <5%); Support mirror 30.9% -> 6.3% (<10%), Tank 8.0% -> 0.2% (<7%). Generator v2 only, by Effect/Tag composition: SustainLoad metric (sustainLoad/expectedDPS/ expectedSelfSustain/pressureRatio with engine DEF/RES mitigation model), per-archetype V2_SUSTAIN_CEILING + V2_PRESSURE_FLOOR with re-composition repair (remove recurring sustain triggers, keep Support heal identity, add fast damage pressure), recurrence cost raised 3.2->6.0, heal skill cooldown 1->2, sustain power scale 720->1100. BattleEngine/Generator v1/RPI/BudgetCurve frozen; rarity re-verified healthy (0 hard inversions). Release gate (audit 15): npm run verify stays fast; new npm run verify:release runs verify + health(n=3000) + adjacent matrix + calibration + matched rarity + similar-BP. Health metrics expanded to n=3000 with overall/archetype/rarity/ archetype x rarity. Fixture provenance (audit 16-18): generate-v1-fixture.js now verifies git -C <srcDir> rev-parse HEAD strictly equals 19ca5a4 and git status --porcelain is empty, else refuses; fixture adds historicalTree/ generatorBlobSha/generatedAtToolVersion (no dynamic time); the 189 v1 hashes are unchanged (provenance-only diff); v1-fixture test asserts provenance. Version 1.2.3; 181 tests pass; npm run verify + verify:release + browser QA (desktop/mobile) verified.
1 parent 447d309 commit 39f5807

28 files changed

Lines changed: 13442 additions & 4851 deletions

FINAL-REPORT.md

Lines changed: 79 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# FINAL-REPORT — 数值对战实验室
22

3-
**Status:** v1.2.2 · validation-correctness patch · §24 完成标准 A-E 全满足
4-
(health stalemate 发现已如实记录,非本版 blocker)· competencies verified
3+
**Status:** v1.2.3 · BattlePower Release Consistency + Sustain Health Fix ·
4+
§24 完成判断 1-5 全满足 · competencies verified
55

66
## 1. 项目最终结构
77

@@ -13,7 +13,7 @@ Condition + Target + Event + Status + Resource + Damage Component`。
1313
NUMERICAL-BATTLE-LAB-v1.0.0/
1414
├── index.html # 单页离线入口(玩家向导航 + 高级实验室)
1515
├── styles.css # 移动优先 + 12 稀有度卡框/典藏标记
16-
├── package.json # v1.2.1 · npm test / verify / manifest / gen-mc
16+
├── package.json # v1.2.3 · test / verify / verify:release / manifest / gen-mc
1717
├── src/
1818
│ ├── kernel.js # Gen5PRNG(Showdown) + EventKernel + action 排序
1919
│ ├── components.js # 组件注册表(参数/Effect/Condition/Target/Event/Modifier)
@@ -122,28 +122,31 @@ NUMERICAL-BATTLE-LAB-v1.0.0/
122122
- 战斗按 priority/speed 顺序结算(顺序非分片);相同/镜像阵容先手方约 -2~6 个百分点。
123123
- 单机本地,无网络多人/服务端/云存档;卡牌库存在浏览器本地存储。
124124
- 生成卡镜像自愈组合可能打满 maxRounds(draw),由 maxRounds 兜底不挂起。
125-
- **v1.2.2 实测**:Health stalemate n=2000 point **6.40% [5.41-7.56]**,超出 §20
126-
point<5% 门禁;主因是 Support 镜像(30.9%)与 Tank 镜像(8.0%)的 heal/shield
127-
sustain 循环。诊断确认单一 sustain 旋钮无法修复(结构性),按 §22 不重调 Generator v2,
128-
作为已文档化发现记录待后续轮次;不隐藏、不误标通过。
125+
- **v1.2.3 修复**:v1.2.2 的 Health stalemate 6.40% [5.41-7.56] 已通过 Generator v2
126+
sustain composition 修复(整体 0.97% [0.67-1.38],Support 6.3%,Tank 0.2%);Support
127+
仍然可拖长战斗(P50 14 / P90 30),但不再无限自愈。
129128
- 战力是 1v1 通用排序指标,不是任意 matchup 的精确胜率;UI 不显示精确百分比,
130129
`战力较高 / 战力接近 / 战力较低` 或仅显示战力数字。
131130

132131
## 6. 验证门禁(本环境重测)
133132

134133
```
135-
ALL TESTS PASS ✔ 全量测试通过(177,含 v1 fixture / budget-curve / calibration-semantics)
136-
STATIC CHECK PASS ✔ 91 参数 / 18 Effect / v1.2.2 版本门禁 / manifest 审计
137-
V1 HISTORICAL FIXTURE ✔ 189 张旧卡 sha256,由 v1.1.0 历史 commit 19ca5a4 worktree 生成
138-
HEALTH METRICS ✔ 秒杀 0% [0-0.19] · 中位数 9 · P90 25 · P95 40
139-
⚠ stalemate 6.40% [5.41-7.56](>5% 门禁,已文档化,非本版 blocker)
134+
ALL TESTS PASS ✔ 全量测试通过(181,含 v1 fixture / budget-curve /
135+
calibration-semantics / battlepower-model-consistency)
136+
STATIC CHECK PASS ✔ 91 参数 / 18 Effect / v1.2.3 版本门禁 / manifest 审计
137+
V1 HISTORICAL FIXTURE ✔ 189 张旧卡 sha256,由 v1.1.0 历史 commit 19ca5a4 worktree 生成;
138+
provenance(historicalTree/generatorBlobSha/toolVersion)可机器验证
139+
HEALTH METRICS (n=3000) ✔ 秒杀 0% [0-0.13] · stalemate 0.97% [0.67-1.38](<4% 目标)
140+
· 中位数 8 · P90 15 · P95 19
141+
· Support 6.3% (<10%) · Tank 0.2% (<7%)
140142
STRICT RARITY MONOTONICITY ✔ adjacent-rarity-matrix:11 组方向全部正确(conditional)
141-
ADJACENT RARITY MATRIX ✔ conditional win rate 全部 EXPECTED(0.66-0.86),hard inversions 0
142-
MATCHED-SEED RARITY TEST ✔ Causal 0.75-0.85 / Population 0.57-0.64 全部 EXPECTED,hard 0
143-
SPEARMAN ✔ FINAL_TEST (frozen holdout) 0.785(validation selected)
144-
PAIRWISE ORDERING ACCURACY ✔ FINAL 0.761 ≥ 0.75(split train/validation/final 隔离)
145-
SIMILAR-BP FAIRNESS ✔ FINAL 0.543(ideal ~0.50)∈ 40-60%
146-
WIN PROBABILITY CALIBRATION ✔ 拟合于 TRAIN,FINAL holdout Brier 0.214 / LogLoss 0.621 / ECE 0.191
143+
ADJACENT RARITY MATRIX ✔ conditional win rate 全部 EXPECTED(0.78-0.89),hard inversions 0
144+
MATCHED-SEED RARITY TEST ✔ Causal 0.785-0.892 / Population 0.585-0.683 全部 EXPECTED,hard 0
145+
SPEARMAN ✔ NEW_FINAL_V123 (frozen holdout) 0.815(validation selected)
146+
PAIRWISE ORDERING ACCURACY ✔ NEW_FINAL 0.957 ≥ 0.75(split train/validation/final 隔离)
147+
SIMILAR-BP FAIRNESS ✔ random pairs |dBP|/mean≤5% higher-BP win 0.534 ∈ 40-60%
148+
WIN PROBABILITY CALIBRATION ✔ 拟合于 TRAIN,NEW_FINAL holdout Brier 0.195 / LogLoss 0.580 / ECE 0.228
149+
MODEL CONSISTENCY ✔ selectedModelHash=1ddb2797 === shippedModelHash=1ddb2797(静态测试)
147150
BROWSER QA DESKTOP ✔ Chromium 1440×1000:全中文、新手流程可独立玩通、
148151
卡牌库/生成/帮助/高级实验室全部可用、无 JS 错误
149152
BROWSER QA MOBILE ✔ Chromium 390×844:无横向溢出、无 NaN
@@ -153,27 +156,73 @@ PAGES ACTION ✔ GitHub Pages deploy PASS
153156

154157
附注:浏览器控制台仅有 1 条 `favicon.ico` 404(非引擎错误,可忽略)。
155158

156-
## 7. 最终判断(v1.2.2 §24)
159+
## 7. 最终判断(v1.2.3 §24)
157160

158161
- **A. 高稀有度整体人群统计更强** —— Population 11 组 conditional 全部 EXPECTED
159-
(0.57-0.64),hard inversions 0。
162+
(0.585-0.683),hard inversions 0。
160163
- **B. 同 seed/archetype 仅提升 rarity 绝大多数不变弱** —— Causal matched 11 组
161-
conditional 全部 EXPECTED(0.75-0.85),hard inversions 0。
164+
conditional 全部 EXPECTED(0.785-0.892),hard inversions 0。
162165
- **C. 不存在大量 same-archetype higher-rarity WR<40% 系统性反转** —— matched +
163166
population 均 hard inversions 0。
164167
- **D. BattlePower FINAL 完全未参与模型选择** —— `modelSelectionUsedSplits =
165-
['TRAIN','VALIDATION']`,FINAL 只在 freeze 后 holdout。
168+
['TRAIN','VALIDATION']`,NEW_FINAL_V123 只在 freeze 后 holdout。
166169
- **E. v1 fixture 真正来自 v1.1.0 历史 commit** —— 由 19ca5a4 worktree 生成,golden
167170
不可自动再生成。
168171
- **战力只是观测指标,不参与实际战斗结算** —— 由 battlepower.js 只读实现 +
169172
identical-data-diff-rarity 同 BP 测试 + BattleEngine 冻结保证。
170173

171-
## 8. v1.2.2 版本策略结论(§26
174+
## 8. v1.2.3 最终报告块(§23
172175

173-
- 本轮只修统计脚本(Phase A):FINAL_TEST 泄漏、pseudo-replication、Archetype 覆盖、
174-
v1 fixture 锚定、health CI 等全部修正;**产品功能与 Generator v2 冻结**
175-
- 新严格测量证明 **matched-seed rarity 与 population rarity 均健康**(0 hard
176-
inversion),故按 §22 Phase B **不做 Generator v2 数值重调**
177-
- Health stalemate 6.40% [5.41-7.56] 超出 §20 point<5% 门禁,作为 **validation
178-
correctness patch 的诚实发现**报告(§21 明确“长尾不是 blocker”,§24 A-E 全满足),
179-
不隐藏、不误标通过,留给后续轮次最小 sustain/composition 调整。
176+
### BattlePower model
177+
178+
```text
179+
Selected weights: {offense 0.30, durability 0.40, tempo 0.22, sustain 0.02,
180+
utility 0.02, economy 0.02, reliability 0.02} (MODEL_V123)
181+
Shipped weights: {offense 0.30, durability 0.40, tempo 0.22, sustain 0.02,
182+
utility 0.02, economy 0.02, reliability 0.02}
183+
Hashes equal: YES (selectedModelHash=1ddb2797 === shippedModelHash=1ddb2797)
184+
```
185+
186+
### New untouched FINAL (NEW_FINAL_V123, 全新种子空间)
187+
188+
```text
189+
Spearman : 0.815 (>= 0.70)
190+
Pairwise : 0.957 (>= 0.75)
191+
Similar BP: 0.534 (canonical standalone, random pairs, ∈ [0.40, 0.60])
192+
Brier : 0.195
193+
LogLoss : 0.580
194+
ECE : 0.228
195+
```
196+
197+
### Health
198+
199+
```text
200+
n: 3000(overall + 7 archetype + 12 rarity + archetype×rarity)
201+
one-shot: 0.00% [0.00-0.13]
202+
stalemate: 0.97% [0.67-1.38] (target < 4%, hard gate < 5%)
203+
Support stalemate: 6.3% (target < 10%)
204+
Tank stalemate: 0.2% (target < 7%)
205+
P50/P75/P90/P95: 8 / 11 / 15 / 19
206+
```
207+
208+
### Fixture
209+
210+
```text
211+
Historical ref: 19ca5a443fcccd418d421a648f29a900098f55f8
212+
Actual worktree HEAD: 19ca5a443fcccd418d421a648f29a900098f55f8(git rev-parse 校验)
213+
Worktree dirty: NO(git status --porcelain 空,否则拒绝)
214+
189/189: YES(hash 逐字节一致;provenance 只增不改)
215+
```
216+
217+
## 9. v1.2.3 版本策略结论(§26)
218+
219+
- **① 模型一致性**:建立 `src/battlepower-model.js` 唯一 Source of Truth,calibration
220+
与线上完全一致(hash 相等,静态测试强制)——不再有 v1.2.2
221+
“selected fitted 而 shipped 分裂” 状态。
222+
- **② Sustain Health Fix**:整体 stalemate 6.40% → 0.97%,Support 30.9% → 6.3%,
223+
Tank 8.0% → 0.2%;只改 Generator v2 sustain composition(SustainLoad + ceiling +
224+
recurrence cost),BattleEngine / Generator v1 / RPI / Budget Curve 冻结。
225+
- **③ Fixture provenance**:工具验证真实 checkout(HEAD + 干净 worktree),fixture
226+
provenance 可机器验证。
227+
- rarity 未退化(adjacent + matched 重跑全绿),按 §21 保持 RPI / Budget Curve 不动。
228+
- 完成判断 **1-5 全满足**,至此停止继续调数值;下一阶段才能回到内容/UI 扩展。

0 commit comments

Comments
 (0)