[HN Gopher] Show HN: Simple Wave Function Collapse
___________________________________________________________________
Show HN: Simple Wave Function Collapse
Author : atum47
Score : 41 points
Date : 2022-05-15 02:15 UTC (2 days ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| toddm wrote:
| How 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 wrote:
| its not
| craggyjaggy wrote:
| It's a pretty well known algorithm for procedural terrain
| generation. No need to be snarky.
| toddm wrote:
| Just 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 wrote:
| You should message the creator and let him know your
| thoughts https://github.com/mxgmn/WaveFunctionCollapse
| YeGoblynQueenne wrote:
| It'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".
| ShamelessC wrote:
| > 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.
| steeleduncan wrote:
| It isn't, its a constraint solver, a closer analogue would be
| sudoku solving.
|
| The name arises because you start by population all grid
| squares with all possible tiles, and use the constraints to
| progressively eliminate tiles until there is only one for each
| grid square.
|
| Sometimes you need to make a random choice between equally
| valid tiles, so in a sense you start with a superposition of
| possible tilings, and reduce to a single one, hence the name.
| atum47 wrote:
| Hi 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 wrote:
| May 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.
| atum47 wrote:
| For sure, I'll do that. Sorry about the confusion
| UncleOxidant wrote:
| I'm going to guess that at least 80% of us were thinking
| quantum physics when we read "wave function collapse".
| atum47 wrote:
| Definitely feeling the same, sorry about the confusion
| atum47 wrote:
| Everyone, 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 wrote:
| So, about the name, the first time I've heard about WFC was when
| this post was released
| 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.
| atum47 wrote:
| Reload the page for a new map
| gus_massa wrote:
| [Note: The Github page has a static image. Reload the live
| version linked there https://victorribeiro.com/simpleWFC/ ]
| ur-whale wrote:
| Pretty unclear what we're looking at here ... any context you'd
| like to provide?
| orls wrote:
| Not OP, but I happened to see a good video on this recently:
| https://youtu.be/2SuvO4Gi7uY
|
| In short, it's an algorithm for procedural generation of tiled
| content, like 2d/3d game maps.
| ur-whale wrote:
| Thanks, very good video.
| speps wrote:
| A great explanation of Wave Function Collapse:
| https://www.youtube.com/watch?v=2SuvO4Gi7uY
| usrn wrote:
| Man 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 wrote:
| I 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.
| dljsjr wrote:
| Big 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
|
| This is referring to a Procedural Generation algorithm named the
| Wave Function Collapse algorithm:
| https://github.com/mxgmn/WaveFunctionCollapse
| UncleOxidant wrote:
| Oh, 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.
| amelius wrote:
| Is this related to how generative neural networks work?
| natly wrote:
| Not really
| [deleted]
___________________________________________________________________
(page generated 2022-05-17 23:02 UTC)