|
|
|
|
|
by linkdd
101 days ago
|
|
This is not Wave Function Collapse. This is a constraint solver. The goal of the original algorithm ( https://github.com/mxgmn/WaveFunctionCollapse ) is to infer the constraints from a sample, and then run a constraint solver. Hard-coding the constraints skips the whole point of the algorithm (which is also badly named by the way). |
|
I think this algorithm is more efficient for generating maps with only local (adjacency) constraints, but setting this up as an integer linear program and plugging it into a constraint solver is more generalizable (say, if you wanted to enforce a constraint that rivers had to flow across the whole map and could not loop).
But I agree "wave function collapse" is not really the best name, for two reasons:
- the original repository mentions "it doesn't do the actual quantum mechanics, but it was inspired by QM", but it implies something QM-related.
- as an ORIE major in college that loved optimization, I think constraint satisfaction problems are really cool and actually somewhat approachable! So calling the heuristic something else like "wave function collapse" might limit people from finding previous work and known improvements (e.g. forward checking).
[0] https://www.cs.cornell.edu/courses/cs4700/2011fa/lectures/05...
[1] https://github.com/mxgmn/WaveFunctionCollapse