|
|
|
|
|
by jcalx
95 days ago
|
|
I didn't want to nitpick terminology, but yes, the tile-placement algorithm here is just a way of solving constraint satisfaction problems with DFS using a "minimum remaining values" heuristic [0]. The original use case for generating textures [1] is different in that the constraints are implicit in the input bitmap, but this project is a more straightforward tile placement with explicit constraints. 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 |
|