Wolfram Research

Function Repository Resource:

MobileAutomatonRulePlot

Source Notebook

Generate the rule icon for a mobile automaton

Contributed by: Stephen Wolfram and Jan Mangaldan

ResourceFunction["MobileAutomatonRulePlot"][rules]

generates a plot representing rules for a mobile automaton.

Details

ResourceFunction["MobileAutomatonRulePlot"] takes the same options as Graphics.

Examples

Basic Examples (1) 

Generate rule icons for a mobile automaton:

In[1]:=
ResourceFunction["MobileAutomatonRulePlot"][{57, 37}]
Out[1]=

Scope (4) 

Explicitly specify the rules for a mobile automaton:

In[2]:=
ResourceFunction[
 "MobileAutomatonRulePlot"][{{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}}]
Out[2]=

Use slightly more complicated rules:

In[3]:=
ResourceFunction[
 "MobileAutomatonRulePlot"][{{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}}]
Out[3]=

A generalized mobile automaton:

In[4]:=
ResourceFunction[
 "MobileAutomatonRulePlot"][{{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}}}]
Out[4]=

Use Graphics options:

In[5]:=
ResourceFunction["MobileAutomatonRulePlot"][{57, 37}, Frame -> True, FrameTicks -> None]
Out[5]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Version History

  • 1.1.1 – 21 July 2021

Source Metadata

Related Resources

License Information