In[]:=
mwgraph=GraphModule{res,sublevels,vfs},res=Reap[2,2,GraphLayout->"LayeredDigraphEmbedding"],"SubLevels";sublevels=res[[2,1,1]];res=res[[1]];vfs=Association[KeyValueMap[Function[{key,rules},key->GraphicsRow[ArrayPlot[ArrayPad[#,1]&/@#,ImageSize->{Automatic,(2+key[[1]])10},Mesh->(key[[1]]<5),MeshStyle->Opacity[.1]]&/@Union[CellularAutomaton[{#,2,2},{{1},0},key[[1]]+1]&/@rules],Spacings->0,PlotRangePadding->None]],sublevels]];ClearAttributes[vfs,Temporary];Subgraph[res,VertexOutComponent[res,{0,1}],GraphLayout->"LayeredDigraphEmbedding",AspectRatio->2/3,EdgeStyle->Gray,VertexSize->1/2,VertexShapeFunction->Function[Inset[Sow[vfs[#2]],#1,Automatic,Times[#3[[1]],#/Last[#]&@ImageDimensions[vfs[#2]],Sqrt[First[#2]+5]]]],PerformanceGoal->"Quality"],VertexCoordinates->;
In[]:=
mwgraph
Out[]=
In[]:=
rulesmap=Module{res,sublevels,vfs},res=Reap[2,2,GraphLayout->"LayeredDigraphEmbedding"],"SubLevels";First/@res[[2,1,1]]
Out[]=
{0,1}4294901480,{1,1}4009672564,{2,1}4139699108,{3,1}4009672548,{3,2}4139682740,{3,3}1992216484,{4,1}1992200116,{4,2}4009671524,{5,1}2585675684,{5,2}650009444,{6,1}2591958948,{6,2}442263460,{6,3}3460078436,{6,4}784227172,{6,5}2185122660,{7,1}4209549716,{7,2}3871120228,{7,3}2591958964,{7,4}1584180116,{7,5}2453555108,{8,1}1923777940,{8,2}2555536804,{9,1}4005469028,{9,2}370954148,{9,3}2589747108,{10,1}716968804,{11,1}3595086228,{11,2}2484211124,{12,1}2489461140,{12,2}2518289844,{12,3}1823512932,{13,1}2455644084,{13,2}2519337364,{13,3}2623678868,{13,4}3938227044,{14,1}3729303956,{14,2}983172532,{14,3}1449962388,{14,4}3198814612,{15,1}1348772756,{16,1}2552365460,{17,1}649878372,{17,2}2586444180,{17,3}849086372,{18,1}3028421012,{19,1}1019357588,{19,2}2490379700,{19,3}2621581716,{19,4}814745012,{19,5}2585396644,{20,1}848823732,{21,1}2619476372,{22,1}1514709396,{23,1}444344244,{23,2}3662193044,{25,1}2763020644,{25,2}3029470644,{28,1}2417100196,{28,2}3392835940,{39,1}3063549364,{45,1}2417362868,{64,1}2455381412
In[]:=
allpix=KeyValueMap[ArrayPlot[CellularAutomaton[{#2,2,2},{{1},0},First[#1]+1],ImageSize->Tiny]&,Association[rulesmap]]
Out[]=
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
In[]:=
ancestors=ResourceFunction["LowestCommonAncestors"][mwgraph];
In[]:=
gendist[g_,{c1_,c2_}->par_]:=Min[GraphDistance[g,#,c1]+GraphDistance[g,#,c2]&/@par]
In[]:=
pixmap[key_]:=ArrayPlot[CellularAutomaton[{#2,2,2},{{1},0},#1+1]]&[First[#],rulesmap[#]]&[key]
In[]:=
fd=FeatureDistance[allpix]
Out[]=
FeatureDistance
In[]:=
{pixmap[First[#1]],pixmap[Last[#1]]}&[{{13,4},{25,1}}]
Out[]=
{pixmap[{13,4}],pixmap[{25,1}]}
In[]:=
fd
,
Bit distance between rules
Bit distance between rules
[ With tooltips : ]
Add edges with thickness/opacity based on feature distance