f[g[h[x,y]]]
{rule,x,y}
{And|Xor,x,y}
{1,0,1}
In[]:=
lt[False,True]=True;lt[_?BooleanQ,_?BooleanQ]=False;gt[True,False]=True;gt[_?BooleanQ,_?BooleanQ]=False;var[0,0]=0;var[0,_?BooleanQ]=0;var[_?BooleanQ,0]=0;var[a_?BooleanQ,b_?BooleanQ]:=If[a==b,0,gt[b,a]]
In[]:=
not[0]=0;not[True]=False;not[False]=True;and[0,0]=0;and[0,_?BooleanQ]=0;and[_?BooleanQ,0]=0;and[a_?BooleanQ,b_?BooleanQ]:=a&&bor[0,0]=0;or[0,_?BooleanQ]=0;or[_?BooleanQ,0]=0;or[a_?BooleanQ,b_?BooleanQ]:=a||bxor[0,0]=0;xor[0,_?BooleanQ]=0;xor[_?BooleanQ,0]=0;xor[a_?BooleanQ,b_?BooleanQ]:=Xor[a,b]xnor[0,0]=0;xnor[0,_?BooleanQ]=0;xnor[_?BooleanQ,0]=0;xnor[a_?BooleanQ,b_?BooleanQ]:=Xnor[a,b]
In[]:=
bf[r_Integer,n_Integer]:=BooleanFunction[r,n,"DNF"]/.{Not->not,And->and,Or->or,Xor->xor,Xnor->xnor}
In[]:=
ruleTableB[r_Integer]:=With[{fns={a,b,xnor[var[a,not[a]],var[bf[r,2][a,b],bf[r,2][not[a],b]]],xnor[var[b,not[b]],var[bf[r,2][a,b],bf[r,2][a,not[b]]]]},headings={a,b,"f'a","f'b"}},TableForm[BooleanTable[fns,{a,b}],TableHeadings->{None,headings}]]
In[]:=
ruleTableB[7]
Out[]//TableForm=
a | b | f'a | f'b |
True | True | False | False |
True | False | 0 | False |
False | True | False | 0 |
False | False | 0 | 0 |
BooleanTable[Xor,]
In[]:=
ResourceFunction["TruthTable"][Xor[p,q],{p,q}]
Out[]=
p | q | p⊻q |
True | True | False |
True | False | True |
False | True | True |
False | False | False |
Out[]=
What is the past lightcone that will make the final value change?
Out[]=
In[]:=
Options[BricksPlot]
Out[]=
{MeshFalse,MeshStyleNone,ColorRulesNone,ColorFunctionNone,PlotRangeNone,AppearanceBricks,Epilog{},NeighborhoodAlternating,RowShift0}
In[]:=
BricksPlot[{{1,2},{2,None}},Appearance->"Hexagonal",Mesh->True,ColorRules->{1->LightGreen,2->LightBlue}]
Out[]=
In[]:=
BricksPlot[{{1,2},{2,None}},Appearance->"Hexagonal",Mesh->True,MeshStyle->Black,ColorRules->{1->LightGray,2->Gray}]
Out[]=
The final cell has a certain rule associated with it. If we wanted its value to be different, could we achieve that by giving it a different rule?
Show indicate that the rule hexagon is on the bottom row
In[]:=
{Show[BricksPlot[{{None,None},{1,None}},Appearance->"Hexagonal",ColorRules->{1->Green,2->Blue}],ImageSize->30],RulePlot[BooleanFunction[8],Appearance->"Hexagons"]}
Out[]=
,
In[]:=
{Show[BricksPlot[{{None,None},{2,None}},Appearance->"Hexagonal",ColorRules->{1->Green,2->Blue}],ImageSize->30],RulePlot[BooleanFunction[6],Appearance->"Hexagons"]}
Out[]=
,
In[]:=
GraphicsRow[{Show[BricksPlot[{{0,0},{1,None}},Mesh->True,Appearance->"Hexagonal",ColorRules->{0->LightGray,1->Green,2->Blue}]],BricksPlot[{{1,0},{0,None}},Mesh->True,Appearance->"Hexagonal"]}]
Out[]=
But let’s say the final cell should be black. We can achieve this by flipping the rule:
In[]:=
GraphicsRow[{Show[BricksPlot[{{0,0},{2,None}},Mesh->True,Appearance->"Hexagonal",ColorRules->{0->LightGray,1->Green,2->Blue}]],BricksPlot[{{1,0},{1,None}},Mesh->True,Appearance->"Hexagonal"]}]
Out[]=
But now consider:
Flipping the rule in the final cell doesn’t help. Instead, we need to propagate backwards and flip a rule earlier in the evolution.
How do we push the “error signal” back up through the mesh? Our goal is to “absorb” the error signal by changing an element of the rule array.
Error signal is values. Based on the local info, flip the rule; that changes the error signal.
[[[Basic question: what is the minimal change in the backward lightcone that produces the change in output we want?
The single-cell changes are what are mapped in the influence map...]]]]
<< Boolean_Variation ... 2 + ... >>
Ordinary Back Propagation
Ordinary Back Propagation
Backward Evolution
Backward Evolution