In[]:=
res=findMinimalRuleArrayFunctions[{8,6},2,8]
Out[]=
{Width2,Height1,Results6{{2,2}},8{{1,2}},Width2,Height2,Results0{{1,1},{2,1}},14{{1,2},{2,1}},Width3,Height3,Results2{{1,2,1},{1,2,1},{2,1,1}},4{{1,1,2},{2,1,1},{2,1,1}},10{{1,2,2},{1,2,1},{2,1,1}},12{{1,2,2},{2,1,1},{2,1,1}}}
In[]:=
res=findMinimalRuleArrayFunctions[{7,12},2,8]
Out[]=
{Width2,Height1,Results7{{1,2}},12{{2,2}},Width2,Height2,Results8{{1,1},{1,1}},10{{1,2},{2,1}},11{{2,1},{1,1}},13{{1,2},{1,1}},Width2,Height3,Results2{{1,2},{1,1},{1,1}},4{{2,1},{1,1},{1,1}},15{{1,1},{1,2},{1,1}},Width3,Height3,Results0{{1,1,2},{2,1,1},{2,1,1}},3{{2,1,1},{1,1,1},{2,1,1}},Width2,Height4,Results5{{1,2},{1,2},{1,1},{1,1}},Width3,Height4,Results1{{2,2,1},{1,2,1},{1,1,1},{1,1,1}},14{{2,2,1},{2,2,2},{1,1,1},{1,1,1}}}
In[]:=
res=findMinimalRuleArrayFunctions[{7,12},3,10]
In[]:=
ComplementRange[0,255],FlattenKeys[#Results]&/@
47

Out[]=
{6,9,14,18,20,22,24,26,30,33,36,41,43,45,49,50,52,54,56,57,60,61,62,65,66,70,71,73,75,77,86,89,91,94,97,100,101,102,103,105,107,109,113,116,118,121,126,129,131,134,137,139,142,146,148,150,152,153,154,155,158,161,164,169,178,180,182,184,185,190,193,194,195,198,199,201,203,212,214,219,222,225,233,235,237}
In[]:=
res=findMinimalRuleArrayFunctions[{7,12},3,12]
Out[]=
In[]:=
Complement[Range[0,255],Flatten[Keys[#Results]&/@%]]
Out[]=
{6,9,14,18,20,22,24,26,30,33,36,41,43,45,49,50,52,54,56,57,60,61,62,65,66,70,71,73,75,77,86,89,91,94,97,100,101,102,103,105,107,109,113,116,118,121,126,129,131,134,137,139,142,146,148,150,152,153,154,155,158,161,164,169,178,180,182,184,185,190,193,194,195,198,199,201,203,212,214,219,222,225,233,235,237}
In[]:=
res=findMinimalRuleArrayFunctions[{7,12},3,16]
Out[]=
In[]:=
Complement[Range[0,255],Flatten[Keys[#Results]&/@res]]
Out[]=
{18,20,22,24,30,33,36,41,70,73,75,86,97,100,101,105,107,109,121,129,134,137,146,148,150,154,158,169,180,182,212,214,222,225,233,237}
In[]:=
res=findMinimalRuleArrayFunctions[{8,6},3,12]
Out[]=
In[]:=
Complement[Range[0,255],Flatten[Keys[#Results]&/@res]]
Out[]=
{1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71,73,75,77,79,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,141,143,145,147,149,151,153,155,157,159,161,163,165,167,169,171,173,175,177,179,181,183,185,187,189,191,193,195,197,199,201,203,205,207,209,211,213,215,217,219,221,223,225,227,229,231,233,235,237,239,241,243,245,247,249,251,253,255}
In[]:=
Select[%,EvenQ]
Out[]=
{}
In[]:=
Join@@Flatten#Results&/@
/@{30,110}
Out[]=
{{{2,1,2,1},{1,2,1,2},{2,1,1,2},{2,1,1,1}},{{2,1,2},{2,1,1},{2,1,1}}}
In[]:=
Join@@Flatten#Results&/@
/@{30,60,45,110}
Out[]=
{Missing[KeyAbsent,30],{{2,2,2,1},{1,1,2,2},{1,2,2,1},{1,1,1,2},{1,1,2,1},{2,1,2,2},{1,2,2,2}},{{2,1,2},{2,2,1},{1,1,2},{2,1,2},{1,2,1},{2,1,2},{1,2,2}},{{1,2,2,1},{1,1,1,2},{1,2,1,1},{2,1,1,1},{1,1,1,1},{1,1,1,1}}}
In[]:=
KeyTakeJoin@@Flatten#Results&/@
,{60,45,110}
Out[]=
60{{2,2,2,1},{1,1,2,2},{1,2,2,1},{1,1,1,2},{1,1,2,1},{2,1,2,2},{1,2,2,2}},45{{2,1,2},{2,2,1},{1,1,2},{2,1,2},{1,2,1},{2,1,2},{1,2,2}},110{{1,2,2,1},{1,1,1,2},{1,2,1,1},{2,1,1,1},{1,1,1,1},{1,1,1,1}}
In[]:=
findMinimalRuleArrayFunctionsSpecificFunction[30,{7,12},3,20]
Out[]=
$Aborted
In[]:=
findMinimalRuleArrayFunctionsSpecificFunction[110,{7,12},3,20]
Out[]=
{Width4,Height6,Results110{{1,2,2,1},{1,1,1,2},{1,2,1,1},{2,1,1,1},{1,1,1,1},{1,1,1,1}}}
In[]:=
findMinimalRuleArrayFunctionsSpecificFunction[30,{7,12},3,20]

Adaptive

In[]:=
SeedRandom[234234];​​With[{raHeight=64,raWidth=31,rules={8,6},opts=Sequence["Radius"->1/2,"Orientation"->"Both"],loss=LifetimeLoss[50]},​​With[{lossFn=loss[raHeight,raWidth,opts]},​​res=AdaptRuleArray[ConstantArray[1,{raHeight,raWidth}],rules,10000,lossFn,opts];​​]​​];
GraphicsGrid[Partition[With[{raHeight=64,raWidth=31,rules={8,6},lifetimeTarget=50,opts=Sequence["Radius"->1/2,"Orientation"->"Both"],ruleArray=First[#],loss=Last[#]},​​Labeled[​​ICAEvolutionPlot[raHeight,raWidth,ruleArray,rules,CenterArray[1,raWidth],opts,Mesh->None,Epilog->{​​Black,​​Line[{​​BricksPlotGetCoords["Hexagonal",raHeight+1][lifetimeTarget,0],BricksPlotGetCoords["Hexagonal",raHeight+1][lifetimeTarget,1/2]​​}],​​Line[{​​BricksPlotGetCoords["Hexagonal",raHeight+1][lifetimeTarget,raWidth+1/2],BricksPlotGetCoords["Hexagonal",raHeight+1][lifetimeTarget,raWidth+1]​​}]​​}],Text[50-loss]]​​]&/@First/@SplitBy[res,Last],UpTo[5]]]
Out[]=
In[]:=
SeedRandom[234235];​​With[{raHeight=64,raWidth=31,rules={8,6},opts=Sequence["Radius"->1/2,"Orientation"->"Both"],loss=LifetimeLoss[50]},​​With[{lossFn=loss[raHeight,raWidth,opts]},​​res=AdaptRuleArray[ConstantArray[1,{raHeight,raWidth}],rules,10000,lossFn,opts];​​]​​];
In[]:=
GraphicsGrid[Partition[With[{raHeight=64,raWidth=31,rules={8,6},lifetimeTarget=50,opts=Sequence["Radius"->1/2,"Orientation"->"Both"],ruleArray=First[#],loss=Last[#]},​​Labeled[​​ICAEvolutionPlot[raHeight,raWidth,ruleArray,rules,CenterArray[1,raWidth],opts,Mesh->None,Epilog->{​​Black,​​Line[{​​BricksPlotGetCoords["Hexagonal",raHeight+1][lifetimeTarget,0],BricksPlotGetCoords["Hexagonal",raHeight+1][lifetimeTarget,1/2]​​}],​​Line[{​​BricksPlotGetCoords["Hexagonal",raHeight+1][lifetimeTarget,raWidth+1/2],BricksPlotGetCoords["Hexagonal",raHeight+1][lifetimeTarget,raWidth+1]​​}]​​}],Text[50-loss]]​​]&/@First/@SplitBy[res,Last],UpTo[5]]]