The Wavefunction Collapse Algorithm explained very clearly | Robert Heaton
The Wavefunction Collapse Algorithm teaches your computer how to riff. The algorithm takes in an archetypical input, and produces procedurally-generated outputs that look like it. (Source) It is most commonly used to create images, but is also capable of building towns, skateparks, and terrible poetry.