Goto

Collaborating Authors

 ludii


Regular Games -- an Automata-Based General Game Playing Language

Miernik, Radosław, Szykuła, Marek, Kowalski, Jakub, Cieśluk, Jakub, Galas, Łukasz, Pawlik, Wojciech

arXiv.org Artificial Intelligence

We propose a new General Game Playing (GGP) system called Regular Games (RG). The main goal of RG is to be both computationally efficient and convenient for game design. The system consists of several languages. The core component is a low-level language that defines the rules by a finite automaton. It is minimal with only a few mechanisms, which makes it easy for automatic processing (by agents, analysis, optimization, etc.). The language is universal for the class of all finite turn-based games with imperfect information. Higher-level languages are introduced for game design (by humans or Procedural Content Generation), which are eventually translated to a low-level language. RG generates faster forward models than the current state of the art, beating other GGP systems (Regular Boardgames, Ludii) in terms of efficiency. Additionally, RG's ecosystem includes an editor with LSP, automaton visualization, benchmarking tools, and a debugger of game description transformations.


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

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

arXiv.org Artificial Intelligence

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.


Python Agent in Ludii

Neto, Izaias S. de Lima, Vieira, Marco A. A. de Aguiar, Tavares, Anderson R.

arXiv.org Artificial Intelligence

Ludii is a Java general game system with a considerable number of board games, with an API for developing new agents and a game description language to create new games. To improve versatility and ease development, we provide Python interfaces for agent programming. This allows the use of Python modules to implement general game playing agents. As a means of enabling Python for creating Ludii agents, the interfaces are implemented using different Java libraries: jpy and Py4J. The main goal of this work is to determine which version is faster. To do so, we conducted a performance analysis of two different GGP algorithms, Minimax adapted to GGP and MCTS. The analysis was performed across several combinatorial games with varying depth, branching factor, and ply time. For reproducibility, we provide tutorials and repositories. Our analysis includes predictive models using regression, which suggest that jpy is faster than Py4J, however slower than a native Java Ludii agent, as expected.


Grammar-based Game Description Generation using Large Language Models

Tanaka, Tsunehiko, Simo-Serra, Edgar

arXiv.org Artificial Intelligence

--Game Description Language (GDL) provides a standardized way to express diverse games in a machine-readable format, enabling automated game simulation, and evaluation. While previous research has explored game description generation using search-based methods, generating GDL descriptions from natural language remains a challenging task. This paper presents a novel framework that leverages Large Language Models (LLMs) to generate grammatically accurate game descriptions from natural language. Our approach consists of two stages: first, we gradually generate a minimal grammar based on GDL specifications; second, we iteratively improve the game description through grammar-guided generation. Our framework employs a specialized parser that identifies valid subsequences and candidate symbols from LLM responses, enabling gradual refinement of the output to ensure grammatical correctness. Experimental results demonstrate that our iterative improvement approach significantly outperforms baseline methods that directly use LLM outputs. Our code is available at https://github.com/ A Game Description Language (GDL) [1]-[5] is a domain-specific language that expresses a wide range of games in a unified notation. For example, Ludii GDL [5] models over 1,000 games, primarily board games, as shown in Figure 1. Game descriptions represented in GDLs are highly machine-readable, making it easy to simulate gameplay using dedicated game engines. Given the amenability of GDLs for automatic game evaluation, they have been extensively used in research on automated game design. In particular, search-based methods such as evolutionary algorithms [4], MCTS [6], [7], and random forests [8] have proven successful in generating game descriptions. Most research primarily focused on mutating existing games based on fitness functions to generate novel games. However, the task of generating game descriptions from natural language texts has not yet been sufficiently explored, and has the potential to lower the bar of entry to game design to non-specialists. In this research, we use Large Language Models (LLMs) [9], [10], which excel at understanding textual context, to generate game descriptions from natural language text in a two-stage process to enforce grammatical correctness. LLMs are language models with an enormous number of parameters, pre-trained on vast amounts of text data. The authors are with Waseda University, Tokyo, Japan. Their results have shown that more accurate game descriptions can be generated by appropriately refining the prompt context. However, LLMs may still generate grammatically incorrect game descriptions.


The Ludii Game Description Language is Universal

Soemers, Dennis J. N. J., Piette, Éric, Stephenson, Matthew, Browne, Cameron

arXiv.org Artificial Intelligence

