A simple program to generate images for Wolfram's elementary automata. The output looks like this (for rule 126):
elementary-automata [<flags>] <rule> <file>
Flag | What does it do? | Default |
---|---|---|
-s |
How large is each generation? | 1000 |
-g |
How many generations should be simulated? | 1000 |
-c |
Create the initial generation with a centered "on" cell | false |
scale |
How large should each cell appear in the output image (in pixels)? | 1 |
rule |
Which elementary automata rule should be used? (30, 50, 126, etc) | N/ |
go get ./...
go run main.go -c 126 ~/one-twenty-six.png
(produces the image above)
You need Ginkgo, Gomega, and Counterfeiter installed to run the tests.
go get ./...
go generate ./...
go test ./...
orginkgo -r