Mahjax: A GPU-Accelerated Mahjong Simulator for Reinforcement Learning in JAX

Soichiro Nishimori, Shinri Okano, Keigo Habara, Sotetsu Koyamada, Eason Yu, Masashi Sugiyama

arXiv:2605.20577 · 2026-05-22 공개 · arXiv · PDF

reinforcement-learning high-throughput gpu-acceleration policy-training parallelization jax mahjong-simulator vectorized-environment

Abstract

Riichi Mahjong is a multi-player, imperfect-information game characterized by stochasticity and high-dimensional state spaces. These attributes present a unique combination of challenges that mirror complex real-world decision-making problems in reinforcement learning. While prior research has heavily relied on supervised learning from human play logs to pre-train the policy, algorithms capable of learning \textit{tabula rasa} (from scratch) offer greater potential for general applicability, as evidenced by the AlphaZero lineage. To facilitate such research, we introduce \textbf{Mahjax}, a fully vectorized Riichi Mahjong environment implemented in JAX to enable large-scale rollout parallelization on Graphics Processing Units (GPUs). We also provide a high-quality visualization tool to streamline debugging and interaction with trained agents. Experimental results demonstrate that Mahjax achieves throughputs of up to \textbf{2 million} and \textbf{1 million steps per second} on eight NVIDIA A100 GPUs under the no-red and red rules, respectively. Furthermore, we validate the environment's utility for reinforcement learning by showing that agents can be trained effectively to improve their rank against baseline policies.

한국어 요약

한 줄 요약

**[강화학습 환경 / GPU 가속]** Mahjax는 JAX로 vectorize한 Riichi 마작 시뮬레이터, A100 8장에서 no-red 200만 step/s·red 100만 step/s 처리량 달성, tabula rasa RL 연구 가능하게 함.

핵심 기여도

핵심 아이디어

복잡한 불완전정보 게임 RL 연구를 인간 기보 의존에서 해방하려면 GPU 대규모 병렬화 가능한 fully vectorized 환경이 필수이며, JAX 구현으로 8 GPU에서 초당 백만~수백만 step의 throughput을 달성해 tabula rasa 학습을 실현 가능하게 한다.

기술적 접근법

주요 결과

의의 및 한계

**의의**: 불완전정보·다인용 게임 RL 연구의 환경 표준 제공, GPU 대규모 병렬 throughput으로 tabula rasa 가능, 시각화 도구로 분석 용이성 확보, AlphaZero 계보의 마작 확장 토대. **한계**: Riichi 마작 단일 게임에 특화로 다른 카드·보드게임 일반화 별도 작업 필요, 학습 정책의 전문가 수준 도달은 미입증, 8 GPU 가정의 cost.

실용적 활용