README-work
CellularAutomata
Raku package for representation and evolution of cellular automata.
Installation
From Zef ecosystem:
zef install CellularAutomataFrom GitHub:
zef install https://github.com/antononcube/Raku-CellularAutomata.gitUsage examples
Two steps of Rule 30 over a specified array:
use CellularAutomata;
cellular-automaton(30, [1, 0, 0, 0, 0, 0], 2)Four steps of initialization specification:
.say for cellular-automaton(30, [[1,], 0], 4)Show the table of rule 90;
rule-table(90, method => Whatever); # method takes also 'text' and 'html' Show rules of rule 90:
use CellularAutomata::Utilities;
cellular-automaton-from-number(90)Plot the array of 20 steps of Rule 30:
use Graphviz::DOT::Chessboard;
my @mat = cellular-automaton(30,[[1,], 0], 20);
dot-matrix-plot(@mat, :9graph-size, :0tick-font-size, :0tick-offset):svgFor more examples see the Jupyter notebook "CellularAutomaton.ipynb".
References
[Wk1] Wikipedia entry, "Cellular automaton".
[WRI1] Wolfram Research, Inc., CellularAutomaton, (2002 introduced, 2017 last update), Wolfram Language & System Documentation Center