View Code? Open in Web Editor
NEW
基于权重的斗地主游戏AI算法,AI algorithms for chinese landlord card game, based on weights
Home Page: http://www.cronlygames.com/download/download.php?p=com.cronlygames.landlord
License: Apache License 2.0
C 7.70%
C++ 77.12%
CMake 0.86%
Python 1.07%
Shell 0.01%
Batchfile 0.01%
Objective-C 1.49%
Makefile 0.21%
Objective-C++ 1.55%
Java 1.20%
GLSL 0.23%
Lua 8.54%
PowerShell 0.01%
PureBasic 0.01%
doudizhu's People
Contributors
doudizhu's Issues
感谢阁下的代码,给了我很大的启发。只是对于牌型权重计算这里,里面的各种magic number是怎么算出来的不太明白,请解释一下么?谢谢。
if (cnt > 0) {
key[num++] = char('A' + i);
key[num++] = char('a' + cnt);
if (cnt > 0) {
leastValue = i;
if (maxCount < cnt) {
maxCount = cnt;
}
}
}
按着这个逻辑,leastValue只要该value有牌就会更新,得到的其实是maxValue