MahjongYakuEngine

EXECUTIVE SUMMARY
This structural matcher acts as an anomalous state detector, bypassing standard 面子 (meld) partitioning to identify non-standard discrete distribution models. It guarantees immediate verification of unique matrix forms through absolute address mapping.
EXPORTED FUNCTIONS & QUANTITATIVE LOGIC
- is_kokushi(string[] hand): Evaluates a raw string array against a fixed terminal-honor set. It maps the 14-element space directly onto 13 unique discrete anchor positions. If the unique element set count equals 13, it flags a perfect terminal anomalous state.
- is_chiitoitsu(string[] hand): Scans the active element sequence to verify the absolute existence of exactly 7 unique paired elements. It prevents state contamination by ensuring no single node possesses a frequency count greater than 2 or less than 2.
概要
この構造マッチングライブラリは、異常状態検出器として機能し、標準的な面子分割をバイパスして非標準的な離散分布モデルを識別します。絶対アドレスマッピングを介して、固有のマトリックス形式の即時検証を保証します。
エクスポート関数と定量的ロジック
- is_kokushi(string[] hand): 生の文字列配列を固定の端位・字牌セットと照合して評価します。14要素の空間を13の固有の離散アンカー位置に直接マッピングし、一意の要素セット数が13に等しい場合、完全な端位異常状態(国士無双)を検出します。
- is_chiitoitsu(string[] hand): アクティブな要素シーケンスをスキャンし、正確に7つのユニークなペア要素の絶対的な存在を検証します。単一のノードが2を超える、または2未満の頻度カウントを持たないことを保証し、状態の汚染を防止します(七対子の正確な判定)。
追加:
is_ryanpeikou(counts)
Parameters:
counts (array<int>)
Pine Bibliothek
Ganz im Sinne von TradingView hat dieser Autor seinen/ihren Pine Code als Open-Source-Bibliothek veröffentlicht. Auf diese Weise können nun auch andere Pine-Programmierer aus unserer Community den Code verwenden. Vielen Dank an den Autor! Sie können diese Bibliothek privat oder in anderen Open-Source-Veröffentlichungen verwenden. Die Nutzung dieses Codes in einer Veröffentlichung wird in unseren Hausregeln reguliert.
I specialize in pushing basic, fundamental concepts to their absolute limits. Dedicated to engineering noise-free indicators that reveal true market mechanics and logical edges. Clarity over https://clutter.https://www.youtube.com/@alt.analyst
Haftungsausschluss
Pine Bibliothek
Ganz im Sinne von TradingView hat dieser Autor seinen/ihren Pine Code als Open-Source-Bibliothek veröffentlicht. Auf diese Weise können nun auch andere Pine-Programmierer aus unserer Community den Code verwenden. Vielen Dank an den Autor! Sie können diese Bibliothek privat oder in anderen Open-Source-Veröffentlichungen verwenden. Die Nutzung dieses Codes in einer Veröffentlichung wird in unseren Hausregeln reguliert.
I specialize in pushing basic, fundamental concepts to their absolute limits. Dedicated to engineering noise-free indicators that reveal true market mechanics and logical edges. Clarity over https://clutter.https://www.youtube.com/@alt.analyst