Bitmap and tilemap generation from a single example
Bitmap & tilemap generation from a single example with the help of ideas from quantum mechanics - mxgmn/WaveFunctionCollapse
Opening excerpt (first ~120 words) tap to expand
WaveFunctionCollapse This program generates bitmaps that are locally similar to the input bitmap. Local similarity means that (C1) The output should contain only those NxN patterns of pixels that are present in the input. (Weak C2) Distribution of NxN patterns in the input should be similar to the distribution of NxN patterns over a sufficiently large number of outputs. In other words, probability to meet a particular pattern in the output should be close to the density of such patterns in the input. In the examples a typical value of N is 3. WFC initializes output bitmap in a completely unobserved state, where each pixel value is in superposition of colors of the input bitmap (so if the input was black & white then the unobserved states are shown in different shades of grey).
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at GitHub.