Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

CellularAutomaton

Usage

CellularAutomaton[rnum, init, t] generates a list representing the evolution of cellular automaton rule rnum from initial condition init for t steps.
CellularAutomaton[rnum, init, t, { ,  , ... }] keeps only the parts of the evolution list with the specified offsets.


Notes

• Possible settings for rnum are:
n  ,  , elementary rule
{n, k} general nearest-neighbor rule with  colors
{n, k, r} general rule with  colors and range
{n, k, { ,  , ... ,  }}  -dimensional rule with  neighborhood
{n, k, {{ }, { }, ... , { }}} rule with neighbors at specified offsets
{n, {k, 1}}  -color nearest-neighbor totalistic rule
{n, {k, 1}, r}  -color range  totalistic rule
{n, {k, { ,  , ... }}, rspec} rule in which neighbor  is assigned weight
{fun, {}, rspec} applies the function fun to each list of neighbors, with a second argument
of the step number
CellularAutomaton[{n, k}, ... ] is equivalent to CellularAutomaton[{n, {k, {k^2, k, 1}}}, ... ].
• Common forms for 2D cellular automata include:
{n, {k, 1}, {1, 1}} 9-neighbor totalistic rule
{n, {k, {{0, 1, 0}, {1, 1, 1}, {0, 1, 0}}}, {1, 1}} 5-neighbor totalistic rule
{n, {k, {{0, k, 0}, {k, 1, k}, {0, k, 0}}}, {1, 1}} 5-neighbor outer totalistic rule
• Normally, all elements in init and the evolution list are integers between 0 and  .
• But when a general function is used, the elements of init and the evolution list do not have to be integers.
• The second argument passed to fun is the step number, starting at 0.
• Initial conditions are constructed from init as follows:
{ ,  , ... } explicit list of values  , assumed cyclic
{{ ,  , ... }, b} values  superimposed on a b background
{{ ,  , ... }, { ,  , ... }} values  superimposed on a background of
repetitions of  ,  ,
{{{{ ,  , ... },  }, {{ , ... },  }, ... }, bspec} values  at offsets  on a background
{{ ,  , ... }, { , ... }, ... } explicit list of values in two dimensions
{aspec, bspec} values in  dimensions with  -dimensional padding
• The first element of aspec is superimposed on the background at the first position in the positive direction in each coordinate relative to the origin. This means that bspec[[1, 1, ... ]] is aligned with aspec[[1, 1, ... ]].
• Time offsets  are specified as follows:
All all steps  through
u steps 0 through
-1 last step (step  )
{u} step
{ ,  } steps  through
{ ,  , du} steps  ,  +  ,
CellularAutomaton[rnum, init, t] generates an evolution list of length  .
• The initial condition is taken to have offset 0.
• Space offsets  are specified as follows:
All all cells that can be affected by the specified initial condition
Automatic all cells in the region that differs from the background
0 cell aligned with beginning of aspec
x cells at offsets up to  on the right
-x cells at offsets up to  on the left
{x} cell at offset  to the right
{-x} cell at offset  to the left
{ ,  } cells at offsets  through
{ ,  , dx} cells  ,  +  ,
• In one dimension, the first element of aspec is taken by default to have space offset 0.
• In any number of dimensions, aspec[[1, 1, 1, ... ]] is taken by default to have space offset {0, 0, 0, ... }.
• Each element of the evolution list produced by CellularAutomaton is always the same size.
• With an initial condition specified by an aspec of width  , the region that can be affected after  steps by a cellular automaton with a rule of range  has width  .
• If no bspec background is specified, space offsets of All and Automatic will include every cell in aspec.
• A space offset of All includes all cells that can be affected by the initial condition.
• A space offset of Automatic can be used to trim off background from the sides of a cellular automaton pattern.
• In working out how wide a region to keep, Automatic only looks at results on steps specified by  .
• See Section 3.8.6.
• Implementation notes: see Section A.9.4.
• New in Version 4.2.


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: