RulePlot
RulePlot[sys]
generates a plot representing the rule for the computational system sys.
RulePlot[sys,init,t]
generates a plot of the evolution of the system sys from initial condition init for t steps.
RulePlot[sys,evol]
generates a plot of the evolution evol assuming it is derived from a system of the form sys.
Details and Options
- Possible computational systems sys include:
-
CellularAutomaton[spec] cellular automaton TuringMachine[spec] Turing machine SubstitutionSystem[spec] substitution system BooleanFunction[spec] Boolean function - TuringMachine[{rule,s,k}] can be used to specify a Turing machine in which rule does not uniquely specify a transformation for each of the s k possible configurations, but that nevertheless will be rendered assuming s head states and k tape colors.
- RulePlot works with 1D and 2D systems.
- Options include:
-
Appearance Automatic overall appearance ColorRules Automatic rules for determining colors from values Frame Automatic whether to draw a frame around rule cases FrameStyle Automatic the style to use for a frame Mesh Automatic whether to draw a mesh MeshStyle Automatic the style to use for a mesh PlotLegends None legends to include PlotMarkers Automatic markers for Turing machines, etc. PlotTheme $PlotTheme overall theme for the rule plot Spacings Automatic horizontal and vertical spacings - Possible appearance elements include:
-
"Contiguous" no space between states "Stacked" small space between states "Arrow" draw an arrow between states "Squares" squares for cells "Bricks" bricks for cells "Hexagons" hexagons for cells "Simplified" simplified rule cases "Short" show shortened list of rules - Possible plot legend forms include:
-
"Icon" use an icon as the legend "Text" use text as the legend expr arbitrary plot legend - In the form RulePlot[sys,evol], specific rules are typically ignored; only the implicit or explicit specification of number of colors, states, etc. is used.
Examples
open allclose allBasic Examples (5)
Return the rule icon for elementary cellular automaton rule 30:
Plot the evolution of a cellular automaton for 10 steps:
Plot the evolution of a Turing machine:
Generate the evolution of a Turing machine:
Use RulePlot to display the history, using information on the rule to determine the form:
Scope (42)
System Rules (31)
CellularAutomaton (11)
Elementary cellular automaton rule 90:
Cellular automaton with more than two colors:
Cellular automaton with range greater than 1:
Cellular automaton with fractional range:
Totalistic 3-color cellular automaton:
Outer totalistic 3-color cellular automaton:
General two-dimensional cellular automaton:
Totalistic two-dimensional 5-neighbor rule:
Totalistic two-dimensional 9-neighbor rule:
TuringMachine (8)
Turing machine with more than two states:
Turing machine with more than two colors:
Turing machines specified by rules:
Explicitly specify values of the number of states s and the number of colors k for the same transition rules:
Single-state Turing machine heads are represented with a dot:
Increase the number of states to change the representation:
An underspecified Turing machine does not have rules for all s k input configurations:
A nondeterministic Turing machine specifies different rules for the same input configuration:
SubstitutionSystem (8)
String substitution system for two characters:
String substitution system for more than two characters:
String substitution system for length-2 strings:
String substitution system for strings of different lengths:
List substitution system for two integer values:
List substitution system for more than two integer values:
System Evolution (11)
CellularAutomaton (5)
TuringMachine (6)
Evolution of a 2-state, 2-color Turing machine, starting with a tape of four 0s:
Evolution starting with an infinite tape of 0s:
Evolution of a 3-state, 2-color Turing machine:
Evolution starting with a tape of 1 on a background of 0s:
Evolution of a 2-state, 3-color Turing machine:
Evolution with the head initially in state 2:
Evolution of a Turing machine specified by rules, starting from a background of repeated 021 blocks:
A nondeterministic Turing machine can give different evolutions depending on the order of its rules:
An underspecified Turing machine does not have rules for all s k input configurations:
Specifying a complete set of rules eliminates the fixed point:
Options (19)
Appearance (4)
PlotLegends (3)
Applications (2)
Use RulePlot to legend the evolution of a CellularAutomaton:
Text
Wolfram Research (2016), RulePlot, Wolfram Language function, https://reference.wolfram.com/language/ref/RulePlot.html (updated 2021).
CMS
Wolfram Language. 2016. "RulePlot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/RulePlot.html.
APA
Wolfram Language. (2016). RulePlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RulePlot.html