RulePlot
✖
RulePlot
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)Summary of the most common use cases
Return the rule icon for elementary cellular automaton rule 30:

https://wolfram.com/xid/0e7pzwte-bboxcc

Plot the evolution of a cellular automaton for 10 steps:

https://wolfram.com/xid/0e7pzwte-vd0h1l


https://wolfram.com/xid/0e7pzwte-gs19dp

Plot the evolution of a Turing machine:

https://wolfram.com/xid/0e7pzwte-eae549


https://wolfram.com/xid/0e7pzwte-hvoap

Generate the evolution of a Turing machine:

https://wolfram.com/xid/0e7pzwte-e7kh9s

Use RulePlot to display the history, using information on the rule to determine the form:

https://wolfram.com/xid/0e7pzwte-tywlb

Show the rule icon for a substitution system:

https://wolfram.com/xid/0e7pzwte-s0fom6

Scope (42)Survey of the scope of standard use cases
System Rules (31)
CellularAutomaton (11)
Elementary cellular automaton rule 90:

https://wolfram.com/xid/0e7pzwte-bwj6ic

Cellular automaton with more than two colors:

https://wolfram.com/xid/0e7pzwte-nmtdbh

Cellular automaton with range greater than 1:

https://wolfram.com/xid/0e7pzwte-fdcf7e

Cellular automaton with fractional range:

https://wolfram.com/xid/0e7pzwte-clmqhk

Totalistic 3-color cellular automaton:

https://wolfram.com/xid/0e7pzwte-olwbba

Outer totalistic 3-color cellular automaton:

https://wolfram.com/xid/0e7pzwte-b4vlf4

General two-dimensional cellular automaton:

https://wolfram.com/xid/0e7pzwte-b7qms1

Totalistic two-dimensional 5-neighbor rule:

https://wolfram.com/xid/0e7pzwte-qyf924

Totalistic two-dimensional 9-neighbor rule:

https://wolfram.com/xid/0e7pzwte-1j1m6

Outer totalistic two-dimensional rule:

https://wolfram.com/xid/0e7pzwte-dmk01r

Rules specified using associations:

https://wolfram.com/xid/0e7pzwte-i2hj6i


https://wolfram.com/xid/0e7pzwte-io2bpu


https://wolfram.com/xid/0e7pzwte-pb3iik

TuringMachine (8)

https://wolfram.com/xid/0e7pzwte-by46wo

Turing machine with more than two states:

https://wolfram.com/xid/0e7pzwte-ygcin

Turing machine with more than two colors:

https://wolfram.com/xid/0e7pzwte-c395jq

Turing machines specified by rules:

https://wolfram.com/xid/0e7pzwte-cq5uzo

Explicitly specify values of the number of states s and the number of colors k for the same transition rules:

https://wolfram.com/xid/0e7pzwte-ulibwn

https://wolfram.com/xid/0e7pzwte-sskr7s


https://wolfram.com/xid/0e7pzwte-iqqziz

Single-state Turing machine heads are represented with a dot:

https://wolfram.com/xid/0e7pzwte-6dhczx

Increase the number of states to change the representation:

https://wolfram.com/xid/0e7pzwte-xnwew7

An underspecified Turing machine does not have rules for all s k input configurations:

https://wolfram.com/xid/0e7pzwte-yzh218

A nondeterministic Turing machine specifies different rules for the same input configuration:

https://wolfram.com/xid/0e7pzwte-sys1hd

SubstitutionSystem (8)
String substitution system for two characters:

https://wolfram.com/xid/0e7pzwte-dkxtna

String substitution system for more than two characters:

https://wolfram.com/xid/0e7pzwte-e583km

String substitution system for length-2 strings:

https://wolfram.com/xid/0e7pzwte-9uape

String substitution system for strings of different lengths:

https://wolfram.com/xid/0e7pzwte-cv05t6

List substitution system for two integer values:

https://wolfram.com/xid/0e7pzwte-wmki

List substitution system for more than two integer values:

https://wolfram.com/xid/0e7pzwte-l3uls8

List substitution system with lists of different lengths:

https://wolfram.com/xid/0e7pzwte-b655gn

Two-dimensional substitution systems:

https://wolfram.com/xid/0e7pzwte-c1cyfh


https://wolfram.com/xid/0e7pzwte-dx6jko

BooleanFunction (4)
Boolean function in two variables:

https://wolfram.com/xid/0e7pzwte-e5mvn6

Boolean function in more than two variables:

https://wolfram.com/xid/0e7pzwte-n3cvad

Boolean function based on a vector of truth values:

https://wolfram.com/xid/0e7pzwte-d4m46l

Boolean function based on a table of truth rules:

https://wolfram.com/xid/0e7pzwte-eqojhi

