Function Repository Resource:

MobileAutomatonPlot

Source Notebook

Visualization of the evolution of a mobile automaton

Contributed by: Stephen Wolfram and Jan Mangaldan

ResourceFunction["MobileAutomatonPlot"][evol]

plots the evolution of MobileAutomaton.

Details

ResourceFunction["MobileAutomatonPlot"] takes the same options as ArrayPlot.

Examples

Basic Examples (1) 

Plot the evolution of a mobile automaton:

In[1]:=
ResourceFunction["MobileAutomatonPlot"][
 ResourceFunction["MobileAutomaton"][{35, 57}, {ConstantArray[0, 21], 10}, 30]]
Out[1]=

Scope (3) 

Explicitly specify the rules for a mobile automaton:

In[2]:=
ResourceFunction["MobileAutomatonPlot"][
 ResourceFunction[
   "MobileAutomaton"][{{1, 1, 1} -> {0, 1}, {1, 1, 0} -> {0, 1}, {1, 0, 1} -> {1, -1}, {1, 0, 0} -> {0, -1}, {0, 1, 1} -> {0, -1}, {0,
      1, 0} -> {0, 1}, {0, 0, 1} -> {1, 1}, {0, 0, 0} -> {1, -1}}, {ConstantArray[0, 21], 10}, 30], Mesh -> True]
Out[2]=

Use slightly more complicated rules:

In[3]:=
ResourceFunction["MobileAutomatonPlot"][
 ResourceFunction[
   "MobileAutomaton"][{{1, 1, 1} -> {{0, 0, 0}, -1}, {1, 1, 0} -> {{1, 0, 1}, -1}, {1, 0, 1} -> {{1, 1, 1}, 1}, {1, 0, 0} -> {{1, 0, 0}, 1}, {0, 1, 1} -> {{0, 0, 0}, 1}, {0, 1, 0} -> {{0, 1, 1}, -1}, {0, 0, 1} -> {{1, 0, 1}, 1}, {0, 0, 0} -> {{1, 1, 1}, 1}}, {ConstantArray[0, 41], 20}, 100]]
Out[3]=

Plot the evolution of a generalized mobile automaton:

In[4]:=
ResourceFunction["MobileAutomatonPlot"][
 ResourceFunction[
   "MobileAutomaton"][{{0, 0, 0} -> {1, {1, -1}}, {0, 0, 1} -> {1, {-1}}, {0, 1, 0} -> {1, {1, -1}}, {0, 1, 1} -> {1, {-1}}, {1, 0, 0} -> {1, {1, 0}}, {1, 0, 1} -> {1, {1}}, {1, 1, 0} -> {0, {1}}, {1, 1, 1} -> {0, {1}}}, {ConstantArray[0, 43], {22}}, 20], Mesh -> True]
Out[4]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Version History

  • 1.1.0 – 20 July 2021
  • 1.0.0 – 20 December 2018

Source Metadata

Related Resources

License Information