The developer of Arb3a Baloot, a mobile implementation of the Saudi trick-taking game, has transitioned from a failed rule-based heuristic approach to a sophisticated reinforcement learning architecture. The initial hand-coded bot failed because it could not account for complex bidding dependencies, such as partner hand estimation and dealer position. To solve this, the developer implemented a Proximal Policy Optimization (PPO) algorithm utilizing self-play on a simulator that replicates the production Node.js server engine. The agent's state is represented by a 571-dimensional vector, encoding the 32-card hand as a bitmap, trick history with seat indices, inferred opponent voids, confirmed projects, bidding context, and current match scores. The model employs two policy heads for bidding and card play on a shared trunk, with rewards shaped via the qaid delta to accelerate convergence. To enable offline Android play via a Unity IL2CPP app bundle, the developer utilized model distillation to compress the trained policy into a lightweight on-device network. Evaluation is conducted by testing candidates against a champion model over 960 rotated-seat games. While a computationally expensive search-based player outperforms the network by a small margin, the PPO agent provides the necessary performance for real-time server deployment. The final mobile release is available on Android and iOS.

Read original