Releases: MahjongRepository/mahjong
Releases · MahjongRepository/mahjong
v2.0.0
This is a major release that brings significant performance improvements, bug fixes, new features, and a cleaner API. Please check the full CHANGELOG for all the details.
Warning
This release contains breaking changes. Please review the breaking changes section below before upgrading.
Performance
- ~6x faster hand calculation overall (35,364 hands/sec vs 5,925), with a redesigned hand division algorithm (~3x faster on its own).
New features
- Ura dora support —
estimate_hand_value()now acceptsura_dora_indicatorsfor hands. - Separate yakuhai yaku for each seat wind and round wind (e.g.,
SeatWindEast,RoundWindSouth).
Breaking changes (highlights)
For the full list of breaking changes, please see the CHANGELOG.
- Dropped Python 3.9 — requires 3.10+.
Yakuis now an abstract base class with class-level attributes;yaku_idvalues reassigned.- Wind yakuhai classes renamed (
YakuhaiEast->SeatWindEast, etc.). - Several constants converted from lists to frozensets (
TERMINAL_INDICES,WINDS, etc.). AKA_DORA_LISTrenamed toAKA_DORAS.Meld.tilesis nowtupleinstead oflist.- Removed deprecated properties (
Meld.CHANKAN,Yaku.english,Yaku.japanese,Yaku.tenhou_id). - Various internal methods/attributes removed.
- Hands without yaku no longer count dora.
- Stricter validation in
Shanten(raisesValueErrorfor invalid tile counts).
Full Changelog: v1.4.0...v2.0.0
v1.4.0
What's Changed
- chore: Update astral-sh/setup-uv action by @Apricot-S in #78
- chore: Update actions/checkout action by @Apricot-S in #80
- chore: Add Python 3.14 support by @Apricot-S in #81
- feat: Deprecate
Shanten.number_charactersandShanten.number_isolated_tilesby @Apricot-S in #82 - feat: Deprecate internal state properties of Shanten by @Apricot-S in #83
- docs: Apply markdownlint rules to README by @Apricot-S in #87
- docs: Add badges by @Apricot-S in #88
- docs: Change
uv venvtouv syncfor accurate setup and dependency installation viapyproject.tomlby @Apricot-S in #89
Full Changelog: v1.3.0...v1.4.0
v1.3.0
Breaking Changes
- dropped support for Python 3.7 and 3.8
Bug fixes
- fix: Correct miscalculation of shanten number for Seven Pairs (chiitoitsu, 七対子) by @Apricot-S in #61
- fix: Correct miscalculation of shanten number for general form by @Apricot-S in #62
Other changes
- migrate the project to a modern Python stack: uv and ruff
- other minor improvements and optimizations along the way
- add support for Python 3.13
New Contributors
- @Apricot-S made their first contribution in #56
Full Changelog: v1.2.1...v1.3.0
v1.2.1
v1.2.0
This release contains many improvements and bug fixes. The new version was tested over millions of real hanchans and many bugs were fixed.
Incompatibility highlight:
- Python 2 support was dropped
- Changes in interfaces, please refer
doc/example.pyfor usage examples. For example now all four tiles should be in hand tiles when you have kan melds.