A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://reference.wolfram.com/language/ref/CellularAutomaton.html below:

CellularAutomaton—Wolfram Language Documentation

WOLFRAM Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technology expertise.

WolframConsulting.com

BUILT-IN SYMBOL

CellularAutomaton[rule,init,t]

generates a list representing the evolution of the cellular automaton with the specified rule from initial condition init for t steps.

CellularAutomaton[rule,init,{tspec,xspec,}]

gives only those parts of the evolution specified by tspec, xspec, etc.

CellularAutomaton[rule,init,{t,All,}]

includes at each step all cells that could be affected over the course of t steps.

Details Examplesopen allclose all Basic Examples  (3)

Run rule 30 for 2 steps:

Run for 50 steps from a single 1 on a background of 0s:

Generate an icon for a cellular automaton rule:

Scope  (91) One-Dimensional Rules  (26)

Elementary rule 73:

Generate the same result using RulePlot:

3-color rule 679458:

Generate a rule icon:

3-color totalistic rule with code 867:

2-color range- (two neighbors on the left and one on the right) rule 23898:

A general range- rule:

totalistic rule with code 10:

Rule 30 specified by giving explicit offsets for cells in its neighborhood:

An analog of rule 30 with modified offsets:

A rule with 2 neighbors:

Rule 30 specified by giving explicit weights for cells in its neighborhood:

A 3-color totalistic rule:

Totalistic rules have weight 1 for each offset in the neighborhood:

A 3-color outer totalistic rule:

Specify rule 90 by giving explicit replacements for neighborhoods:

Specify rule 90 by giving a single "algebraic" replacement rule:

Use an explicit Boolean formula for rule 30, operating on True and False states:

Values in a cellular automaton can be any symbolic expression:

Use an arbitrary symbolic function f as the rule to apply to range-1 neighbors:

Apply the function to neighbors with offsets and :

Set up a "Pascal's triangle cellular automaton":

Specify rule 90 as an explicit function:

Additive cellular automaton modulo 4:

The second argument to the function is the step number:

Change the rule at successive steps; #2 gives the step number:

Use continuous values for cells:

Specify rule 90 as a pure Boolean function:

An analog of rule 90 specified using a pure Boolean function:

Rules Specified by Associations  (5)

Specify rule 30 using an association:

3-color cellular automaton:

2-color range-3/2 cellular automaton:

3-color totalistic cellular automaton:

3-color outer totalistic cellular automaton:

Initial Conditions  (8)

Explicit initial conditions are assumed cyclic:

The left neighbor of the leftmost cell is the rightmost cell, and vice versa:

Random initial conditions:

Start with a "seed" consisting of the block 11101 surrounded by 0s:

Start from a single 0 surrounded by 1s:

Start from 111 on a background of repeated 10 blocks:

Specify the "seed" as a sparse array:

Use a SparseArray to give the complete cyclic initial condition:

Start from block 101 at offset and block at offset :

Time Steps  (6)

Two steps of evolution:

Alternative form:

A list containing only the second step:

The second step, not in a list:

Steps 50 through 80:

The initial condition is step 0:

Show every third step from 0 to 100:

Region Specifications  (11)

By default, CellularAutomaton automatically cuts off the region not covered by the pattern:

An equivalent form:

Include all cells that could possibly be affected given the structure of the rule:

Include only the region that differs from the background:

Include all cells that could possibly be affected:

By default, different rules give regions of different widths:

Force all rules of the same type to give regions of the same width:

The region that can possibly be affected depends on the range of the rule:

Show only the region from cell 0 (the position of the initial 1) to cell 40:

Negative positions are on the left:

Give the region consisting just of cell 0 at each step:

Include only the value of cell 0, not in a list:

Show every other cell in time and space:

Cell 0 is always the leftmost cell in the explicit part of the initial condition:

Repeat a finite block to fill the region of initial conditions from positions to :

Multidimensional Rules  (13)

Evolve range-1 2D (9-neighbor) totalistic code 14 for 2 steps:

Give only the result after 2 steps:

Show the result after 30 steps:

Show the mean color of each cell:

Show the space-time history as a 3D image:

Show a cube at the position of each 1 cell:

A spacetime slice for 50 steps across all values at offset 0:

Mean colors of all cells with particular positions:

Use RulePlot to visualize the totalistic rule specification:

5-neighbor totalistic rule:

5-neighbor outer totalistic rule:

Use RulePlot to visualize the outer totalistic rule specification:

Use an initial condition with two black cells, specified in a sparse array:

3D nearest-neighbor totalistic cellular automaton:

Multidimensional Rules Specified by Associations  (8)

Specify 2D totalistic code 14 using an association (with a 9-cell neighborhood assumed):

5-neighbor totalistic code 26:

Describe the neighborhood using the string "VonNeumann":

5-neighbor outer totalistic code 110:

Growth rule in which cells get value 1 when they have 1 or 2 neighbors (of 9) with value 1:

3D image:

Growth-decay rule in which cells get value 1 when they have 1 or 2 neighbors with value 1, and get value 0 if they have 6 or 7 neighbors with value 1:

