About this repo:
- This is my course project for Programming Practice at PKU.
- The project is completed in teams, but members of my team decided to each pursue a different approach, and in this repo is my approach - which is based on MCTS.
About the algorithm:
- This is an AI for the Chinese card game Doudizhu.
- At its highest (Nov 2021), it ranked #3 on Botzone among all programs, and #1 among non-RL programs. Its ranking had fallen since then though.
- Its name on the platform is "组合爆炸" (Combinatorial Explosion).
- An experimental version of it is named "H_V2" on the platform.
- The algorithm is based on MCTS with Determinization, with several significant enhancements, including:
- Assigning priors to the value of MCTS states, based on heuristics.
- Carrying out bayesian inference on the cards of opponents, based on the cards they already played.
- The hyperparameters are tuned using an evolutionary algorithm, with multiprocessing. (see
/tuning
) - The source code can be found at
/source/main.cpp
.
Detailed explanation will be added in the future. Well, probably.
关于这个仓库:
- 这是在北京大学《程序设计实习》课程的组队大作业中,我所负责设计和实现的内容(即基于 MCTS 的思路)。
- 该作业于 2021 上半年完成,但因为拖延症所以直到 2021/11 才上传到 GitHub 。
关于内容:
- 这是一个 叫分斗地主 游戏的 AI 。
- 截止 2021/11 ,其在 Botzone 平台上的最高 排名 是所有选手中的 #3 、非 RL 算法中的 #1 。不过之后有所下降。
- 在平台上的 bot 名称为“组合爆炸”
,代表着我将在组合数学课中挂科。 - 平台上名为 “H_V2” 的 bot 是它的另一个版本,基于同样的代码和不同的参数。
- 在平台上的 bot 名称为“组合爆炸”
- 基于 MCTS with Determinization 实现,并在原算法基础上进行多处改进(源码见
/source/main.cpp
),包括:- 用启发式函数给 MCTS 加入先验估值;
- 根据对手的出牌,来对其手牌进行贝叶斯推断。
- 算法中有大量超参数,采用演化算法进行调参(需要多进程加速,详见
/tuning
)。
暂时没有详细的介绍,不过之后可(da)能(gai)会(hui)有(gu)。