# nullMachines | Verse Source: https://verse.works/exhibitions/nullmachine-kerimsafa-loackme Kiwi News: https://news.kiwistand.com/stories/nullMachines-or-Verse?index=0x668416f71a5fb5a5bbf3df704f157acfc8f436d3bdadc5452fc24f2a1e051cb12aef35e5 Submitted by misha on 2024-07-02 UTC, 1 upvote, 0 comments ## Summary nullMachines are generated by stitching together hand-drawn animated tiles using the wave function collapse algorithm, which repeatedly selects a grid cell, randomly picks a tile that fits its position and neighbors, and propagates the constraints until the grid is full. If a dead end is reached, the process restarts until a complete solution is found. Another component scans the machines' small built-in screens and generates their content in real time, including marquee messages and generative pixel animations rather than pre-rendered graphics. ## Article How does it work? Each nullMachine is generated by stitching together hand-drawn animated tiles with the help of an algorithm called 'wave function collapse'. Daniel Shiffman has a wonderful video about it on the Coding Train, but here's a quick & simplified run down of how it works. Let's start with an empty grid. Select a cell and identify all the tiles it can accommodate based on its position in the grid. If the cell is on the border of the grid for instance, we cross out all tiles with a little cube coming in or out of the border. Randomly choose one of the possible tiles for that cell; this process is known as “collapsing” the cell. Once the cell is collapsed, examine its neighboring cells. Eliminate any tiles that cannot be placed adjacent to the collapsed cell. Repeat this process for the neighbors of neighbors, continuing until all consequences of your choice have been resolved. Next, select the cell with the fewest remaining tile options and repeat the procedure. The algorithm concludes when all cells in the grid have been collapsed. If you encounter a dead end where no valid tile options remain for a particular cell, start over and try again until a complete solution is achieved. The wave function collpase algorithm in action.The wave function collapse algorithm in action. When the machine is ready, another component of the algorithm scans the small built-in screens and dynamically generates the content for display. This content encompasses marquee screens featuring a range of messages and generative pixel animations. Notably, these graphics are not pre-rendered; they come to life in real time. Combine everything and you got yourself a nullMachine!