The documentation for TuringMachine
gives the following example of a machine specified by explicit transitions:
t = TuringMachine[
{{state_,color_?EvenQ}:>{state,color/2,-1},{state_,color_?OddQ}:>{state,3 color+1,1}},
{1,{1,2,3,4,5}},5];
But attempting to plot this with RulePlot[t]
results in:
{{{1, 1, 0}, {1, 2, 3, 4, 5}}, {{1, 2, 1}, {4, 2, 3, 4, 5}}, {{1, 1,
0}, {4, 1, 3, 4, 5}}, {{1, 5, -1}, {2, 1, 3, 4, 5}}, {{1, 1,
0}, {2, 1, 3, 4, 16}}, {{1, 5, -1}, {1, 1, 3, 4, 16}}}
Why doesn't RulePlot
understand the explicit transitions TuringMachine
in the documentation?
ArrayPlot
works:ArrayPlot[Last /@ t, PlotLegends -> Automatic]
$\endgroup$RulePlot
? I don't see anything in the "documentation" that suggests that it wouldn't work. $\endgroup$