System Evolution (11)
CellularAutomaton (5)
Evolution of rule 30 for 10 steps:

https://wolfram.com/xid/0e7pzwte-gwwue8

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

https://wolfram.com/xid/0e7pzwte-l9hx4d

Evolution of a 3-color cellular automaton:

https://wolfram.com/xid/0e7pzwte-cl45b5

Evolution from a single 1 on a background of repeated 0110 blocks:

https://wolfram.com/xid/0e7pzwte-bk3u7z

Evolution of a 3-color totalistic code:

https://wolfram.com/xid/0e7pzwte-dmxgq6

Evolution of a 3-color outer totalistic code:

https://wolfram.com/xid/0e7pzwte-dszfdg

Evolution of rules specified by associations:

https://wolfram.com/xid/0e7pzwte-b3s57g


https://wolfram.com/xid/0e7pzwte-dvg74

TuringMachine (6)
Evolution of a 2-state, 2-color Turing machine, starting with a tape of four 0s:

https://wolfram.com/xid/0e7pzwte-bcidn

Evolution starting with an infinite tape of 0s:

https://wolfram.com/xid/0e7pzwte-d6kr1v

Evolution of a 3-state, 2-color Turing machine:

https://wolfram.com/xid/0e7pzwte-ip1edc

Evolution starting with a tape of 1 on a background of 0s:

https://wolfram.com/xid/0e7pzwte-cczn89

Evolution of a 2-state, 3-color Turing machine:

https://wolfram.com/xid/0e7pzwte-mswnob

Evolution with the head initially in state 2:

https://wolfram.com/xid/0e7pzwte-bp7oid

Evolution of a Turing machine specified by rules, starting from a background of repeated 021 blocks:

https://wolfram.com/xid/0e7pzwte-k05ftq

A nondeterministic Turing machine can give different evolutions depending on the order of its rules:

https://wolfram.com/xid/0e7pzwte-o7hx9w


https://wolfram.com/xid/0e7pzwte-vsybfs

An underspecified Turing machine does not have rules for all s k input configurations:

https://wolfram.com/xid/0e7pzwte-g7rkvj

Specifying a complete set of rules eliminates the fixed point:

https://wolfram.com/xid/0e7pzwte-v2r1v5

Options (19)Common values & functionality for each option
Appearance (4)

https://wolfram.com/xid/0e7pzwte-hr4x59


https://wolfram.com/xid/0e7pzwte-koknu6

Sometimes you can get a simplified result that shows cells whose value does not matter:

https://wolfram.com/xid/0e7pzwte-3avw

Shorten the display of the rule set:

https://wolfram.com/xid/0e7pzwte-nvh7d1

ColorRules (1)
FrameStyle (2)
Mesh (1)
MeshStyle (2)
PlotLegends (3)
Give a plot legend describing the rule in text:

https://wolfram.com/xid/0e7pzwte-cnlka6

Give a plot legend describing the rule as an icon:

https://wolfram.com/xid/0e7pzwte-cbcsy7

Give an arbitrary plot legend:

https://wolfram.com/xid/0e7pzwte-baza69

PlotMarkers (2)
PlotTheme (2)
Applications (2)Sample problems that can be solved with this function

https://wolfram.com/xid/0e7pzwte-f9i5o2


https://wolfram.com/xid/0e7pzwte-9nusui

Use RulePlot to legend the evolution of a CellularAutomaton:

https://wolfram.com/xid/0e7pzwte-lmg99

Properties & Relations (2)Properties of the function, and connections to other functions
Plot the evolution of a cellular automaton with ArrayPlot:

https://wolfram.com/xid/0e7pzwte-izicyr

Use RulePlot to plot the evolution and the rule icon:

https://wolfram.com/xid/0e7pzwte-c968yz

Plot the evolution of a Turing machine with ArrayPlot:

https://wolfram.com/xid/0e7pzwte-cytccx

Use RulePlot to plot the evolution and the head of the machine:

https://wolfram.com/xid/0e7pzwte-b1ivvq

Wolfram Research (2016), RulePlot, Wolfram Language function, https://reference.wolfram.com/language/ref/RulePlot.html (updated 2021).
Text
Wolfram Research (2016), RulePlot, Wolfram Language function, https://reference.wolfram.com/language/ref/RulePlot.html (updated 2021).
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.
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
Wolfram Language. (2016). RulePlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/RulePlot.html
BibTeX
@misc{reference.wolfram_2025_ruleplot, author="Wolfram Research", title="{RulePlot}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/RulePlot.html}", note=[Accessed: 23-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_ruleplot, organization={Wolfram Research}, title={RulePlot}, year={2021}, url={https://reference.wolfram.com/language/ref/RulePlot.html}, note=[Accessed: 23-March-2025
]}