You-Only-Randomize-Once: Shaping Statistical Properties in Constraint-based PCG

Jediah Katz, Bahar Bateni, Adam M. Smith
9/1/2024
cs.AIcs.LO

No official code found. Best implementation: jediahkatz/you-only-randomize-once (1 star, MIT, last commit 2024-06-17).

Abstract

In procedural content generation, modeling the generation task as a constraint satisfaction problem lets us define local and global constraints on the generated output. However, a generator's perceived quality often involves statistics rather than just hard constraints. For example, we may desire that generated outputs use design elements with a similar distribution to that of reference designs. However, such statistical properties cannot be expressed directly as a hard constraint on the generation of any one output. In contrast, methods which do not use a general-purpose constraint solver, such as Gumin's implementation of the WaveFunctionCollapse (WFC) algorithm, can control output statistics but have limited constraint propagation ability and cannot express non-local constraints. In this paper, we introduce You-Only-Randomize-Once (YORO) pre-rolling, a method for crafting a decision variable ordering for a constraint solver that encodes desired statistics in a constraint-based generator. Using a solver-based WFC as an example, we show that this technique effectively controls the statistics of tile-grid outputs generated by several off-the-shelf SAT solvers, while still enforcing global constraints on the outputs.1 Our approach is immediately applicable to WFC-like generation problems and it offers a conceptual starting point for controlling the design element statistics in other constraint-based generators.

View on arXivView PDF

Code Implementations(1)

MIT

Code for the FDG 2024 paper "Shaping Statistical Properties in Constraint-based Procedural Content Generation"

10PythonMar 15, 20242 years agoMIT

Similar Papers

Cite this paper

@article{katz2024youonlyrandomizeonce,
  title  = {You-Only-Randomize-Once: Shaping Statistical Properties in Constraint-based PCG},
  author = {Jediah Katz and Bahar Bateni and Adam M. Smith},
  year   = {2024},
  eprint = {2409.00837},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.00837v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.00837.svg)](https://codeofpaper.com/paper/2409.00837)

Discussion