An AI Coach Teaches You in Real-Time! The Mechanism of the Browser-Based "AI Mahjong Dojo"
Learning the theory behind mahjong, such as "Why should I discard this tile?", is a very high hurdle for beginners. Therefore, in this article, we will explain in detail the mechanism of "AI Mahjong Dojo," a tool created by the operator using Claude (AI) to dramatically improve learning efficiency.
- 4-player riichi mahjong playable in a browser
- Real-time explanations from an AI coach for your own discards
- Operates by running local LLMs (such as Ollama)
What is "AI Mahjong Dojo"?
The theme of this article is a tool called "AI Mahjong Dojo," which the operator developed for their own learning. This is a system where you can play 4-player riichi mahjong on a browser (with 3 CPU opponents).
The biggest feature is that for every turn, the "recommended discard," a "comparison table of candidates," and above all, an "explanation by an AI coach" are displayed instantly. Furthermore, it features a mechanism where if you intentionally discard a tile different from the recommendation, you can ask "Why?" and the AI will provide a specific explanation for that reason.]
note_detailingsx=1
sub_paragraphs_notes
- Normal Mahjong: A mode where you can enjoy standard matches
- Flow Explanation: A mode where recommended discards, comparison tables, and AI explanations are displayed for each of your turns
- Random Problems: A practice mode to think about the optimal discard in specific situations (*Multiplayer support planned for the future)
"Streaming" and "Local LLMs" for Smooth Explanations
What supports the comfort of this tool is the method of displaying explanations. The AI coach's explanation is presented in a "streaming" format, where characters appear gradually as if flowing. This allows users to check the content smoothly without feeling the stress of waiting for the AI's response (*Streaming: A mechanism that displays generated data sequentially).
What is even more noteworthy is the identity of this AI coach. Rather than relying on external paid services, it utilizes a "local LLM" that runs on your own PC. According to official information, the model used during recordings was 『gemma4:12b-it-q8_0』 connected to Ollama (a tool for easily running LLMs in local environments).
The biggest advantage of using a local LLM is that you can run the AI using your own PC's resources. Note that it is also possible to play all modes with standard explanations provided by the engine, even without an LLM.
- Recommended Discard: The tile considered best for that situation
- Mouchousu (Tenpai Count): An indicator showing how many more turns until you can win
- Acceptance Count: An indicator showing the number of tiles you can accept when you next reach tenpai
Summary and Next Episode Preview
"AI Mahjong Dojo" is not just a tool for winning; it is a mechanism that accelerates learning speed by having the AI verbalize the "why" behind your own decision-making.
In the next installment (Part 2) of this series, we plan to delve deeper into the technical backend under the theme of "Judgment by Engine, Verbalization by LLM."]
note_detailingsx=1
sub_paragraphs_notes
- Key points from this time👇
- 4-player environment easily playable in a browser
- Real-time reason explanations by an AI coach
- A unique learning experience combined with local LLMs
Question from the Editorial Department to Readers
When learning games like mahjong, do you prioritize "theory" or "practice"? Please let us know in the comments.
- Beginners who want to learn mahjong theory
- Those interested in the mechanisms of self-made tools utilizing local LLMs
- Working professionals who want to learn efficiently using AI
- LLM (Large Language Model)
- Refers to a Large Language Model. It is the foundation technology for AI that can generate natural text like humans, such as ChatGPT and Claude.
- Local LLM
- Refers to a language model that runs using your own PC's hardware rather than on a cloud server. It is easier to protect privacy and allows for customization tailored to specific environments.
- Streaming
- A method of outputting generated characters to the screen sequentially (in real-time), rather than waiting for the AI to finish writing the entire text before displaying it.
FAQ
Can I play without an LLM?
Yes, according to official information, it is possible to play all modes with standard explanations provided by the engine even without an LLM.
What kind of model are you using?
It has been reported that the gemma4:12b-it-q8_0 model was used at the time of recording. (*Based on official information)
AI Mahjong Dojo is a learning tool for beginners that utilizes local LLMs to provide real-time explanations for your own discards.