4 ms·
Show HN: Simple Wave Function Collapse
- atum47 4y agoHi everyone, I finally got around to implement my version on the wave function collapse algorithm. WFC uses rules to define what tiles can be placed around each other. In order to achieve this rules, I wrote I simple tool that helped me to visualize every tile and all the tiles that can be placed around it (top, right, bottom and left sides). My code is very simple, I haven't looked at the original WFC code at all, I just "learned" the concepts. So, first I place a random tile at a random position, from that I grow the map chosing the neighbor with the lowest entropy (smallest number of possible tiles). Hope you like it.
- mannykannot 4y agoMay I suggest that you add this comment, and perhaps also some of the links that have been given in these comments, to the readme? Apparently I am not the only person for whom 'wave function collapse' means we're talking about quantum mechanics.
- UncleOxidant 4y agoI'm going to guess that at least 80% of us were thinking quantum physics when we read "wave function collapse".
- atum47 4y agoDefinitely feeling the same, sorry about the confusion
- atum47 4y agoFor sure, I'll do that. Sorry about the confusion
- atum47 4y agoReload the page for a new map
- gus_massa 4y ago[Note: The Github page has a static image. Reload the live version linked there https://victorribeiro.com/simpleWFC/ https://victorribeiro.com/simpleWFC/ ]
- ur-whale 4y agoPretty unclear what we're looking at here ... any context you'd like to provide?
- speps 4y agoA great explanation of Wave Function Collapse: https://www.youtube.com/watch?v=2SuvO4Gi7uY https://www.youtube.com/watch?v=2SuvO4Gi7uY
- usrn 4y agoMan I hate that name. It's a Markov chain where the input is the neighbors to the tile being generated. "Wave function collapse" makes it sound like there's something much more complicated going on.
- natly 4y agoI think the name is the main reason it's gotten as much attention as it has. It's really a basic technique and idea but I'm seeing people all over the place overhype it.
- toddm 4y agoHow is this related to making a measurement of a quantum system and the ensuing wavefunction collapse to one eigenstate? No offense, but it looks like a rendering of my lawn after the gophers got into it.
- platz 4y agoits not
- craggyjaggy 4y agoIt's a pretty well known algorithm for procedural terrain generation. No need to be snarky.
- toddm 4y agoJust my opinion on the visual. I did my doctoral work in the area of quantum dynamics, and wavefunction collapse does have a well-known definition and context. While it might (now) apply to the generation of terrain imagery as well, it's hardly related to the accepted definition and meaning in quantum mechanics. Perhaps a better title would be "Procedural Terrain Generation." Just my $0.02.
- platz 4y agoYou should message the creator and let him know your thoughts https://github.com/mxgmn/WaveFunctionCollapse https://github.com/mxgmn/WaveFunctionCollapse
- ShamelessC 4y ago> I did my doctoral work in the area of quantum dynamics Then why would you have any understanding of terms of art from outside of that field? I understand the confusion, but there's no need to imply that the OP is objectively wrong just because you don't like that (someone else) named their algorithm wave function collapse.
- YeGoblynQueenne 4y agoIt's not just about terrain and the original version is seeded with a prototype image that the algorithm learns a pattern from that it then replicates with variations. It's not described that way but it is a one-shot pattern learning algorithm that is much more interesting than just a procedural generation algorithm, or even a constraint solver as others have said. See the link to the creator of the original version given by platz in the sister comment. There's more going on than just "procedural terrain generation".
- dljsjr 4y agoBig confusion time on the algorithm name, like many other I was also coming in expecting this to be some sort of visualization of the concept of wave function collapse from quantum physics: https://en.wikipedia.org/wiki/Wave_function_collapse https://en.wikipedia.org/wiki/Wave_function_collapse This is referring to a Procedural Generation algorithm named the Wave Function Collapse algorithm: https://github.com/mxgmn/WaveFunctionCollapse https://github.com/mxgmn/WaveFunctionCollapse
- amelius 4y agoIs this related to how generative neural networks work?
- natly 4y agoNot really
- UncleOxidant 4y agoOh, thanks. I clicked on that and saw a patch of grass and some water and was wondering what the heck that had to do with wave function collapse (in the quantum physics sense). Kind of waited to see if there was some animation, maybe some particles would hit the grass or water or something... but it was static.
- deleted 4y ago[deleted]
- atum47 4y agoEveryone, I was monitoring this thread a while back and it got no traction. I only now seeing the comments (we really do need a notification system for HN) I'll try to answer them all right now.
- atum47 4y agoSo, about the name, the first time I've heard about WFC was when this post was released https://github.com/mxgmn/WaveFunctionCollapse https://github.com/mxgmn/WaveFunctionCollapse I did not included it on my readme because I did not used or even looked at their code, but that's the WFC I was referring to when I named my project. I learned the basic concepts of WFC from different sources and try to implement them on my own.