Function Repository Resource:

# MobileAutomaton

Compute the evolution of a mobile automaton

Contributed by: Stephen Wolfram
 ResourceFunction["MobileAutomaton"][rule,init,t] generates a list representing the evolution of the mobile automaton or block mobile automaton with the specified rule from initial condition init for t steps. ResourceFunction["MobileAutomaton"][rule,init] gives the result of evolving init for one step. ResourceFunction["MobileAutomaton"][rule] is an operator form of ResourceFunction["MobileAutomaton"] that corresponds to one step of evolution.

## Details and Options

The state for a mobile automaton is given in the form {{a1,a2,}, n}, where the ai are values of cells and n is the position of the active cell.
The rules for a basic mobile automaton are given as a list of elements of the form {{a-1,a0,a+1}{ap,dn}} where ap is the new value of the active cell, and dn is its displacement.
The rules for a block mobile automaton are given as a list of elements of the form {{a-1,a0,a+1}{{ap-1,ap0,ap+1},dn}} where the api are the new values for the block of cells, and dn is the displacement of the active cell.
The rules for a basic mobile automaton can be given as a pair of integers, in which case they will be decoded as specified in NKS page 887.
If the position of the active cell would be outside the range defined by the list of cells given, it is taken to be None.

## Examples

### Basic Examples

5 steps in the evolution of the mobile automaton from NKS page 71:

 In[1]:=
 Out[1]=

60 steps of evolution:

 In[2]:=
 Out[2]=

Evolution of the generalized mobile automaton from NKS page 73:

 In[3]:=
 Out[3]=

Position of the active cell in the generalized mobile automaton:

 In[4]:=
 Out[4]=

Complete evolution display:

 In[5]:=
 Out[5]=

Color the active cell red:

 In[6]:=
 Out[6]=

### Scope

Use rule numbers to specify a mobile automaton rule:

 In[7]:=
 Out[7]=

When the active cell goes out of the region defined, its position is given as None:

 In[8]:=
 Out[8]=

## Requirements

Wolfram Language 11.3 (March 2018) or above