Skip to content

bouvens/griffeath-machine

Repository files navigation

Griffeath’s Machine

Example of a frame

This experiment is made with state-control npm

What’s This?

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 />.

How It Works?

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.

How to Run Locally

Run in bash

git clone [email protected]:bouvens/griffeath-machine.git
cd griffeath-machine
npm install
npm start

Also, there’s the script for local build

npm run build