WaveFunctionCollapse algorithm

Jan 06, 2023

This program generates bitmaps that are locally similar to the input bitmap.

main collage

Implemented in many languages. video demonstration

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). The coefficients in these superpositions are real numbers, not complex numbers, so it doesn't do the actual quantum mechanics, but it was inspired by QM. Then the program goes into the observation-propagation cycle:

Found via untangle blog post

↑ up