WOLFRAM NOTEBOOK

MMAPositionsList[rules_,init_List,t_Integer]:=Module[{m=Dispatch[rules],a=init},Prepend[Table[Last[a=MMAStep[m,a]],{t}],Last[init]]]
MAInitialState[n_]:={Table[0,{n}],(n-1)/2+1}/;OddQ[n]
MAToNet[list_]:=Module[{u,j,k},u[_]=Infinity;Reverse[Table[j=list[[i]];k=u[j];u[j]=i;i->{u[j-1],k,u[j+1]},{i,Length[list],1,-1}]]]
NeighborCountsI[g_,i0_,n_]:=Map[If[MemberQ[#,Infinity],Infinity,Length[#]]&,Module[{gp=Dispatch[Prepend[g,->{}]]},NestList[Union[Flatten[{#,#/.gp}]]&,{i0},n]]]
MMAStep[rules_,{tape_List,pos_Integer}]:=({FlattenAt[Insert[Drop[tape,{pos-1,pos+1}],#1,pos-1],pos-1],pos+#2}&)@@(If[2<=pos<=Length[tape]-1,Take[tape,{pos-1,pos+1}],Abort[]]/.rules)
Differences[list_]:=Drop[list,1]-Drop[list,-1]
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.