Markov Senior -- Learning Markov Junior Grammars to Generate User-specified Content
Mehmet Kayra Oğuz, Alexander Dockhorn
TL;DR
Markov Senior introduces a genetic programming framework to automatically learn Markov Junior grammars from a single example, addressing the reliance on handcrafted rule sets in procedural content generation. By extracting pattern relations and enforcing relation-bounded rules, the method narrows the search space, while a two-stage evolutionary process and a divide-and-conquer strategy enable scalable generation of content that matches the input sample. The approach uses a KL-divergence-based fitness to maximize coherence with the example and demonstrates applicability to both image-like patterns and Super Mario levels, indicating versatility across domains. While showing promising results, the paper acknowledges limitations and emphasizes future work on parameter analysis, improved operators, and user-controlled trade-offs between novelty and coherence, with a public codebase to foster further development.
Abstract
Markov Junior is a probabilistic programming language used for procedural content generation across various domains. However, its reliance on manually crafted and tuned probabilistic rule sets, also called grammars, presents a significant bottleneck, diverging from approaches that allow rule learning from examples. In this paper, we propose a novel solution to this challenge by introducing a genetic programming-based optimization framework for learning hierarchical rule sets automatically. Our proposed method ``Markov Senior'' focuses on extracting positional and distance relations from single input samples to construct probabilistic rules to be used by Markov Junior. Using a Kullback-Leibler divergence-based fitness measure, we search for grammars to generate content that is coherent with the given sample. To enhance scalability, we introduce a divide-and-conquer strategy that enables the efficient generation of large-scale content. We validate our approach through experiments in generating image-based content and Super Mario levels, demonstrating its flexibility and effectiveness. In this way, ``Markov Senior'' allows for the wider application of Markov Junior for tasks in which an example may be available, but the design of a generative rule set is infeasible.
