colorized-ECA

command module
v0.0.0-...-64b6d28 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2023 License: MIT Imports: 6 Imported by: 0

README

Colorized Elementary Cellular Automata

This program generates space-time diagrams for elementary cellular automata and color-codes cells based on the state configuration from the previous generation that determined the cell state.

See generated diagrams in this blog post.

For elementary cellular automata, the next generation of a cell depends on the state of three cells: the neighbor cell to the left, the cell itself and the neighbor cell to the right. This means that there are 2^3 = 8 possible state configurations that determine the state of a cell in the next generation.

By assigning a color to numbers 0-7, we can color-code each cell. For example, if the left neighbor is 'on' (1), the cell itself 'off' (0) and the right neighbor 'off' (0); this state configuration is encoded as binary 100, which translates to color number 4 in decimal.

To generate these diagrams, simply run go run main.go

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL