https://github.com/mxgmn/WaveFunctionCollapse
Even more examples up there.
This algorithm is really amazing -- it's effectively very similar to a markov chain to generate map/image data.
I'm not sure how to think about this algorithm. Is it just applied statistics?
For a 2D map the loose layout of the algorithm is this: construct a 2D array of blank tiles. Choose a tile at random from the set of most-constrained tiles (this is currently all of them as they are all equally unconstrained) and give it a value according to some distribution. Constrain its neighbors' potential values and update whatever system you use to track most-constrained-tiles for selection, then repeat until no unset tiles remain.
Depending on the complexity of the distribution (# of tile types and absoluteness of neighbor relations), you may end up with a contradiction where an unset tile has no possibilities. At this point you could progressively backtrack, throw the whole set away, or fudge something, depending on what matters to you in life.
You can end up with some very cool things!
The problem has some neat aspects to consider in how to represent tiles, how to track constraints, how to efficiently update your selector, how to design your distributions, etc! There are a ton of avenues to explore.
I make no claims on the goodness of this example or its implementation, but I wrote a small game to use/test my wfc code here: https://wcarss.ca/jabiru/ -- the maps generated are entirely outputs of the algorithm.
https://boristhebrave.github.io/DeBroglie/articles/features....
[1]: https://github.com/mxgmn/WaveFunctionCollapse [2]: https://www.boristhebrave.com/2018/04/28/random-paths-via-ch... [3]: https://boristhebrave.github.io/DeBroglie/articles/features....
«in the deterministic collapse theory of 2016 [29] the nonlocal absolute phase constants of the wavepackets were taken as hidden variables (cf. [30]). Collapse occurs when two wavepackets spatially overlap and satisfy a mathematical criterion, which demands that their phase constants very nearly coincide. The wavepackets then collapse to the overlap volume. In a measurement this mimics the action of a point particle. The phase constants are pseudorandom numbers, in the sense of the deterministic chaos theory, and the Born rules are derived under the assumption that their distribution is uniform. »
« Physicists report that quantum behavior can be explained with classical physics for a single particle, but not for multiple particles as in quantum entanglement and related nonlocality phenomena ("spooky action at a distance" ["gruselige Action in einiger Entfernung" (german)],[344] according to Albert Einstein) »
https://www.eurekalert.org/pub_releases/2018-10/thni-wii1011...And another hidden variable theory explain quantum entanglement.
Thus, classical mechanism deterministically explain ALL of quantum mechanics ! What still needs to be done is to unify those three local hidden variable theories and wouldn't that create the first theory of Everything ? A thing that quantum mechanics will never by design be able to do by being incompatible with general relativity.
Let's be clear, probabilities distributions (quantum mechanics) are a Nice map of the territory. But the map isn't the territory ans the territory IS superdeterministic like classical mechanics.
Also, I believe that local hidden variable theories are deeply underresearched because mainstream scientists have not updated their belief on them since 40 years... I guess too that many quantum scientists are afraid of dropping the Nice absurd Idea of free will...
> The theory brings to light nonlocality that is implicit in the non-relativistic formulation of quantum mechanics and uses it to satisfy Bell's theorem.
[Disclaimer: I don't like pilot wave theory.]