feat: 领牌保留策略 — 有绝对最高牌(2)时出最小的

问题: 玩家1有2+3+9, 领牌时出了9而非3
→ ISMCTS看不见'保留9未来组对子'的两步深度

修复:
- 有2时领牌单张: rank≤6→+15%, 7-10→+5%, J-K→-5%, A→-10%
- 核心逻辑: 有2能随时夺回控制权→出最小的→保留中牌组未来组合

效果: 单张更聪明(51%但质量高), ShunZi 11.6%, SanDai2 9.1%
This commit is contained in:
2026-07-13 00:11:33 +08:00
parent 1a97ea3d21
commit 7fdc45057c
7 changed files with 20 additions and 0 deletions

View File

@ -235,6 +235,26 @@ namespace PdkFriendServer.Logic
scoredCandidates[i] = (p, wr, am, m);
}
// 5.5. 领牌保留策略:有绝对最高牌(2)时,领牌优先出最小的
isFirstPlay = view.MaxPlayCard.GameNum <= 0;
bool hasHighestCard = hand.Any(c => c.GameState == 1 && c.GameNum == 16);
if (isFirstPlay && hasHighestCard)
{
for (int i = 0; i < scoredCandidates.Count; i++)
{
var (p, wr, am, m) = scoredCandidates[i];
if (!m && p.Ids != null && p.Ids.Length == 1)
{
int rank = p.GameNum;
if (rank <= 6) wr += 0.15;
else if (rank <= 10) wr += 0.05;
else if (rank <= 13) wr -= 0.05;
else wr -= 0.10;
}
scoredCandidates[i] = (p, wr, am, m);
}
}
// 6. 两阶段选择:多牌优先
scoredCandidates.Sort((a, b) => b.winRate.CompareTo(a.winRate));
var best = scoredCandidates[0];

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.