Giter VIP home page Giter VIP logo

gaojuyun / qipai_algorithm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yuanfengyun/q_algorithm

0.0 0.0 0.0 29.57 MB

棋牌的胡牌算法,包括麻将、跑胡子、扑克。实现 lua 、c++ 、c# 、golang 、js 、java 、python 版本。( Mahjong algorithm )

C++ 28.44% Makefile 0.19% C# 6.05% Go 1.78% JavaScript 10.19% Lua 41.32% C 5.75% Shell 0.01% Java 5.10% Batchfile 0.10% Python 0.53% R 0.53%

qipai_algorithm's Introduction

qipai

棋牌的胡牌算法,特殊牌型判断算法

腾讯课堂视频讲解:https://ke.qq.com/course/360581?tuin=104cb0e2

1、跑胡子算法

实现:

有C++版(基于递归,回溯)。

lua版(基于查表)。

2、高效的麻将胡牌算法,能处理任意张赖子:

速度:1S左右处理100万次每次四个赖子的麻将判胡;5秒处理1亿次八个赖子判胡(golang虚拟机上实测)。

实现:

  基于花色切分,然后查表。
  
  有多种语言版本:lua、c++、c#、golang、js、java、python。

3、无敌的拆牌判胡算法,不占用额外内存,速度、简洁度超过查表法。支持任意赖子数量。

4、特殊牌型判断:一条龙、掐张、七对、碰碰胡、十三幺、单吊、大吊车、清一色、缺门、门清。

qipai_algorithm's People

Contributors

yuanfengyun avatar seandragon avatar haruka411 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.