Abstract
The researchers behind the Ludii general game system have developed a formal grammar to describe virtually any game board as a mathematical graph. By combining tilings, shapes, and graph operators, the system automatically derives complex topological properties—such as "diagonals" on circular boards or "knight moves" on semi-regular grids. This framework enables the digital modeling of thousands of diverse historical and modern games within a single unified engine.
Introduction
In General Game Playing (GGP), software engines are traditionally hard-coded for specific geometries, typically square or hexagonal grids. However, the Digital Ludeme Project aims to model over 1,000 traditional strategy games from human history, many of which feature "exotic" geometries: circular boards, three-dimensional structures, or irregular tilings where pieces might be played on vertices or edges rather than just inside cells.
The challenge lies in creating a system flexible enough to describe any conceivable board while remaining simple enough for human researchers to use. The authors address this by treating every board as a Game Graph where relationships between points are calculated automatically, moving away from fixed coordinate systems.
Formalizing the Game Board
The authors represent a game board as a triple $\mathcal{G} = \langle V, E, C \rangle$, where $V$ is a set of vertices, $E$ is a set of edges, and $C$ is a set of cells (faces).
Unified Playable Sites and Stacking
Unlike many systems, Ludii treats vertices, edges, and cells as equally valid "sites" for game pieces. A site is defined by its type, index, and level. The inclusion of "levels" allows the system to support games involving stacked pieces natively.
EBNF Grammar and Graph Operators
Boards are described using a simple Extended Backus-Naur Form (EBNF) grammar (e.g., (hex 4) or (tiling T3464 2)). Users can transform simple boards into complex ones using operators like dual (which turns cells into vertices) or subdivide (which splits faces into triangles). This generative approach allows for the creation of complex topological structures from basic primitives.
Movement and Topology
A key insight of the paper is the prioritization of topology over geometry. The system focuses on how sites are connected rather than their exact spatial coordinates. This allows logical moves, like a "knight move," to remain consistent even if the board is stretched or warped.
Movement is formalized through two primary mechanisms:
- Walks: Sequences of relative steps (e.g., "Forward, Forward, Right") that allow complex moves to be ported to non-square grids using "turtle graphics" style logic.
- Radials: Automatically generated "sliding" paths (like Rook or Bishop moves) that follow the board's topology. On certain grids, these radials can branch to maintain an intended average direction.
Results and Applications
The system has been successfully used to implement over 950 games in the Ludii database, ranging from ancient traditional games to modern designs. By pre-generating all possible steps and radials when a board is loaded, the system ensures that AI agents can traverse the board graph with high computational efficiency.
Conclusion and Future Work
The proposed geometry system offers a succinct and general method for modeling 1D, 2D, and 3D games. Future work will focus on automating symmetric board colorings (essential for games like Chess) and developing adaptive coordinate labeling systems that remain intuitive for human players on non-standard, spiral, or circular boards.
Summary updated