|
|
4c21e5d8b5
|
fix: ISMCTS v2 — 包庄阈值校准 + 多牌组合Rollout + 防死循环
P0修复: 包庄严重高估
- 阈值 45%→60%(1000局数据校准)
- Rollout 对手从「最小单张」改为 PickBestTip(最大+多牌优先)
- 模拟对手更强 → P(win) 估计更准确
P2修复: 只出单张不组合
- 新增 PickBestTip(): 优先多牌组合(对子/顺子 > 单张)
- 同数量选最大的牌
- Rollout 模拟中所有玩家均受益
P1确认(虚警): 75 moves 异常局实为碾压局(高牌玩家清16张)
- 加 pass streak 检测:连续 2 pass 则强制最大出牌
|
2026-07-07 13:59:49 +08:00 |
|
|
|
d23e0b7616
|
fix: ISMCTS包庄决策——600次模拟估算P(win), 阈值45%
替换占位逻辑(大牌≥6张)为真正的蒙特卡洛评估:
- EstimateWinProbability(): 模拟N局完整对局, 统计我第一个出完的概率
- 阈值45%: 包庄收益翻倍, 略微倾斜于有利局势
- 日志: [ISMCTS posX] 包庄评估: P(win)=XX% → 包庄/不包
原理: 包庄不改变牌局流程(不像斗地主叫地主), 只翻倍输赢。
因此决策简化为 P(win|我的手牌) ≥ 阈值 → 包庄。
|
2026-07-07 13:29:36 +08:00 |
|
|
|
a75733e4ae
|
feat: ISMCTS bot + full documentation
新增:
- PdkFriendServer/Logic/IsmctsBot.cs: ISMCTS蒙特卡洛搜索机器人
- 800次模拟/决策,对手手牌从未知牌池随机采样
- 包庄决策:大牌(≥J/Q/K/A/2)数量 ≥6 则包庄
- winRate日志输出,决策透明
- docs/bot-architecture.md: 系统架构文档
- docs/bot-algorithms.md: A/B/C三条算法路径完整分析
- docs/ismcts-design.md: ISMCTS实现设计详案
切换:
- PdkGameMain.InitBots: PdkBot → IsmctsBot(默认ISMCTS)
验证:
- dotnet build 0 errors
- 多人对局完整运行:包庄→出牌→结算→test over
|
2026-07-07 13:27:00 +08:00 |
|
|
|
ec87d921a3
|
feat: PdkBot — 外挂式自动出牌机器人
架构:
- IPdkBot 接口:外挂接入点,与核心逻辑解耦
- PdkBotView:只传自己手牌+公开信息(MaxPlayCard/ShenYuCard/Rule)
不暴露其他玩家手牌——模拟真人视角
- PdkBot:score-based 最优策略
评分维度:直接获胜>>对手威胁>>牌效率>>炸弹保留>>先手权>>黑桃3
对接:
- PdkGameMain.BotMode=true 启用
- WaitWanJiaShuRu中BuildBotView→bot.DecidePlay/DecideBaoZhuang
- GameBaoZhuang解除WhoPlay=GetNextPos注释以支持逐人轮询
- SetFalseOperation加DeskGameDo null守卫
文件:
- PdkFriendServer/Logic/PdkBot.cs(核心机器人)
- PdkFriendServer/Logic/PdkGameMain.cs(BotMode+对接)
- hjha-console/Program.cs(main.BotMode=true启动)
|
2026-07-07 13:11:13 +08:00 |
|
|
|
025b8fc1e2
|
fix: Windows paths → ./gamepack/, empty Console.ReadLine guard
- SendPack(): C:\Users\Administrator\Desktop\temp\ → ./gamepack/
(Path.Combine + Directory.CreateDirectory for cross-platform)
- WaitWanJiaShuRu(): add IsNullOrWhiteSpace + ss.Length checks
before accessing ss[0]/ss[1] to prevent IndexOutOfRange on empty input
- .gitignore: add gamepack/ exclusion
|
2026-07-07 12:56:39 +08:00 |
|
|
|
7b6c031d44
|
feat: net10.0 Linux Console mode — zero Mono, 0 compile errors
Migrated from net48 (.NET Framework) to net10.0 (cross-platform):
- All 14 csproj: net48 → net10.0, WindowsDesktop SDK → Microsoft.NET.Sdk
- Excluded WinForms files (Form/**, DebugControl, GameControl, etc.)
- Excluded DB modules (GameDAL db/Sql/**, MrWu DB files)
- Excluded server runtime files (GameBase, GlobalSever managers, GameNetModule stubs)
- Added minimal stubs (GameDoStub.cs, NamespaceStubs.cs, ServerCoreStubs.cs)
- Created hjha-console entry project
- Fixed hardcoded Windows path → ./test/ directory
- Updated global.json to SDK 10.0.109
Console test mode: PdkGameMain(null).Test() → 发牌→包庄→打牌→结算
Verified: dotnet build 0 errors, dotnet run outputs game state machine
|
2026-07-07 12:47:59 +08:00 |
|
|
|
e9616125ce
|
feat: initial commit - HJHA game server full source
6 major server modules (PdkFriendServer/GlobalSever/ServerCore/GameModule/GameNetModule) +
game logic (GameFix/GameDAL/ServerData) +
network layer (NetWorkMessage) +
data layer (ObjectModel) +
utilities (MrWu/Core/Config/CloudAPI/dll) +
adapters (zyxAdapter/base)
.NET 8.0 C# solution, 16 projects, 958 source files
|
2026-07-07 12:02:15 +08:00 |
|