feat(PX): 自训练v1.5 P0准备 — NHN模式 + 总分法胜率解析 + 评估管线

CB-01: Program.cs 加 --nhn 模式 [NEURAL,ISMCTS,NEURAL]
- 3人跑得快 N插花坐排列
- Rotations 数组补全为4种排列 (IIN/NII/INI/NHN)
- --nhn 参数: 不生成CSV, 直接评估

CB-02: 胜率解析统一总分法
- TrainingCollector 加 ScoreAccumulator/BotWins/BotGames 静态累加器
- GameOver 无条件调用 AccumulateScore (eval + 训练模式均记录)
- stress_summary.txt 输出 #BOT_SCORES: bot=wins/games,wr=XX%,score=YYY
- orchestrator eval 解析改用 #BOT_SCORES 格式, 正则回退逻辑移除

管线: orchestrator eval→stress_summary→总分法解析, 闭环可验证
This commit is contained in:
2026-07-20 15:40:59 +08:00
parent e777aef687
commit 7566fe99a1
4 changed files with 85 additions and 15 deletions

View File

@ -492,7 +492,6 @@ namespace PdkFriendServer.Logic
#endif
// 训练数据收集:输出本局所有 ISMCTS 决策
if (TrainingCollector.Enabled)
{
float[] rewards = new float[GamePack.Info.PlayNum];
for (int i = 0; i < GamePack.Info.PlayNum; i++)
@ -501,6 +500,8 @@ namespace PdkFriendServer.Logic
float s = GamePack.Info.Score[i];
rewards[i] = s > 0 ? 1f : s < 0 ? -1f : 0f;
}
var rawScores = GamePack.Info.Score.Select(s => (float)s).ToArray();
TrainingCollector.AccumulateScore(BotTypes, rawScores);
TrainingCollector.FlushGame(_flushGameCounter++, rewards, GamePack.Info.OverPos, BotTypes);
}