Lurker News

Comments (122) 39 threads

Earlier comments
throwaway0000021 reply#
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!

ExUtumno5 replies#
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 not hard to generalize it to arbitrary shapes. Paul F. Harrison made a tiling program that supports hex tiles: http://logarithmic.net/pfh/ghost-diagrams See also the relevant paragraph in the readme (just search the word "easy").

DennisP1 reply#
Maybe it could be interesting to place Penrose tiles with the simple algorithm, but color them with your algorithm just like you're currently coloring squares.
ExUtumno#
So basically make a not-easy tileset with the shapes of Penrose tiles. Yes, this could be interesting.
hackpert#
I think you're right about Penrose tiles being easy. One could, however, potentially use this with polygonal tiles to find their Heesch numbers and maybe even make some advancements in solving some of the many unsolved problems associated with Heesch tiling.
derefr#
Penrose tiles are "easy" on an unbounded canvas, but I'm pretty sure they're a 100%-probable "contradiction" (because they're aperiodic) on a bounded toroidal canvas.
mathgenius#
You need a backtracking algorithm to do Penrose tiles, so yeah, you can get stuck.
abecedarius2 replies#
As I understand it: this treats image generation as constraint satisfaction. The constraints are that each NxN patch appears in the source image. The satisfaction method is arc consistency https://en.wikipedia.org/wiki/AC-3_algorithm, except, when that settles down prematurely, pick the least-constrained patch and make a random valid choice, then continue. (If this leads to getting stuck, then give up instead of backtracking.)

Is that the idea? The description wasn't completely clear to me.

abecedarius#
(I should've said most-constrained)
ExUtumno1 reply#
Yes, (C1) is a constraint problem. But we also want to satisfy (C2) as close as possible, otherwise we could have just colored some outputs in a single color.
abecedarius2 replies#
Yes, I took that to mean, when you're making a random valid choice, the weights come from the input distribution.

I don't understand about "a single color" unless you mean setting all output pixels to the same color, which would only satisfy the constraints if the input has an NxN patch all one color.
I hope my comment didn't seem to imply that the work seemed unoriginal. I don't think that; I wanted to check my reading.

ExUtumno2 replies#
Most of the examples in the repo have those NxN all one color patches. Or, without (C2) the algorithm would have generated completely empty integrated circuits, or completely grass terrain, which is really boring.

You understood right, it's constraints + probabilities.
Btw, I have different algorithm that satisfies (C2) perfectly, but not (C1): https://github.com/mxgmn/ConvChain

Continue this thread — 2 replies

throwathrowaway#
Thank you for writing this (and your last comment) out explicitly. The quantum mechanics description confused me (and possibly other from reading the thread here). Although I can understand how that inspired this work in the first place.

The algorithm used is exactly what you described here. It wasn't obvious to me that probability density functions were not tracked (the algorithm only tracks which NxN patch are allowed at each location) and randomness only come into play when a random valid choice is made, and there each valid patch is chosen probability proportional to its number of occurrence in the input.

twfarland3 replies#
Mindblowing... could this technique also be applied to music?
kowdermeister1 reply#
It should be, at least on audio level it would work. It would make a nice VST :)
mistagiggles#
Something similar does exist: http://labs.echonest.com/Uploader/index.html

It detects places in songs where the sound is similar, and can jump between these places in the track to make a seamless unending song.

ExUtumno2 replies#
I doubt it, because music is 1-dimensional and for 1-dimensional arrays WFC is just a Markov chain.
ssalazar2 replies#
Spectrogram is 2D (plot of amplitude given time and frequency).

Its interesting to think about it for a spectrogram because "similarity" is different in each dimension (freq vs. time). Frequency is also perceived logarithmically, so you would probably want to convert to e.g. Mel scale before applying this algorithm (a 2000-2100Hz change is much subtler than a 200-300Hz change).

Continue this thread — 2 replies

elihu#
Another multi-dimensional abstraction for music that's at a bit higher level is a musical lattice. The number of dimensions is limited by the largest prime you accept in the ratios you use. (Typical western music approximated by 12-tone equal temperament uses primes of 2, 3, and 5. Powers of 2 are often ignored because notes an octave apart are perceived to be sort of equivalent for harmonic purposes.)

https://en.wikipedia.org/wiki/Lattice_(music)

JonnieCache1 reply#
How is music 1-dimensional?
elevensies7 replies#
A microphone records amplitude of sound waves over time, i.e. the air pressure -- that's the dimension.

Continue this thread — 7 replies

toxik#
Perhaps possible to slice the music wave data into frames, perform FFT to get a spectrogram and use that as tiles?

Load more comments