Ludax: A GPU-Accelerated Domain Specific Language for Board Games

Graham Todd, Alexander G. Padula, Dennis J.N.J. Soemers, Julian Togelius · 2025

Read Ludax: A GPU-Accelerated Domain Specific Language for Board Games by Graham Todd, Alexander G. Padula, Dennis J.N.J. Soemers, Julian Togelius (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2506-22609.txt.

Introduction

Graham Todd, Alexander Padula, Dennis Soemers, and Julian Togelius set out Ludax. Ludax is a tongue to tell board games that builds to GPU sped code. Tongues that tell games let AI staff test plans through more than one game. They need not hand code each game. Learn by gains, in its turn, has been changed by speed from gear. Libs like JAX drive that speed.

Ludax joins the two thoughts. Write a board game once, and get a fast mock that runs in pairs. It plugs into deep learn paths. The text tells the tongue and the build steps in points. It gives speed tests and a show of train for bots that learn by gains. The frame and more than one game build are open source. They aim at games work from learn by gains to mind work.

Catalog record

CREATORGraham Todd, Alexander G. Padula, Dennis J.N.J. Soemers, Julian Togelius
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE48 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2506-22609

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Ludax: A GPU-Accelerated Domain Specific Language for Board Games Graham Todd, Alexander G. Padula, Dennis J.N.J. Soemers, Julian Togelius Abstract Games have long been used as benchmarks and testing environments for research in artificial intelligence. A key step in supporting this research was the development of game description languages : frameworks that compile domain-specific code into playable and simulatable game environments, allowing researchers to generalize their algorithms and approaches across multiple games without having to manually implement each one. More recently, progress in reinforcement learning (RL) has been largely driven by advances in hardware acceleration . Libraries like JAX allow practitioners to take full advantage of cutting-edge computing hardware, often speeding up training and testing by orders of magnitude. Here, we present a synthesis of these strands of research: a domain-specific language for board games which automatically compiles into hardware-accelerated code. Our framework, Ludax , combines the generality of game description languages with the speed of modern parallel processing hardware and is designed to fit neatly into existing deep learning pipelines. We envision Ludax as a tool to help accelerate games research generally, from RL to cognitive science, by enabling rapid simulation and providing a flexible representation scheme. We present a detailed breakdown of Ludax ’s description language and technical notes on the compilation process, along with speed benchmarking and a demonstration of training RL agents. The Ludax framework, along with implementations of existing board games, is open-source and freely available. 1 Introduction For the past 75 years, games have served as vital tests and benchmarks for artificial intelligence research. While many specific games have been completely solved schaeffer2007checkers or optimized beyond the abilities of the strongest human players campbell2002deep ; silver2017mastering , the general space of games remains a fertile ground for measuring improvements in reasoning, planning, and strategic thinking. A critical part of this progress, however, is the ability to test approaches and algorithms on a set of environments that are both diverse and computationally efficient. To help drive further games and learning research, we introduce Ludax : a domain-specific language for board games that compiles into GPU-accelerated code written in the JAX library jax2018github . Ludax draws on two main inspirations: (1) Ludii Piette_2020_Ludii , a general purpose description language for board games capable of representing more than 1400 games from throughout history and around the world, and (2) PGX koyamada2023pgx , a collection of optimized JAX-native implementations of classic board games and video games designed to facilitate rapid training and evaluation of modern reinforcement learning (RL) agents. Ludax presents a flexible and general-purpose game representation format that can be leveraged for efficient simulation and learning on modern computing hardware. Ludax currently supports two-player, perfect-information, turn-based board games played by placing pieces onto empty board cells. While this is a narrow class of games when compared to the full breadth of human designs and the set of mechanics implemented by Ludii , it is still broad enough to capture a wide range of existing games (e.g. Connect Four , Pente , Hex , …) as well as many unexplored novel games and variants that fall within that class. Further, Ludax is designed to be easily expandable – like with Ludii , implementing new game mechanics in Ludax only requires implementing new atomic components in the underlying description language. These components can then be combined compositionally with existing elements of the language to produce an entirely new range of possible games, instead of each game needing to be implemented separately. Another design goal for Ludax is ease of use, both in terms of game design and experimentation. The syntax of the description language is “ludemic” Piette_2020_Ludii – splitting game rules into clear sections governing the game’s setup, play mechanics, and end conditions. Like with Ludii , game programs in Ludax resemble English descriptions of rules (see Figure 1 ). Further, by leveraging the structure of the existing PGX library, environments instantiated in Ludax can be easily combined with existing frameworks for GPU-accelerated search, reinforcement learning, or evolution deepmind2020jax ; tang2022evojax . Ludax also supports a basic web interface for interactive debugging, with the aim to provide support for online interactive experiments in the future. To our knowledge, Ludax is the first game description language which compiles into GPU-accelerated code. In the following sections, we provide a detailed description of the language syntax, compilation process, and Ludax ’s expressive range. We also provide speed benchmarking compared to both Ludii and PGX , as well as an initial demonstration of training learned agents. Finally, we conclude with a discussion of potential use cases and future directions. Ludax is open-source under the Apache 2.0 license, and the code is available at: https://github.com/gdrtodd/ludax . Figure 1 : Example game descriptions for Reversi , Pente , and Yavalax in the Ludax game description language, along with literal translations into natural language. 2 Related Work While our core contribution of combining game description languages (GDLs) with hardware accelerated learning environments is novel, there is extensive research in each of these domains separately. Game Description Languages: Game description languages have been used for many years and in a variety of domains. The Stanford GDL Love_2008_GDL ; Genesereth_2014_GGP ; Schiffel_2014_Representing ; Thielscher_2017_GDLIII is among the most influential, helping to popularize research in general game playing Pitrat_1968_GGP through its use in the International General Game Playing Competition Genesereth_2005_GGP ; Genesereth_2013_GGP . Other notable examples include VGDL ebner2013towards ; Schaul_2013_VGDL ; Schaul_2014_Extensible (primarily known from its use in the General Video Game AI framework Perez_2019_GVGAI ), RBG Kowalski_2019_Regular , Ludi Browne_2009_PhD , and its successor Ludii Piette_2020_Ludii . GDLs have also been used to describe the rules of card games font2013card as well as to represent human goals in naturalistic simulated environments davidson2022creativity ; davidson2025goals . Modern game description languages have tended to move away from a basis in formal logic in favor of greater human usability, though there are benefits in efficiency gained by the use of regular languages Kowalski_2020_Efficient . GPU-Accelerated Environments: Recent years have seen a proliferation of learning environments implemented in the JAX library or other frameworks that enable hardware (typically GPU) acceleration. Examples include single-agent and multi-agent physics simulators freeman1brax ; Makoviychuk_2021_Isaac ; Bettini_2022_VMAS , ports of both classic and recent reinforcement learning tasks Dalton_2020_Accelerating ; gymnax2022github ; koyamada2023pgx ; matthews2024craftax , combinatorial optimization problems bonnet2023jumanji , multi-agent coordination problems rutherford2023jaxmarl , and driving simulators Gulino_2023_Waymax ; kazemkhani2025gpudrive . While these efforts have spurred significant progress and span a wide range of domains and task formulations, each of them implement a fixed environment or set of environments. As such, they cannot easily be extended to novel environments without first writing new hardware-accelerated code. 3 Description Language Details Ludax ’s game description language draws heavily on the Ludii description language, particularly in its use of “ludemic” syntax that represents game rules in terms of high-level and easily-understandable components Piette_2020_Ludii . The complete grammar file and syntax details are available in the Supplemental Material. 3.1 Equipment The equipment section contains information about the physical components used by the game. Currently, this only specifies the size and shape of the board (i.e. whether it is square, rectangular, hexagonal, or hexagonal-rectangular). The dimensions and shape of the

Read the complete text