A generic cellular automata engine made in Haskell. It was initially implement as a pure functional program using Vector.Unboxed but was transitioned to Vector.Storable.Mutable for comfortable interop with JavaScript through WebAssembly. This enables direct mutation of memory, which has side effects.
Check out my portfolio for a live demo.
- Cabal 3.16
$ cabal run . <options>For example:
cabal run . -- ./patterns/conway/oscillator.tomlThis causes the program to take over the terminal and display the defined pattern in ./patterns.
Alternatively:
$ cabal run . -- \
<conway | seeds | bb | ww> \ # default = conway
<amount of generations to run> \ # default = 1000
<grid width> \ # default = 30
<grid height> \ # default = 30
<seed> \ # default = posix time
<density> \ # default = depends on select automaton
<delay> \ # default = 100000 (in µs)This will create a randomised initial state from the current POSIX time or from the provided seed. All arguments are optional, but there are defaults.