CellularAutomatonBoundaries 1.02

documentation notebook

Charles Brummitt and Eric Rowland
https://ericrowland.github.io/packages.html

Introduction

CellularAutomatonBoundaries is a collection of tools for studying boundaries of one-dimensional cellular automata.
This introduction gets you started with a few features of the package; the next section provides a complete list of package symbols along with their usage messages and further examples.

To use CellularAutomatonBoundaries, first you will need to load the package by evaluating the following cell. (If you need help, see loading a package.)

<<CellularAutomatonBoundaries`

Creating cellular automaton data

The main symbols of the package are CreateIrregularBoundaryData and CreateRegularBoundaryData, which generate data on the boundary of a cellular automaton by running it for a certain number of steps and analyzing the row lengths.
The first argument (for each of these functions) is a the number of colors, and the second argument is the number of cells the rules depend on.

For example, the following determines the growth rate of the 2-color rule number 30 depending on 3 cells, begun from a single black cell on a constant white background.
This automaton grows linearly at a rate of 2 cells per step:

CreateRegularBoundaryData[2,3,"FileName"->None,"RuleNumbers"->{30}]

An explicit initial condition can be specified as follows.

CreateRegularBoundaryData[2,3,"FileName"->None,"InitialCondition"->{{1},0},"RuleNumbers"->{30}]

When no initial condition is specified, all single-cell initial conditions for which the background color reoccurs on a later step are considered:

CreateRegularBoundaryData[2,3,"FileName"->None,"RuleNumbers"->{45}]

Whereas all 2-color rules depending on at most 3 cells have simple growth, larger rules do not necessarily.
For example, the following automaton has a jagged boundary.

ArrayPlot[CellularAutomaton[{7403,2,List/@Range[0,3]},{{1},0},{200,All}],Frame->None,PixelConstrained->1]

CreateIrregularBoundaryData finds best-fit curves to the sequence of row lengths and computes various statistics:

CreateIrregularBoundaryData[2, 4,{{7403,{{1},0}}},"FileName"->None]

Storing data to files

When studying an entire rule space, or even several automata at once, it’s convenient to output data to a file rather than have it appear in your Mathematica session.
Setting $CellularAutomatonDataDirectory to a directory will tell the other symbols to write and read data files in this directory.
For example, we can set it to the current temporary directory:

$CellularAutomatonDataDirectory=$TemporaryDirectory;

Now data generated by CreateIrregularBoundaryData and CreateRegularBoundaryData without “FileName”->None will be stored in that directory with an automatic file name.

CreateRegularBoundaryData[2,3]

Or you can specify a file name:

CreateIrregularBoundaryData[2, 4,{{7403,{{1},0}}},"FileName"->"rule_7403.m"]

The symbols IrregularBoundaryData and RegularBoundaryData retrieve data stored to $CellularAutomatonDataDirectory for automatically-generated file names.

RegularBoundaryData[{{30,2,1},{{1},0}},"GrowthRate"]

Package symbols

CreateIrregularBoundaryData

?CreateIrregularBoundaryData

For the first five hundred 2-color rules depending on 4 cells, determine which have row lengths that are not periodic in the range 20≤t≤100, and find the best-fit curves to their sequences of row lengths:

Cases[Join@@Thread/@CreateRegularBoundaryData[2,4,"FileName"->None,"RuleNumbers"->Range[0,500],"TimeSpecs"->{{20,100}}],(n_->initialcondition_->_Missing):>{n,initialcondition}]
CreateIrregularBoundaryData[2,4,%,"FileName"->None]

Here are the options and default values for CreateIrregularBoundaryData:

Options[CreateIrregularBoundaryData]

CreateRegularBoundaryData

?CreateRegularBoundaryData

Survey all 2-color rules depending on 3 cells, begun from single-cell initial conditions, for rational growth rates:

CreateRegularBoundaryData[2,3,"FileName"->None]//Short

Here are the options and default values for CreateRegularBoundaryData:

Options[CreateRegularBoundaryData]

IrregularBoundaryData and RegularBoundaryData

?IrregularBoundaryData

?RegularBoundaryData

[See the Introduction for examples.]

$CellularAutomatonDataDirectory

?$CellularAutomatonDataDirectory