Mathematica notebook for the ECA for Feynman Checkerboards​
​by Rodrigo A. Obando, Ph.D.
Columbus State University

Introduction

I recently saw this forum post and decided to modify my original partitioning (Obando) to create a Manipulate and provide an interactive version of the table shown here. There are a few aspects that are not currently showing such as PI, BO, RO, etc. However there is other information that is provided through tooltips that is not provided in the original table. It is a few years late but I hope somebody finds this code useful. Some of my original work can be found in [A], [B], [C] and [D].
The Manipulate offers the user the ability to change the initial conditions for the cellular automata evolutions. You may select simple input (...010...), simple input (...101...) or random input. This view of the table offers also a good way to show how similar behavior is clustered together.
Splits a rule into genes.
In[]:=
ECAFCBRuleGenes[rule_]:=Module[{digits=IntegerDigits[rule,2,8]},​​{FromDigits[digits[[{8,6,7,4}]],2],FromDigits[digits[[{1,3,2,5}]],2]}​​];
Computes a rule based on genes.
In[]:=
ECAFCBFromGenes[genes_]:=Module[{digits=Flatten[IntegerDigits[#,2,4]&/@genes]},​​FromDigits[digits[[{5,7,6,4,8,2,3,1}]],2]​​];
Computes the activity for the rule.
In[]:=
ECAFCBActivity[rule_]:=Module[{genes=ECAFCBRuleGenes[rule]},Flatten[Reverse[{Reverse[{"C","A","M","G"}[[Flatten[Position[IntegerDigits[genes[[1]],2,4],1]]]]],Reverse[{"X","Y","Z","T"}[[Flatten[Position[Reverse[IntegerDigits[genes[[2]],2,4]],1]]]]]}]]];
Four colors for coloring evolution class output.
In[]:=
ECAFCBcolors=
,
,
,
;
Returns the Wolfram class for the rule.
In[]:=
GetWolframClass[rule_]:=Module[{classes={{0,4,8,12,13,32,36,40,44,64,68,69,72,76,77,78,79,92,93,96,100,104,128,132,136,140,141,160,164,168,172,192,196,197,200,202,203,204,205,206,207,216,217,218,219,220,221,222,223,224,228,232,233,234,235,236,237,238,239,248,249,250,251,252,253,254,255},{1,2,3,5,6,7,9,10,11,14,15,16,17,19,20,21,23,24,25,26,27,28,29,31,33,34,35,37,38,39,41,42,43,46,47,48,49,50,51,52,53,55,56,57,58,59,61,62,63,65,66,67,70,71,73,74,80,81,82,83,84,85,87,88,91,94,95,97,98,99,103,107,108,109,111,112,113,114,115,116,117,118,119,121,123,125,127,130,131,133,134,138,139,142,143,144,145,148,152,154,155,156,157,158,159,162,163,166,167,170,171,173,174,175,176,177,178,179,180,181,184,185,186,187,188,189,190,191,194,198,199,201,208,209,210,211,212,213,214,215,226,227,229,230,231,240,241,242,243,244,245,246,247},{18,22,30,45,60,75,86,89,90,101,102,105,106,120,122,126,129,135,146,149,150,151,153,161,165,169,182,183,195,225},{54,110,124,137,147,193}}},​​Do[If[MemberQ[classes〚n〛,rule],Return[n]],{n,1,Length[classes]}]];
Generates 100 random 0s and 1s.
In[]:=
random=RandomInteger[{0,1},100];
Generates the gene set in the proper order to use as a horizontal component in the graph. Reverses the order to use as a vertical component in the graph.
In[]:=
ECAFCBGeneSet={0,1,2,4,8,3,5,6,9,10,12,7,11,13,14,15};​​ECAFCBAntiGeneSet=Reverse[ECAFCBGeneSet];
Figure 1.ECA for Feynman Checkerboards.
Manipulate[GraphicsGrid[Outer[Tooltip[ArrayPlot[CellularAutomaton[{ECAFCBFromGenes[{ECAFCBGeneSet[[#2+1]],ECAFCBAntiGeneSet[[#1+1]]}],2,1},If[#2≤#1,init,1-init],{50,{-50,50}}],ColorRules{0White,1ECAFCBcolors[[GetWolframClass[ECAFCBFromGenes[{ECAFCBGeneSet[[#2+1]],ECAFCBAntiGeneSet[[#1+1]]}]]]],_Black}],Text[Style[StringJoin[ToString[ECAFCBFromGenes[{ECAFCBGeneSet[[#2+1]],ECAFCBAntiGeneSet[[#1+1]]}]],"\n",Apply[StringJoin,ECAFCBActivity[ECAFCBFromGenes[{ECAFCBGeneSet[[#2+1]],ECAFCBAntiGeneSet[[#1+1]]}]]]],TextAlignmentCenter]]]&,Range[0,15],Range[0,15]],Frame->True,DividersAll],{init,{{{1},0}"Simple ..010..",{{0},1}"Simple ..101..",random"Random"}},SaveDefinitionsTrue]
Out[]=
​
init
Simple ..010..
Simple ..101..
Random

References

[A] Obando, Rodrigo, “Partitioning of Cellular Automata Rule Spaces,” Complex Systems, 24, 2015 pp. 27–48.
[B] Obando, Rodrigo, “ On a Unified Model of One-Dimensional Cellular Automata,” Physica D, to be submitted.
[C] Obando, Rodrigo, “Mining and Cataloguing the Computational Universe of Cellular Automata,” in Wolfram Technology Conference (Wolfram Tech Conf 2020), Champaign, Illinois, October 2020, (https://www.wolfram.com/broadcast/video.php?c=488&p=6&v=3317) URL.
[D] Obando, Rodrigo, “Artificial life and genes? different way to define cellular automata rules,”(Wolfram forum).