There are several different game description languages (GDLs), each intended to allow wide ranges of arbitrary games (i.e., general games) to be described in a single higher-level language than general-purpose programming languages. Games described in such formats can subsequently be presented as challenges for automated general game playing agents, which are expected to be capable of playing any arbitrary game described in such a language without prior knowledge about the games to be played. The language used by the Ludii general game system was previously shown to be capable of representing equivalent games for any arbitrary, finite, deterministic, fully observable extensive-form game. In this paper, we prove its universality by extending this to include finite non-deterministic and imperfect-information games.


Measuring Board Game Distance

Stephenson, Matthew, Soemers, Dennis J. N. J., Piette, Éric, Browne, Cameron

arXiv.org Artificial Intelligence

This paper presents a general approach for measuring distances between board games within the Ludii general game system. These distances are calculated using a previously published set of general board game concepts, each of which represents a common game idea or shared property. Our results compare and contrast two different measures of distance, highlighting the subjective nature of such metrics and discussing the different ways that they can be interpreted.


Spatial State-Action Features for General Games

Soemers, Dennis J. N. J., Piette, Éric, Stephenson, Matthew, Browne, Cameron

arXiv.org Artificial Intelligence

In many board games and other abstract games, patterns have been used as features that can guide automated game-playing agents. Such patterns or features often represent particular configurations of pieces, empty positions, etc., which may be relevant for a game's strategies. Their use has been particularly prevalent in the game of Go, but also many other games used as benchmarks for AI research. Simple, linear policies of such features are unlikely to produce state-of-the-art playing strength like the deep neural networks that have been more commonly used in recent years do. However, they typically require significantly fewer resources to train, which is paramount for large-scale studies of hundreds to thousands of distinct games. In this paper, we formulate a design and efficient implementation of spatial state-action features for general games. These are patterns that can be trained to incentivise or disincentivise actions based on whether or not they match variables of the state in a local area around action variables. We provide extensive details on several design and implementation choices, with a primary focus on achieving a high degree of generality to support a wide variety of different games using different board geometries or other graphs. Secondly, we propose an efficient approach for evaluating active features for any given set of features. In this approach, we take inspiration from heuristics used in problems such as SAT to optimise the order in which parts of patterns are matched and prune unnecessary evaluations. An empirical evaluation on 33 distinct games in the Ludii general game system demonstrates the efficiency of this approach in comparison to a naive baseline, as well as a baseline based on prefix trees.


Optimised Playout Implementations for the Ludii General Game System

Soemers, Dennis J. N. J., Piette, Éric, Stephenson, Matthew, Browne, Cameron

arXiv.org Artificial Intelligence

This paper describes three different optimised implementations of playouts, as commonly used by game-playing algorithms such as Monte-Carlo Tree Search. Each of the optimised implementations is applicable only to specific sets of games, based on their rules. The Ludii general game system can automatically infer, based on a game's description in its general game description language, whether any optimised implementations are applicable. An empirical evaluation demonstrates major speedups over a standard implementation, with a median result of running playouts 5.08 times as fast, over 145 different games in Ludii for which one of the optimised implementations is applicable.


General Board Game Concepts

Piette, Éric, Stephenson, Matthew, Soemers, Dennis J. N. J., Browne, Cameron

arXiv.org Artificial Intelligence

Many games often share common ideas or aspects between them, such as their rules, controls, or playing area. However, in the context of General Game Playing (GGP) for board games, this area remains under-explored. We propose to formalise the notion of "game concept", inspired by terms generally used by game players and designers. Through the Ludii General Game System, we describe concepts for several levels of abstraction, such as the game itself, the moves played, or the states reached. This new GGP feature associated with the ludeme representation of games opens many new lines of research. The creation of a hyper-agent selector, the transfer of AI learning between games, or explaining AI techniques using game terms, can all be facilitated by the use of game concepts. Other applications which can benefit from game concepts are also discussed, such as the generation of plausible reconstructed rules for incomplete ancient games, or the implementation of a board game recommender system.


General Game Heuristic Prediction Based on Ludeme Descriptions

Stephenson, Matthew, Soemers, Dennis J. N. J., Piette, Eric, Browne, Cameron

arXiv.org Artificial Intelligence

This paper investigates the performance of different general-game-playing heuristics for games in the Ludii general game system. Based on these results, we train several regression learning models to predict the performance of these heuristics based on each game's description file. We also provide a condensed analysis of the games available in Ludii, and the different ludemes that define them.