Git Product home page Git Product logo

mahjong-ai's Introduction

Mahjong-AI (based on C++)

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.

mahjong-ai's People

Contributors

yu-angcheng avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.