
What happened
A Qiita tutorial shows a Python-only parser that reads mjlog files, replays rounds, and turns each discard into a labeled training sample, verified across 3,000 games.
Why it matters
Developers building mahjong AI currently piece together tag meanings, meld codes, and win parsing from scattered sources, so a checked parser is seen likely to cut setup time before model work begins.
Summaries like this, every morning.
The post situates itself against earlier Japanese-language explanations of mjlog tags and meld codes, many written in Perl or built around conversion tools, and argues that what was missing is a single runnable Python path from raw log to training sample. It also stresses a validation habit: the replay function asserts hand consistency at each discard, and the author reports 3,000 games, 30,127 rounds and 1,441,017 discards with no errors. Those checks are presented as a way to catch parser mistakes rather than proof of correctness, and the author notes that mismatched tile types can still pass hand consistency, so cross-checks against things like yaku IDs are used as well.
The guide flags several traps that trip up would-be AI builders: seat order is relative to the starting dealer, tsumogiri (discarding the tile just drawn) has no explicit marker and must be inferred, double wins require storing multiple AGARI entries per round, and streamed hands omit melds. It warns that XML carries hidden information such as other players' hands and future dora, which, if fed to a model, would make it unusable in real play. The author limits the verified scope to 2023 four-player red-five Houou games and points readers toward shanten and tile-efficiency work as next steps.
Pick your industry and the AI tools you use, and get news related to your work every day.
Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →
Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.
Mistral published open weights for Mistral Large 4, a 1.05T-total, 52B-active model with 1M context and text+i…

The developer built J.H Editor for Windows to read and edit AI-generated Markdown, but says the most-used feat…

Cognition released Devin Security 2.0 on October 26, 2026, adding deep scans powered by frontier cyber models…

Forever Security's Gal Weizman detailed EMBRACE, where embedded browsers in Cursor, GitHub Copilot, OpenAI's C…

SB Intuitions announced Sarashina3.2 mini thinking, the Sarashina series' first thinking model, available via…

A Reddit poster traced failed agent runs and concluded that pasting bad code under a "DON'T do this" comment l…
