This is an experiment I put together in Godot Game Engine inspired by and based in part on the incredible work by Martin Donald in his youtube video Superpositions, Sudoku, the Wave Function Collapse algorithm. https://www.youtube.com/watch?v=2SuvO4Gi7uY
This project attempts to use the built in GridMap inside the Godot Game engine to generate the WaveFuntionCollapse ruleset. The algorithm runs under the assumption that anything that you have built in the GridMap ruleset template represents a valid combination of cells, it then attempts to use a simple set of logical comparison and contraints to increase the flexiblity of potentional results generated from that ruleset while avoid invalid results.
In theory, a GridMap layout generated by the algorithm could then itself be used as a ruleset for subsequent generations, with or without additional alteration.