This experiment is made with state-control
This cyclic cellular automaton is a kind of automaton rule invented by David Griffeath and studied by several other researchers.
You can find more information and rules in Wikipedia.
Rendering is made with high performance method CanvasRenderingContext2D.putImageData()
with typed arrays and some bitwise magic inside React component <CanvasField />
.
On every step every cell changes its value to make it equal to a neighbor’s value if it has modular value one unit larger.
Run in bash
git clone git@github.com:bouvens/griffeath-machine.git
cd griffeath-machine
npm install
npm start
Also, there’s the script for local build
npm run build