Manuscript submitted December 12, 2024; revised December 25, 2024; December 31, 2024; published March 12, 2025
Abstract—Procedural Content Generation (PCG) is a cornerstone of modern game development, enabling the automatic creation of game levels, characters, and narratives. This paper presents a novel methodology for PCG using Generative Datalog (GDatalog), a rule-based language extended with probabilistic capabilities. By treating the game state and previously generated elements as logical facts and representing generation rules as probabilistic GDatalog programs, we provide a declarative framework for content generation. Our approach iteratively maps the evolving game state to new game elements, ensuring both variability and adherence to gameplay constraints. The methodology is demonstrated through examples, highlighting its ability to produce diverse, context-sensitive content while maintaining logical consistency. This work lays the groundwork for structured, rule-driven PCG pipelines that leverage logical inference and probabilistic reasoning to enrich player experiences.
keywords—Procedural content generation, probabilistic logic programming, answer set programming, declarative programming
Cite: Mario Alviano, Pasquale Tudda"Generative Datalog for Procedural Content Generation in Video Games," Journal of Advances in Artificial Intelligence vol. 3, no. 1, pp. 90-108 2025.doi: 10.18178/JAAI.2025.3.1.90-108
Copyright © 2025 by the authors. This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited (CC BY 4.0).
Copyright © 2023-2025. Journal of Advances in Artificial Intelligence. All rights reserved.
E-mail: editor@jaai.net