Hello everyone!
I’ve implemented Wave Function Collapse algorithm in Godot as a little coding practice: https://thegameissimple.itch.io/wave-function-collapse-in-godot
Initial source of inspiration: https://github.com/mxgmn/WaveFunctionCollapse
It’s a neat little algorithm and I invite everyone interested in some coding challenges to implement one yourself. The logic is pretty straight-forward, most of the challenge comes from designing a data structure to store tiles, rules, grid models and their relations. And, well, recursive backtracking is interesting too.
Peculiar thing is that it can be used to procedurally generate not only images, but also text (for poetry), meshes (for 3d level generation), and who knows what else.
There are other online implementations like this one in Unity: https://oskarstalberg.com/game/wave/wave.html
And this project generates infinite 3d city that looks pretty damn cool: https://marian42.itch.io/wfc
WFC was used in some games to generate some if not all of the content. Notable examples I am aware of: Caves of Qud, Townscaper, Bad North.
Hope you find it interesting :)