Git Product home page Git Product logo

mahjong's Introduction

AI Mahjong player.

This is a mahjong ai for studying and experiment.We use monte tree to write a supervised algorithm of playing mahjong. The algo use monte tree to simulate game several times after which it make decision of how to playing a tile by selecting the most selected decision. Then a CNN net will be trained,and the trained model will be used to make decision and playing with the previous algo until the CNN model get stronger enough eg.to have a win rate of more than 60%.Then the previous algo will be replaced by the trianed one,And repeate the training again and again.

Margin attack strategy using monte tree

In the first stage,the task is to write a fixed strategy to make decision using monte tree.In the code,i use a state machine to control the process of simulation of playing mahjong in monte tree.The simulation will randomly run SIM_NUM times,And update the tree with the score of each simulation's result.

CNN model to predicate the best tile

The second version is to use CNN model to predicate the probability with which the ai will gain the ability to learn by self.The ai will play with self continualy and update the CNN model. Once the continually updated model earns a win rate of more than 60%,we'll save the model as a new standard model.We may use a gpu cluster to train the model.

contribution is welcome

Contacting me through message or email:[email protected]

Developing guide

Run the test_monte_tree.py file,feel it,and write the remaining uncompleted function in monte_tree_search such as gang strategy,fangpao strategy. Thinking how to save game process for further training is necessary.

mahjong's People

Contributors

yves-yuan avatar nihisil 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.