This is coolest algorithm I've ever used: Wave Function Collapse
The wave function collapse algorithm can produce outputs based on constrains in a sample input - it looks a lot like machine learning, but the algorithm is actually relatively easy to follow and produces very impressive results.
Robert's code: https://robertheaton.com/2018/12/17/wavefunction-collapse-algorithm/
My adaptation of Robert's code to TypeScript: https://gist.github.com/joshuamorony/18b723c42f2ad027650981c154f0abd0
Get weekly content and tips exclusive to my newsletter (plus get access to the complete archive of tips): https://mobirony.ck.page/4a331b9076
Learn Angular with Ionic: https://ionicstart.com
0:00 Introduction
1:05 A Simple Tiled Model
4:05 Examples
#javascript #algorithm #gamedev
- More tutorials: https://eliteionic.com
- Follow me on Twitter: https://twitter.com/joshuamorony