--- license: cc-by-4.0 --- # Mahjong Winning Tiles (胡啥牌) Benchmark ## Introduction Mahjong Winning Tiles is a benchmark dataset designed to evaluate the reasoning capability of large language models (LLMs). It focuses on assessing logical thinking, pattern recognition, and decision-making by challenging models to calculate possible winning tiles needed to complete a Mahjong hand of 13 tiles. ## Background: Mahjong Rules Mahjong is a traditional 4-player tile game originating from China and popular around many asian countries. While many regional variants exist, this dataset uses the most basic rules to simplify evaluation. Specifically: * **Total Tiles:** 136 tiles in total, excluding any bonus or flower tiles. Check [Mahjong tiles](https://en.wikipedia.org/wiki/Mahjong_tiles#Contents) wikipedia page for more details. * **Winning Condition:** A winning hand consists of: * **1 Pair**: Two identical tiles. (E.g., 🀙🀙) * **4 Melds:** Each meld can be either: * A **Sequence (Chow)**: Three consecutive tiles of the same suit. (E.g., 🀙🀚🀛) * A **Triplet (Pong)**: Three identical tiles (E.g., 🀙🀙🀙). * **No Special Hands:** Special rules such as 7 pairs, wildcard tiles, or other unique winning patterns are not considered. ## Dataset Format All tiles are respresented with their corresponding [unicode symbols](https://en.wikipedia.org/wiki/Mahjong_Tiles_(Unicode_block)). Each example in the dataset includes: * **Hand:** A list of 13 tiles representing the current hand. * **Winning Tiles:** A list of all possible tiles that can complete the hand, serving as the ground truth. Example: ```json { "hand": ["🀇", "🀈", "🀉", "🀊", "🀋", "🀌", "🀍", "🀎", "🀏", "🀙", "🀚", "🀛", "🀜"], "winning_tiles": ["🀙", "🀜"] } ``` The dataset is generated using a rule-based system and resampled based on the number of winning tiles to ensure an even distribution of different reasoning difficulties. The training set and test set consist of 4260 and 100 examples, respectively. ⠀ ## Leaderboard | | Direct Answer | Chain-of-Thought | |-------------------|---------------|------------------| | GPT-4o | 9% | 4% | | Claude 3.5 Sonnet | 1% | 9% | | DeepSeek R1 | - | 21% | | o1 | - | 31% | | o3-mini | - | 22% | All numbers above are evaluated with the following prompts. Prompt (Direct Answer) > Given a hand of 13 Mahjong tiles, return all possible tiles that complete the hand to win. > In Mahjong, a winning hand should contain 1 pair, and 4 triplets or sequences, 14 total tiles. No special rules (such as 13 orphan, 7 pairs) need to be considered. > > Return all possible tiles in unicode symbols directly, with NO preamble or explanation. > If there is no possible tile, return an empty list []. > > hand: {hand} Prompt (Chain of Thoguht) > Given a hand of 13 Mahjong tiles, return all possible tiles that complete the hand to win. > In Mahjong, a winning hand should contain 1 pair, and 4 triplets or sequences, 14 total tiles. No special rules (such as 13 orphan, 7 pairs) need to be considered. > > Think step by step, and return the final answer in unicode symbols after "####". > If there is no possible tile, return an empty list []. > > hand: {hand} Answer extraction script: ```python ALL_TILES = [chr(i) for i in range(0x1F000, 0x1F022)] def extract_answer(response: str) -> list[str]: answer = response.split("")[1] if "" in response else response answer = response.split("####")[1] if "####" in answer else answer winning_tiles = [tile for tile in ALL_TILES if tile in answer] return winning_tiles ``` ## License The dataset is licensed under CC BY 4.0. ## Links - [Blog: "Mahjong: Where Grandmas Beat The Best LLMs"](https://huggingface.co/blog/sileixu/mahjong) - [Mahjong Wikipedia](https://en.wikipedia.org/wiki/Mahjong) ## Citation ```latex @misc{mahjong-winning-tiles, author = {Silei Xu}, title = {Mahjong: Where Grandmas Beat The Best LLMs}, year = {2025}, journal = {Hugging Face Blog}, howpublished = {\url{https://huggingface.co/blog/sileixu/mahjong}}, } ```