This project is a Rust port of Cryolite's C++ implementation of the algorithms for decomposing a given hand into blocks (winning form).
Original article (Japanese): 与えられた手牌をブロック(和了形)に分解するアルゴリズムについて(C++ 実装) #麻雀 - Qiita
This repository provides a standalone application for demonstrating mahjong hand decomposition algorithms.
Requires Rust 1.90+ and Cargo.
block-decomposition$ cargo runnumber of single color hands: 1723
max number of decomposition patterns: 4
map0 == map1
map0 == map2
map0 == map3These results confirm that multiple algorithmic approaches produce equivalent decompositions.
This Rust port is licensed under the MIT No Attribution license.
The original algorithms and C++ implementation were described by Cryolite in the article linked above.