Table of Contents
Fetching ...

GAVEL: Generating Games Via Evolution and Language Models

Graham Todd, Alexander Padula, Matthew Stephenson, Éric Piette, Dennis J. N. J. Soemers, Julian Togelius

TL;DR

GAVEL tackles automated game design across a large Ludii rule space by coupling a code-language-model mutation operator with MAP-Elites quality-diversity search. It leverages a 1182-game Ludii dataset to train CodeLlama-13b on a fill-in-the-middle objective and uses PCA-based behavioral axes to guide mutation and archiving, enabling exploration of novel, playable games beyond the training set. Quantitative results show GAVEL achieving higher quality-diversity scores and more novel, playable designs than baselines, while qualitative playtests reveal engaging, nontrivial variants such as Havabu and YavaGo. The work demonstrates the potential of co-creative AI for game design and points to future directions in grammar integration, human evaluation, and language-to-code bridging to enhance interpretability and reach.

Abstract

Automatically generating novel and interesting games is a complex task. Challenges include representing game rules in a computationally workable form, searching through the large space of potential games under most such representations, and accurately evaluating the originality and quality of previously unseen games. Prior work in automated game generation has largely focused on relatively restricted rule representations and relied on domain-specific heuristics. In this work, we explore the generation of novel games in the comparatively expansive Ludii game description language, which encodes the rules of over 1000 board games in a variety of styles and modes of play. We draw inspiration from recent advances in large language models and evolutionary computation in order to train a model that intelligently mutates and recombines games and mechanics expressed as code. We demonstrate both quantitatively and qualitatively that our approach is capable of generating new and interesting games, including in regions of the potential rules space not covered by existing games in the Ludii dataset. A sample of the generated games are available to play online through the Ludii portal.

GAVEL: Generating Games Via Evolution and Language Models

TL;DR

GAVEL tackles automated game design across a large Ludii rule space by coupling a code-language-model mutation operator with MAP-Elites quality-diversity search. It leverages a 1182-game Ludii dataset to train CodeLlama-13b on a fill-in-the-middle objective and uses PCA-based behavioral axes to guide mutation and archiving, enabling exploration of novel, playable games beyond the training set. Quantitative results show GAVEL achieving higher quality-diversity scores and more novel, playable designs than baselines, while qualitative playtests reveal engaging, nontrivial variants such as Havabu and YavaGo. The work demonstrates the potential of co-creative AI for game design and points to future directions in grammar integration, human evaluation, and language-to-code bridging to enhance interpretability and reach.

Abstract

Automatically generating novel and interesting games is a complex task. Challenges include representing game rules in a computationally workable form, searching through the large space of potential games under most such representations, and accurately evaluating the originality and quality of previously unseen games. Prior work in automated game generation has largely focused on relatively restricted rule representations and relied on domain-specific heuristics. In this work, we explore the generation of novel games in the comparatively expansive Ludii game description language, which encodes the rules of over 1000 board games in a variety of styles and modes of play. We draw inspiration from recent advances in large language models and evolutionary computation in order to train a model that intelligently mutates and recombines games and mechanics expressed as code. We demonstrate both quantitatively and qualitatively that our approach is capable of generating new and interesting games, including in regions of the potential rules space not covered by existing games in the Ludii dataset. A sample of the generated games are available to play online through the Ludii portal.
Paper Structure (23 sections, 4 figures, 4 tables, 1 algorithm)

This paper contains 23 sections, 4 figures, 4 tables, 1 algorithm.

Figures (4)

  • Figure 1: GAVEL overview. Left: a dataset of games in the Ludii game description language is used to train a code large language model using the fill-in-the-middle objective on parenthetical expressions. Right: the trained code language model can then be used as the mutation operator for evolutionary quality-diversity optimization with the MAP-Elites algorithm. Fitness is determined with a suite of automatic evaluation metrics, and the Ludii game description language also affords a large number of semantic game "concepts" that are used to determine game novelty.
  • Figure 2: Left: the game of Havannah by Christian Freeling rendered in the Ludii game description language. Center: the same game as it appears in the training dataset, with functional references expanded and game / piece names replaced with abstract identifiers. Right: a variant of Havannah produced by GAVEL. Changes are highlighted in yellow.
  • Figure 3: A visualization of the fitness of games generated by GAVEL over time. Starting from an initial archive of 14 games, GAVEL produced in this run 185 novel variations within 500 generations, of which 130 are playable and meet our minimum evaluation criteria. Further, 62 generated games occupy cells not covered by any game in the Ludii dataset and 29 of these games meet our minimal criteria.
  • Figure 4: Example of play between MCTS agents in a game generated by GAVEL. The game is descended from Yavalath (an $n$-in-a-row style game) and combines a modification of its ending rules with the enclosure capture mechanics of Go. Search-based agents reach interesting and strategically deep game positions, hinting at its potential interest to human players as well.