yuanfengyun/q_algorithm
yuanfengyun/q_algorithm has 2,099 GitHub stars and 848 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-07 22:59 UTC. Last push 2024-06-14.
棋牌的胡牌算法,包括麻将、跑胡子、扑克。实现 lua 、c++ 、c# 、golang 、js 、java 、python 版本。( Mahjong algorithm )
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalqipai
胡牌算法,特殊牌型判断算法
1、跑胡子算法
实现:
有C++版(基于递归,回溯)。
lua版(基于查表)。
2、高效的麻将胡牌算法,能处理任意张赖子:
速度:1S左右处理100万次每次四个赖子的麻将判胡;5秒处理1亿次八个赖子判胡(golang虚拟机上实测)。
实现:
基于花色切分,然后查表。
有多种语言版本:lua、c++、c#、golang、js、java、python。
3、无敌的拆牌判胡算法,不占用额外内存,速度、简洁度超过查表法。支持任意赖子数量。
4、特殊牌型判断:一条龙、掐张、七对、碰碰胡、十三幺、单吊、大吊车、清一色、缺门、门清。
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
560,861 starspublic-apis/public-apis
A collective list of free APIs
497,105 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
441,758 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,164 stars