Building a Procedural Hex Map with Wave Function Collapse
6 points by imad
6 points by imad
This is lovely, but why call it wave function collapse?
A popular implementation ~10 years ago called it that and the name stuck in the field.
Ah, okay. Just seemed like a weird name for constraint solving.
this is the repo in question, with pointers to earlier work: https://github.com/mxgmn/WaveFunctionCollapse
The original WFC author didn't frame it in terms of constraint solving, but there was a paper a few years ago that mapped it more directly to existing constraint-solving methods & terminology that I found useful: https://dl.acm.org/doi/abs/10.1145/3102071.3110566
I've got a Carcassonne WFC map generating bot[0][1], as it happens, but I've not found it to be too troublesome for backtracking until you start adding extra-extra constraints (symmetries, tiles must match certain colours/positions, wraparounds, etc.)
Will have to try a hex version and investigate the "combine smaller grids" approach.
[0] Also available in a botsinbox flavour.
[1] Inspired by a former coworker's original non-WFC bot