Live data from Hacker News

Show HN: Wave function collapse algorithm

github.com

31–40 of 127 posts

Re: Show HN: Wave function collapse algorithm

#31
post #19

I'm missing a lot here. How does this equate to wave function collapse?

>with the help of ideas from quantum mechanics. >so it doesn't do the actual quantum mechanics, but it was inspired by QM.

Yea, my only disagreement here is the name.

Re: Show HN: Wave function collapse algorithm

#33
post #11

This is great! It would be interesting to apply this concept to wavelets (instead of pixels or voxels) in order to work on real-life pictures. Also, 3 dimensions as in X, Y and time, to work on animated GIFs. Think about an infinite, never repeating Blue Ball Machine! http://m.imgur.com/5Flh68G

This is crazy, and I think it hints at the possibility of universe creation:

you start from a finite pattern, which becomes the 'rules' of your created universe. Then, using this wave function collapse algorithm you expand it into an infinity where the possibilities are endless within the constraints of those generator rules

Re: Show HN: Wave function collapse algorithm

#34

Earlier quoted context omitted.

>with the help of ideas from quantum mechanics. >so it doesn't do the actual quantum mechanics, but it was inspired by QM.

Yea, my only disagreement here is the name.

That'd explain why when I couldn't find an explanation of what wave function collapse meant.

Re: Show HN: Wave function collapse algorithm

#35

Great work! The fact that it captures "long-range order" seemingly perfectly is something not many have been able to do before! And the "collapse" visualization is great fun to watch. But is your algorithm really qualitatively all that different from previous search methods (e.g. Efros and Leung), if you are still (uniform random?) sampling over the input distribution of patches? I notice also your input textures ten…

Thanks!

Efros' and Leung's method doesn't satisfy the (C1) condition. The closest previous work is Paul Merrel's model synthesis.

WFC and texture synthesis serve similar purposes: they produce images similar to the input image. However, the definition of what is "similar" is different in each case. If you have a high def input with noise (like realistic rocks and clouds) then you really want to to use texture synthesis methods. If you have an indexed image with few colors and you want to capture... something like the inner rules of that image and long range correlations (if you have an output of a cellular automata, for example, or a dungeon), then you want to use WFC-like methods.

Btw, I have classic texture synthesis algos in a different repo: https://github.com/mxgmn/SynTex

Re: Show HN: Wave function collapse algorithm

#38

Can you feed it something other than bitmaps? Like its own source code?

Source code is a 1-dimensional array. For 1-dimensional arrays WFC is just a Markov chain. 2 and higher dimensional arrays are much more interesting because they have cycles, and there is no canonical way to generalize Markov chains to higher dimensions.

Re: Show HN: Wave function collapse algorithm

#40
post #36

This reminds me of the quite powerful PatchMatch algorithm [1]. Is it related? Also note how PatchMatch can work with constraints. [1] http://vis.berkeley.edu/courses/cs294-69-fa11/wiki/images/1/...

PatchMatch is an algorithm to quickly... match similar patches in an image, it is used in a lot of texture synthesis algos. See my answer to fitzwatermellow for the difference between texture synthesis and WFC. So yes, it's related.

Photoshop's implementation of PatchMatch handles constraints perfectly, yes.

Post reply on HN