Live data from Hacker News

Show HN: Wave function collapse algorithm

github.com

91–100 of 127 posts

Re: Show HN: Wave function collapse algorithm

#91
Fantastic stuff. I love it! As with most meachine learning stuff and these very cool ideas (of which I am very hazy on, esp their categorizations) I immediately want to use it for our lab's brain work.

We have a LOT of 3-D images (per voxel is ~200nmx200nmx~600nm for a lot of 1028x1028 .tiff images all stitched together) and would love to feed these images BACKWARDS into this. IE we have the 'far field', and we want the 'elements' that make it up. Say we have a large amount of data on the Pituitary gland, and we want to compare the 'elements' of the Pituitary to the 'elements' of the hippocampus. We know a lot of these differences, but there may be 'something else' in there that we humans are not seeing. This may be of great use to use for disease pathology like Lewy Body Disease precursors.

Re: Show HN: Wave function collapse algorithm

#92

This is pretty awesome, but there is no LICENSE file so I'm assuming no one is allowed to use it in their own projects.

I'm not experienced with the license law, but people told me that it's better to have license text in source files themselves, because I have samples in the repo that I have no idea who has rights for.

The license is MIT.

Re: Show HN: Wave function collapse algorithm

#93

The README says it uses real-valued probability amplitudes, not complex-valued wavefunction. Could the simulation be done with complex numbers and if so how would the results differ?

We need to interpret those coefficients somehow. Real coefficients can be interpreted as mixing of colors, but for complex ones I don't see a good interpretation.

Re: Show HN: Wave function collapse algorithm

#94

I don't have much to contribute other than to say this is really amazing, and I want to throw all kinds of things at it and see what happens. Pardon my ignorance of how this works, does this algorithm have anything to do with symmetry breaking?

Thanks! No, not really. ConvChain though is related to symmetry breaking, the same way as MCMC simulation of the Ising model is https://github.com/mxgmn/ConvChain

ok thanks. The ConvChain project is also very interesting.

Re: Show HN: Wave function collapse algorithm

#96
post #64

Earlier quoted context omitted.

As a person currently rewriting the mapgen algorithm for their Dwarf-Fortress-like game, I'm very excited to experiment with this this weekend =D

Cool, got anything to show? :)

As far as the game? Sure I got a blog over here => http://ripplega.me/development/month-development-feb-08/ If you meant the map specifically, at a high level I haven't changed the algorithm (yet) so you can check out an overview of my current one here: http://ripplega.me/development/month-development-may-10/

The blog itself hasn't been updated it in a while as I've been in the midst of some pretty serious rewrites/refactors over the past several months. Since that post I've rewritten the game in TypeScript, rewritten the core engine to use the ECS (Entity Component System) pattern, and right now am actually in the midst of a rewrite of pretty much the whole game. Hence I mentioned the rewrite of the mapgen code, the first version of which was probably written 2 years ago hehe. I had a huge amount of features built up over 2 years (idealogically similar to DF in that regard heh) but realized I needed to pare down the feature set to get an alpha out so people could play. It's also allowing me to address some fundamental flaws that the engine built up over the past year or two. So that's the point where I'm at now.

Feel free to sub to the mailing list if you'd like to know about any updates and when the game comes to fruition you'll be notified ;)

Re: Show HN: Wave function collapse algorithm

#97

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 synthes…

Thanks for the reply!

So what I'm really after is a way to iteratively "perturb" the sample in such a way that the resulting texture will smoothly reflect those changes.

Take a look at this rough illustration:

Op-Art Texture Synthesis

http://imgur.com/a/1IKN3

You mentioned rotation and mirroring type bitmap ops in your algorithm. But how do we precisely apply a series of dynamic filters to the input to "evolve" the patch? Even using overlapping kernels it seems quite intensive! And prone to artefacts...

Re: Show HN: Wave function collapse algorithm

#99

Brilliant! Don't really understand the technique, but would like your thoughts on if it's possible to give a Penrose tile set as a seed and see if aperiodic order is generated. Lovin' it!

Thanks! I'm not sure, but I think that Penrose tilesets are what I call "easy": you can't run into a situation where you can't place a new tile. It would be great if someone here could confirm or deny this. So if this is the case, then Penrose tilesets are not interesting to WFC, because you can produce arbitrary tilings with much simpler algorithms. Right now though WFC is only working with square tiles, but it's no…

You need a backtracking algorithm to do Penrose tiles, so yeah, you can get stuck.

Re: Show HN: Wave function collapse algorithm

#100
post #72

Earlier quoted context omitted.

> something like the inner rules of that image and long range correlations I assume that if you feed WFC a large input image, it just thinks of that as a very complex set of rules that are harder to satisfy than those of a small input? Is there a way, then, to instead train the WFC algorithm on a large corpus of small, similar samples, such that it can try to derive the rules common to all the inputs in the corpus, a…

About harder and easier to satisfy, the question of how the rate at which the algorithm runs into contradictions depends on the input is not easy at all. There is no simple correlations between the contradiction rate and the size of the input. But the first thing you'll notice if you feed it an image with a lot of patterns, is that it will work very slowly. Yeah, the corpus thing can be done if we cut out rare patter…

I wonder if it would be interesting to purposely search for tilesets that maximize contradiction rate. What would those things look like?
Post reply on HN