If we are predicting t steps ahead , we need to do t^2 operations
In[]:=
ArrayPlot[CellularAutomaton[30,{{1},0},5],Mesh->True]
Out[]=
In[]:=
ArrayPlot[ReplacePart[CellularAutomaton[30,{{1},0},5],{4,6}->-1],ColorRules->{-1->Red}]
Out[]=
In[]:=
Module[{x=1,y=x+1},{x,y}]
Out[]=
{1,1+x}
In[]:=
modca[rn_,init_,t_,{tm_,xm_}]:=Module[{u=CellularAutomaton[rn,init,{t,All}],v},v=CellularAutomaton[rn,MapAt[1-#&,u[[tm]],xm],t-tm+1];Join[Take[u,tm-1],MapThread[If[#1==#2,#1,#1-2]&,{Drop[u,tm-1],v},2]]]
In[]:=
modcaplot[rn_,init_,t_,{tm_,xm_},opts___]:=ArrayPlot[modca[rn,init,t,{tm,xm}],ColorRules->{0->White,1->Black,-1->Red,-2->Purple},opts]
In[]:=
modcaplot[30,{{1},0},5,{4,6},Mesh->True]
Out[]=
In[]:=
modcaplot[30,{{1},0},50,{30,50}]
Out[]=
In[]:=
modcaplot[30,{{1},0},50,{30,70}]
Out[]=
Region that is relevant is the intersection of the forward and past light cone
Area is (maybe): 2 dx dt
In[]:=
Table[Length[Flatten[Trace[ArrayPlot[With[{c=CellularAutomaton[30,{{1},0},t]},Table[If[#1!=#2,1,0]&[c[[-1,t+1]],CellularAutomaton[30,MapAt[1-#&,c[[j]],i],t+1-j][[-1,t+1]]],{j,t+1},{i,2t+1}]],Mesh->True,ColorRules->{1->Lighter[Red,.2],-1->Lighter[Blue,.2],0->LightGray}],_CellularAutomaton]]],{t,10}]
Out[]=
{7,16,29,46,67,92,121,154,191,232}
In[]:=
FindSequenceFunction[%,t]
Out[]=
2+3t+2
2
t
In[]:=
#[[1,-1]]&/@With[{t=2},Flatten[Trace[ArrayPlot[With[{c=CellularAutomaton[30,{{1},0},t]},Table[If[#1!=#2,1,0]&[c[[-1,t+1]],CellularAutomaton[30,MapAt[1-#&,c[[j]],i],t+1-j][[-1,t+1]]],{j,t+1},{i,2t+1}]],Mesh->True,ColorRules->{1->Lighter[Red,.2],-1->Lighter[Blue,.2],0->LightGray}],_CellularAutomaton]]]
Out[]=
{2,2,2,2,2,2,1,1,1,1,1,0,0,0,0,0}
In[]:=
Table[Total[#[[1,-1]]^2&/@Flatten[Trace[ArrayPlot[With[{c=CellularAutomaton[30,{{1},0},t]},Table[If[#1!=#2,1,0]&[c[[-1,t+1]],CellularAutomaton[30,MapAt[1-#&,c[[j]],i],t+1-j][[-1,t+1]]],{j,t+1},{i,2t+1}]],Mesh->True,ColorRules->{1->Lighter[Red,.2],-1->Lighter[Blue,.2],0->LightGray}],_CellularAutomaton]]],{t,10}]
Out[]=
{4,29,107,286,630,1219,2149,3532,5496,8185}
In[]:=
FindSequenceFunction[%,t]
Out[]=
1
6
2
t
3
t
4
t
Out[]=
w
1
w
2
w
3
w
4
w
5
w
6
w
7
w
8
w
9
w
10
w
11
w
12
w
13
w
14
w
15
w
16
w
17
w
18
w
19
w
20
w
21
Out[]=
In[]:=
∂
x
Out[]=
′
a
′
b
′
c
′
d
In[]:=
∂
x
Out[]=
′
a
′
b
′
c
In[]:=
Series[d[c[b[a[x+ϵ]]]],{ϵ,0,2}]
Out[]=
d[c[b[a[x]]]]+[x][a[x]][b[a[x]]][c[b[a[x]]]]ϵ+[c[b[a[x]]]][b[a[x]]][a[x]][x]+[x][a[x]]+[x][a[x]][b[a[x]]]+[x][a[x]][b[a[x]]][c[b[a[x]]]]+
′
a
′
b
′
c
′
d
′
d
1
2
′
c
′
b
′′
a
2
′
a
′′
b
1
2
2
′
a
2
′
b
′′
c
1
2
2
′
a
2
′
b
2
′
c
′′
d
2
ϵ
3
O[ϵ]
To find what the effect on the bottom center cell is .... Say w1[t,x] is the pattern from a single cell initial condition.... e[t,x] (which depends on tf, xf which is the point whose change you’re looking at