WaveFunctionCollapse (WFC) is a constraint-satisfaction-based approach to procedural content generation via machine learning (PCGML). It is relatively easy to implement and requires very little training data, making it a popular approach. Generated game levels are guaranteed to look locally similar totheir example tilemaps; however, local adjacency rules often fail to capture global solvability rules, potentially making many such levels unplayable. Existing approaches to improving the solvability of WFC-generated levels typically require adding additional game-specific information in the form of global constraints, substantially increasing the complexity and time required for setup. The purpose of this work is to explore whether using level solutions as training data can allow WFC to learn solvability constraints and game mechanics. We have implemented a novel space-time approach that uses three-dimensional space-time blocks representing solutions to 2D levels as both input and output. Experiments using this method show that space-time WFC is capable of demonstrating localized game mechanics and creating small playable levels with given solutions. However, levels are slow to generate, and some high-level constraints are still not captured.
Read full abstract