Using Wave Function Collapse to solve puzzle map generation at scale
5 comments
·June 23, 2025kookamamie
quantadev
They say "On each step...[yadda yadda] we have a completely observed state, the wave function has collapsed."
So they're trying justify calling a "state" a "collapse". That's a bad metaphor to start with, but then they try to use that metaphor justify calling lots of other stuff "waves" that are unrelated to waves, and continue to shove that square peg thru a round hole. Hilarious.
phi-go
Interesting algorithm, thanks for sharing. I was wondering what the connection of Wave Function Collapse is to constraint solving, since it seems to do very similar things. Looks like there was a paper written on this topic: "WaveFunctionCollapse is Constraint Solving in the Wild". Still need to read it, though.
quantadev
Every time you locate something in space and/or time, it means a wave has collapsed. So that statement is as trivial as saying "constraints are about positions of things in space time." It's about as enlightening as saying "clocks tick" or "rulers have numbers on them."
greentec
I hit an interesting problem with my puzzle game Logic Islands - 3 out of 6 rulesets would hang forever trying to generate maps larger than 7x7.
The trick that worked? Using Wave Function Collapse, but choosing what to generate based on each ruleset - islands for some, walls for others. This flexibility made complex constraints (like "no 2x2 blocks") trivial to express as tile connection rules.
My favorite result: the "Minimal" ruleset enforces "all wall regions must be exactly 3 cells" using just 11 tiles and local WFC constraints. No post-processing needed.
Now generates 12x12 maps instantly instead of hanging forever.
Anyone else using WFC for logic puzzles beyond typical texture synthesis?
> Wave Function Collapse
I've always found the name pretty misleading and grandiose, relative to what the algorithm actually does.