Back to AI Research

AI Research

Procedural Content Metageneration via Program Searc... | AI Research

Key Takeaways

  • Procedural Content Metageneration via Program Search and Continual Abstraction Discovery introduces a method to automate the creation of game level generator...
  • Large language models can generate executable programs, which makes it possible to search directly over procedural content generators rather than individual levels.
  • We study this approach in Sokoban, Zelda, Dangerous Dave, and Lode Runner.
  • Each run evolves complete Python generators through language-model mutation and crossover.
  • We introduce Continual Abstraction Discovery, or CAD, which extracts reusable primitives from high-fitness programs into a run-specific helper module.
Paper AbstractExpand

Large language models can generate executable programs, which makes it possible to search directly over procedural content generators rather than individual levels. We study this approach in Sokoban, Zelda, Dangerous Dave, and Lode Runner. Each run evolves complete Python generators through language-model mutation and crossover. We introduce Continual Abstraction Discovery, or CAD, which extracts reusable primitives from high-fitness programs into a run-specific helper module. A 2x2 experiment crosses CAD with access to a fixed hand-written domain API. The completed data set contains 160 complete runs, with at least ten 50-generation runs in every cell. CAD raises mean final best fitness in all eight domain and API comparisons. Across all CAD runs, learned libraries are adopted by most later programs and repeatedly rediscover validation, reachability, and structural utilities. These results support that discovering reusable primitives improves evolutionary program search for content generators.

Procedural Content Metageneration via Program Search and Continual Abstraction Discovery introduces a method to automate the creation of game level generators by using large language models (LLMs) to evolve executable Python code. Instead of searching for individual game levels, the system searches for the programs that generate them, allowing for more interpretable and reusable content generation.

Automating Generator Design

The research addresses the difficulty of engineering custom generators for specific games. By placing an LLM inside an evolutionary loop, the system treats code generation as a search problem. A candidate generator is executed, and its performance—measured by the quality, validity, and diversity of the levels it produces—guides the LLM in performing mutations and crossovers on the program code. This allows the system to evolve increasingly effective generators for games like Sokoban, Zelda, Dangerous Dave, and Lode Runner.

Continual Abstraction Discovery (CAD)

To improve the efficiency of this search, the authors introduce Continual Abstraction Discovery (CAD). As the evolutionary process runs, CAD identifies high-performing segments of code and extracts them into a run-specific helper module. These extracted functions are then validated and refactored back into the generator programs. This mechanism allows the "vocabulary" of available operations to grow during the search, enabling later programs to build upon previously discovered utilities like reachability checks, entity normalization, and structural construction.

Performance and Library Growth

In a study of 160 experimental runs, the researchers found that CAD consistently improved the final fitness of generators across all four tested game domains. The learned libraries typically expanded rapidly during early generations before stabilizing. Once these helper functions were established, they were adopted by the majority of subsequent programs. The study also observed that CAD reduced the overall line count of the best-performing programs, suggesting that moving complex logic into reusable helper functions simplifies the main generator code and potentially makes it easier to optimize.

Considerations and Limitations

While the results support the use of CAD for procedural content metageneration, the authors note several limitations. The computational cost is significant, requiring millions of tokens and several hours of processing time per run. Additionally, the current metrics for quality and diversity do not capture subjective elements like visual style, pacing, or designer intent, meaning human review remains necessary for aesthetic goals. The researchers also emphasize that while CAD improves performance, the current study evaluates the system as a complete pipeline, meaning the individual contributions of extraction, correction, and refactoring were not isolated.

Comments (0)

No comments yet

Be the first to share your thoughts!