Rule in which cells get value 1 when they have 1 or 2 neighbors with value 1, keep their value if they have 6 or 7 neighbors with value 1, and get value 0 otherwise:

Rule in which cells get value 1 when they have 1 neighbor (of 7) with value 1:

Rule in which cells get value 1 when they have 1 neighbor (of 27) with value 1:

Higher-Order Rules  (6)

Rule 30 written out explicitly as a "first-order rule":

A second-order analog of rule 30, involving two steps of initial conditions:

Include both initial-condition steps in the output:

Second-order rule 1008, starting with a single 1 in both initial condition steps:

Include both steps in the initial conditions:

Second-order totalistic rule 10 with 2 colors and range 1:

A -order version of the same rule:

Rule 150Rthe second-order reversible mod 2 rule:

A spacetime slice of a second-order totalistic rule with 2 colors and range 1:

Step 50 of the same rule:

Functional Versions  (6)

Give the result of one step of rule 30 evolution:

An alternative form:

Iterate a single step 3 times:

Give the result of 3 steps of evolution:

Give the result as a center region surrounded by repeating background:

Rule 45 gives a background of 1s after one step:

Iterate a single step of rule 45:

Specify the rule in operator form:

Special Rules Specified by Strings  (2)

Rule 30 specified as a string:

The Game of Life rule specified using a string:

Applications  (23)

Make a color picture of rule 30:

Make pictures of the first 32 elementary cellular automata:

Show the 2-color range-2 totalistic code 20 cellular automaton from a sequence of initial conditions:

Show results for 3-color range-3 totalistic code 1599 for different initial conditions:

Pad with three 0s at the side of each pattern:

Show a single evolution in multiple "panels":

Show 200 steps of rule 30:

Make a "random" walk from the values of cells on the center column of rule 30:

Find repetition periods of rule 90 in cyclic regions of successive widths:

Draw the state transition graph for rule 110 in a region of size 7:

Generate a difference pattern for two cellular automata with initial conditions differing by one bit:

Show the common evolution in gray:

Use an outer-totalistic 2D cellular automaton to generate a maze-like pattern:

Use a growth rule to generate an irregular pattern:

Show steps in the evolution of a 5-neighbor outer-totalistic 2D cellular automaton:

Show a "glider" in the Game of Life:

Show the evolution of the "puffer train" in the Game of Life:

The Game of Life from random initial conditions, averaged for 100 steps:

Averaged spacetime slice:

Patterns generated by a sequence of 2D 9-neighbor rules:

Mean cell values:

Render a 3D view of a 2D cellular automaton evolution using spheres:

Show a sequence of steps in the evolution of a 3D cellular automaton:

Show time averages of slices at a sequence of heights in a 3D cellular automaton:

Construct Pascal's triangle:

A cellular automaton based on multiplication of complex integers:

Algebraically simplify a mod 3 additive rule:

Properties & Relations  (9)

Include mesh lines:

Label cells:

Highlight the center column of cells:

Use RulePlot to generate graphics:

Image generates an image in which each cell is a single pixel:

steps of cellular automaton evolution give a list of length :

Initial conditions given as explicit lists are assumed cyclic:

The center cell starting from all possible tuples gives the digits in the rule number:

Here is a 5-neighbor outer totalistic code:

Generate its RulePlot:

The equivalent rule in growth-survival form:

The rule in growth-decay form:

Possible Issues  (7)

By default, the lists in each evolution are made only as long as they need to be:

Use {t,All} to get lists of the same length for all rules of a particular type:

If no cells ever differ from the background, the automatically selected region will always be empty:

Rules with alternating backgrounds can give lists which contain only 0s:

If the evolution is continued for 2 steps, explicit 1s are included in the 1-step result:

In this form, a specification of the background is included:

By default, each evolution is made only as wide as it needs to be:

Use {t,All} to get consistent widths:

A 3-color rule may generate only values 0 and 1:

If visualized with ArrayPlot, the value 1 will be shown black:

Use RulePlot to show colors correctly based on the underlying rule:

Explicit ColorRules also avoids the problem with default ArrayPlot:

Use RulePlot to show the underlying rule:

Cells and steps in CellularAutomaton are not numbered according to their part numbers:

Rule numbers have different meanings when the offsets are specified in different orders:

Wolfram Research (2002), CellularAutomaton, Wolfram Language function, https://reference.wolfram.com/language/ref/CellularAutomaton.html (updated 2017). Text

Wolfram Research (2002), CellularAutomaton, Wolfram Language function, https://reference.wolfram.com/language/ref/CellularAutomaton.html (updated 2017).

CMS

Wolfram Language. 2002. "CellularAutomaton." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/CellularAutomaton.html.

APA

Wolfram Language. (2002). CellularAutomaton. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CellularAutomaton.html

BibTeX

@misc{reference.wolfram_2025_cellularautomaton, author="Wolfram Research", title="{CellularAutomaton}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/CellularAutomaton.html}", note=[Accessed: 08-July-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_cellularautomaton, organization={Wolfram Research}, title={CellularAutomaton}, year={2017}, url={https://reference.wolfram.com/language/ref/CellularAutomaton.html}, note=[Accessed: 08-July-2025 ]}


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4