Class project of Programming Practice in C++(2020 Spring, Peking University), written by me, Zi-Xin Zeng and Shu-Rui Wang.
Follows rules of Chinese-Standard-Mahjong, see https://wiki.botzone.org.cn/index.php?title=Chinese-Standard-Mahjong for rules.
Can be run online directly: https://www.botzone.org.cn/.
See https://github.com/ailab-pku/Chinese-Standard-Mahjong/tree/master/fan-calculator-usage for the ChineseOfficialMahjongHelper(written by our TA) we used in this project.
Enumerative algorithm mainly based on shanten and useful tiles: we choose the tile which will most likely result in the least shanten and as many useful tiles as possible.
Targets the following mahjong hands: thirteen-orphans,seven-pairs, yisesantongshun, yisesanjiegao, yisesanbugao, qing-long, sanse-shuanglonghui, honors-and-knitted-tiles, knitted-straight, sanfengke, hua-long,sansesantongshun, sansesanjiegao, shuangjianke, sansesanbugao, pengpenghu.
Able to CHI, PENG, GANG (anGANG and buGANG) correctly.
This Mahjong bot participates in a Mahjong race against bots written by other teams, and eventually ranks 18 out of 192 bots (scores 89.03, 91.04, 91.02 in 3 rounds of the competition, respectively). See https://www.botzone.org.cn/group/5e7f312ed52bcf42b8f18ca4#5ed09555a965b9060619255f for details.