Abstract
Procedurally generating cohesive and interesting game environments is challenging and time-consuming. In order for the relationships between the game elements to be natural, common-sense has to be encoded into arrangement of the elements. In this work, we investigate a machine learning approach for world creation using content from the multi-player text adventure game environment LIGHT (Urbanek et al. 2019). We introduce neural network based models to compositionally arrange locations, characters, and objects into a coherent whole. In addition to creating worlds based on existing elements, our models can generate new game content. Humans can also leverage our models to interactively aid in worldbuilding. We show that the game environments created with our approach are cohesive, diverse, and preferred by human evaluators compared to other machine learning based world construction algorithms.
Introduction
Procedural Content Generation (PCG) is a cornerstone of modern game design, yet it frequently struggles with "common sense" cohesion. While algorithms can easily randomize a map, ensuring that a "Wizard’s Reagent Room" is logically placed near a "Wizard’s Tower"—and contains a "potion" rather than a "chainsaw"—requires a deep understanding of semantic relationships.
This research addresses the challenge of building full, interconnected environments where the placement of every forest path, shopkeeper, and treasure chest feels intentional. Moving beyond static, single-location settings, this work introduces a framework for creating dynamic, text-based fantasy worlds that players can explore coherently. By leveraging the LIGHT dataset, the authors trained models to logically arrange locations and populate them with appropriate characters and objects, while using large-scale pretraining to generate novel, creative descriptions for new game elements.
Methodology
The world-building process is decomposed into three distinct machine learning tasks:
- Arranging Locations: Treated as a ranking problem, the model predicts logical neighboring locations for a given area. The study compared Starspace (an efficient bag-of-words embedding model) against BERT-based architectures (Bi-Encoders and Cross-Encoders).
- Populating the World: Using the same ranking architectures, models predict appropriate characters for a room and the objects those characters should carry. Multi-task learning was employed to train on locations, characters, and objects simultaneously, creating a unified "world knowledge" base.
- Generating New Content: To create novel elements, a Transformer-based Sequence-to-Sequence model was used. This model was pretrained on 2 billion Reddit comments to capture the creative and conversational flair necessary for evocative fantasy writing.
Datasets
- LIGHT: The primary training data, consisting of crowd-sourced fantasy elements including 663 locations, 1,755 characters, and 3,462 objects, all accompanied by rich natural language descriptions.
- Reddit: A massive corpus used for pretraining the generative models to ensure linguistic variety and creativity in the generated text.
Key Results and Evaluation
The models demonstrated significant improvements over baseline methods in both automated and human evaluations:
- Automated Accuracy: In the location placement task, the Starspace model achieved a 45.5% Hits@1 score, significantly outperforming the Information Retrieval baseline (30.0%) and random selection (8.2%).
- Human Preference: In head-to-head comparisons, human evaluators preferred Starspace-generated worlds over random baselines 86% of the time.
- Interactive Design Utility: When acting as a "design assistant," the models helped humans build 9-room worlds in under 10 minutes, compared to 10–20 minutes for designers working without assistance. Furthermore, 90% of designers reported that the model's suggestions were diverse and fostered creativity.
Discussion and Future Work
A key insight from the study was the effectiveness of simpler models; the Starspace model often matched or outperformed heavier BERT models, suggesting that strong keyword associations provide a high-quality signal for common sense in world-building. Furthermore, the inclusion of "filler locations" (like empty closets) was found to be necessary to provide "breathing room" between high-intensity areas, mimicking human game design.
Despite these successes, limitations remain. The models inherited certain biases from the LIGHT dataset, such as a higher proportion of male characters. Additionally, while local "common sense" is strong, maintaining long-term narrative cohesion across massive worlds and avoiding repetitive linguistic patterns in generative descriptions are ongoing challenges. Future work may involve deeper integration of the game engine's state to ensure that generated descriptions are not only evocative but also mechanically consistent with the game's rules.
Summary updated