yuanfengyun/q_algorithm
棋牌的胡牌算法,包括麻将、跑胡子、扑克。实现 lua 、c++ 、c# 、golang 、js 、java 、python 版本。( Mahjong algorithm ) observed · 2026-08-28
Health v2 · maintenance only
32/100
- Activity 0
- Release rhythm 35
- Longevity 100
Flags: no_releases no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 3530
- days_rel: n/a
- days_push: 810
- n_releases_24m: 0
Adoption not part of the score
2101 stars · 850 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A multi-language library implementing efficient winning-hand (hu) detection algorithms for tile and card games, including Mahjong, Paohuzi, and Doudizhu. It supports arbitrary numbers of wildcards (jokers) and special hand pattern detection, with implementations in Lua, C++, C#, Golang, JS, Java, and Python.
Use cases
- check if a mahjong hand is a winning hand
- detect mahjong winning hands with jokers/wildcards
- judge special mahjong patterns like seven pairs or thirteen orphans
- implement hu detection for a mahjong game server
- validate paohuzi card hands
- split and analyze tile hands for game logic
When to choose
- you need fast, battle-tested mahjong win detection in one of the supported languages
- your game must handle arbitrary wildcard (lai zi) counts
- you need special hand pattern recognition (qing yi se, peng peng hu, etc.)
When to avoid
- you need full game rules, scoring, or AI opponents - this only judges hands
- you work in a language not among the provided implementations
- you require a maintained release with a license for commercial use
Facets
library · maturity active
parser developer-tools gaming-tools cross-platform lua cpp python go jvm dotnet mahjong win-detection card-games paohuzi doudizhu multi-language table-lookup algorithm game-development algorithms javascript
1 source
- readme: https://github.com/yuanfengyun/q_algorithm · fetched 2026-08-28 · 9868893f5e67
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| yuanfengyun/q_algorithm | main | 32 |
For agents
markdown · JSON · MCP: product_card(name="yuanfengyun/q_algorithm")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem