This undergraduate thesis repository studies the trade-off between expected return and adverse outcomes in Riichi Mahjong. It currently provides a reproducible, CPU-compatible MahJax simulation baseline; it does not yet train PPO, CVaR, or neural-network policies.
MahJax was selected because it is a JAX-native, four-player Riichi Mahjong environment with explicit legal-action masks and a documented vectorized API. The initial baseline uses its simplified no_red_mahjong ruleset in single mode: one four-player hand, not a complete match.
Python 3.10--3.13 is supported. Create an environment, then install the project and its development tools:
python3 -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e '.[dev]'
python -m mahjong.simulation --episodes 10 --seed 42Run the test suite with:
pytestDetailed material: MahJax motivation, architecture, environment setup, and experiments.
- Establish random-policy simulation measurements.
- Add expected-return policy training.
- Add risk-sensitive objectives and adverse-outcome evaluation.
- Evaluate future CVaR-based methods under matched experimental conditions.