Here are results (from ECCA thread) concerning DBCA choice in RCT15:
Tested on current RCT15 DBCA program (with phase independency annotations).
Here are lengths of 12 sequences starting from first firebit to last firebit (starting arm positioning excluded)
for different configurations:
Note the FSE portion includes 2275 gliders and JumpFSE portion 18066 gliders.
Code: Select all
Codon:........................FSEEven: JumpFSEEven: FSEOdd: JumpFSEOdd: AvgBis/glider
e0_o1_e1_o0_p16_m8_p4_m2_p1...21080 166681 20890 167195 9.238631336
e0_o1_e1_o0_p16_m8_m4_m2_m1...20747 162748 20575 162938 9.021385379
e0_o1_e1_o0_p8_m4_m2_m1.......21732 174510 21433 174841 9.648394868
e0_o1_e1_o0_p4_m2_m1..........30030 238963 29360 239313 13.21631188
m1_m2_p4_fc_cps_#p............23471 190016 22901 190056 10.4823755
m1_m2_p4_fc_cp_#p.............24111 198111 23801 197781 10.90909985
m1_m2_p4_fc_cp_p..............25861 207919 25369 207943 11.48153975
m1_m2_p4_fc_#cps..............26325 213789 26213 214597 11.8215427
m3_p4_fc_#cps.................25762 203254 26086 203818 11.28066467
m3_p4_fc_cps_#p...............26041 205101 26057 206069 11.3875424
m3_p4_fc_cp_#p................27565 217917 27389 219105 12.09321076
m3_p4_fc_cp_p.................31631 246916 31491 248191 13.72176884
When we compare Risc versions 5 codon -1,-2,+4,FireDecColor, ColorsemiPhase with Phase cycling wins.
The ColorSemiPhase trick allowing often to set phase always get better then FireDecColor, ColorPhase with Phase cycling. Exactly chosing phase lead to worse packing (not worth additional bit), but not chosing color and using 4 codon version with ColorsemiPhase cycling was even worse.
-1,-2,+4 with 4 fires is much worse (as expected).
I was not surprised by rather good results of -3,+4 versions using 3 codon version (with ColorsemiPhase cycling). Penalty for cycle of length 3 is not that bad as for cycle of length 4).
Seems short distances are too often that penalty to reach correct %4, %3 is too big.
I will check m2, p3 versions as well to check how long moves penalise it...
So what are rough bit estimates to build these DBCA's ... Of course the DBCA program would be different (6/1 ECCA), different switching circuit.
Code: Select all
;FSEEven;JumpFSEEven;FSEOdd;JumpFSEOdd;Sum ... to be halved;AVG bits/glider
m1_m2_m4_p8_fc_cp_p;19195;156752;19027;156731;351705;8.645223932
m1_m2_m4_p8_fc_cps_#p;19711;161167;19681;161167;361726;8.891549088
m1_m2_m4_p8_fc_cp_#p;20401;165511;20293;165433;371638;9.135194927
m1_m2_p4_fc_cps_#p;23471;190016;22901;190056;426444;10.4823755
m1_m2_p4_fc_cp_#p;24111;198111;23801;197781;443804;10.90909985
m1_m2_m4_p8_fc_#cps;25026;203846;24886;203396;457154;11.23725481
m3_p4_fc_#cps;25762;203254;26086;203818;458920;11.28066467
m3_p4_fc_cps_#p;26041;205101;26057;206069;463268;11.3875424
m1_m2_p4_fc_cp_p;25861;207919;25369;207943;467092;11.48153975
m2_p3_fc_#cps;26656;210796;25900;210730;474082;11.65336021
m3_p5_fc_#cps;26938;213172;26698;212758;479566;11.78816184
m1_m2_p4_fc_#cps;26325;213789;26213;214597;480924;11.8215427
m2_p3_fc_cps_#p;26573;214517;25769;214357;481216;11.82872032
m3_p5_fc_cps_#p;27725;217833;27745;217753;491056;12.07059633
m3_p4_fc_cp_#p;27565;217917;27389;219105;491976;12.09321076
m2_p3_fc_cp_#p;27809;225269;27281;224769;505128;12.4164987
m3_p5_fc_cp_#p;29533;230585;29397;230885;520400;12.79189814
m3_p4_fc_cp_p;31631;246916;31491;248191;558229;13.72176884
m2_p3_fc_cp_p;32071;257041;31241;256516;576869;14.17995674
m3_p5_fc_cp_p;33996;263586;33856;263816;595254;14.63187651
Experiments with other move combinations did not show a promising alternative.
So for RCT15 project the most promissing alternatives are:
m1_m2_m4_p8_fc_cp_p;19195;156752;19027;156731;351705
m1_m2_p4_fc_cps_#p;23471;190016;22901;190056;426444
m3_p4_fc_#cps;25762;203254;26086;203818;458920
7 codons (4 move codons, 3 fire codons),
5 codons (3 move codons, 2 fire codons), and
3 codons (2 move codons, 1 fire codon).
I bet construction costs would disqualify the 7 codons version, but the remaining two candidates are close.
And here are the Translators:
Code: Select all
local g = golly() -- for debug messages
local movesBase={}
local firelogicBase={}
local d,dCache,startcolor,startphase,startsemiphaseswitch -- (nil/0/2^i) where i=0,1, resp. 2 nils will be changed to "optimal" values (correspond to states justbefore the initial fire)
local semistate,started,delta,bitLen
local fires={{"o","0"},{"e","0"},{"o","1"},{"e","1"},{"o","0"},{"e","0"},{"o","1"},{"e","1"}} -- {firecolor, firephase}
-- fc changes color (and fires): semistate ~= 1
-- p changes phase: semistate ~= 2
-- cp changes color and phase: semistate ~= 3
-- cps changes color and semichanges phase: semistate ~= ((semistate//2)|5)
local function writeDCache()
--I want all rows except last exactly 80 characters to easily compare the 12 lengths ... I write the bilLen to the end note anyways
local dExtra=""
if string.len(dCache)>80 then
dExtra=string.sub(dCache,81)
dCache=string.sub(dCache,1,80)
end
if string.len(dCache)>0 and d then
bitLen=bitLen+string.len(dCache)
d:write(dCache.."\n")
end
dCache=dExtra
end
function boolean2Bit(b)
return b and "1" or "2"
end
function boolMove(b,dist)
dCache = dCache..boolean2Bit(b)
if b and dist then delta = delta-dist end
--codon virtually (+1)
end
local function move_m1_m2_m4_p8()
do boolMove(((delta%2)>0) or (delta<-6),-1) end
do boolMove(((delta%4)>0) or (delta<-4),-2) end
do boolMove(((delta%8)>0) or (delta<0),-4) end
do boolMove(delta>0,8) end
end
local function move_m1_m2_p4()
do boolMove(((delta%2)>0) or (delta<-2),-1) end
do boolMove(((delta%4)>0) or (delta<0),-2) end
do boolMove(delta>0,4) end
end
local function move_m3_p4()
do boolMove(((delta%4)>0) or (delta<0),-3) end
do boolMove(((delta%3)>0) or (delta>0),4) end
end
local function move_m3_p5()
do boolMove(((delta%5)>0) or (delta<0),-3) end
do boolMove(((delta%3)>0) or (delta>0),5) end
end
local function move_m2_p3()
do boolMove(((delta%3)>0) or (delta<0),-2) end
do boolMove(((delta%2)>0) or (delta>0),3) end
end
movesBase["m1_m2_m4_p8"] = move_m1_m2_m4_p8
movesBase["m1_m2_p4"] = move_m1_m2_p4
movesBase["m3_p5"] = move_m3_p5
movesBase["m3_p4"] = move_m3_p4
movesBase["m2_p3"] = move_m2_p3
local function process_command_fc_cp_p(command,moves)
local color,phase,firematch,colormatch,phasematch
delta=tonumber(string.sub(command,1,-3)) or 0
color=string.sub(command,-2,-2)
phase=string.sub(command,-1,-1)
if started==nil then
startsemiphaseswitch = 0 -- there is no startsemiphaseswitch
startphase = 0 -- we neednot help from setup, the bitLen does not depend on the startphase
started=true
if startcolor==nil then
startcolor = (color=="o") and 0 or 1
semistate = semistate ~ startcolor
end
if (color ~= fires[semistate+1][1]) then
g.error("Startcolor does not match required color. You have to prepare another setup.")
end
-- fire is not the last codon
semistate = semistate ~ 1 -- fc
return
end
repeat
colormatch = color == fires[semistate+1][1]
do boolMove(not colormatch) end
if (not colormatch) then
semistate = semistate ~ 3 --cp
end
phasematch = (phase=="2") or (phase == fires[semistate+1][2])
do boolMove(not phasematch) end
if (not phasematch) then
semistate = semistate ~ 2 --p
end
-- no # section
do moves() end
firematch = (delta==0) -- color, phase already corrected
do boolMove(firematch) end
-- fire is not the last codon
until firematch
semistate = semistate ~ 1 -- fc
end
local function process_command_fc_cp_Rp(command,moves)
local color,phase,firematch,colormatch,phaseexact
delta=tonumber(string.sub(command,1,-3)) or 0
color=string.sub(command,-2,-2)
phase=string.sub(command,-1,-1)
if started==nil then
startsemiphaseswitch = 0 -- there is no startsemiphaseswitch
started=true
if startcolor==nil then
startcolor = (color=="o") and 0 or 1
semistate = semistate ~ startcolor
end
if (color ~= fires[semistate+1][1]) then
g.error("Startcolor does not match required color. You have to prepare another setup.")
end
-- fire is not the last codon
semistate = semistate ~ 1 -- fc
return
end
repeat
colormatch = color == fires[semistate+1][1]
do boolMove(not colormatch) end
if (not colormatch) then
semistate = semistate ~ 3 --cp
end
semistate = semistate ~ 2 -- #p
do moves() end
phaseexact = phase == fires[semistate+1][2]
firematch = (delta==0)
and (phaseexact or phase=="2" or (startphase==nil))
-- color already corrected
do boolMove(firematch) end
-- fire is not the last codon
until firematch
if phase~=2 then
if (startphase==nil) then
startphase = phaseexact and 0 or 2
semistate = semistate ~ startphase
--else phaseexact is true so we are fine when start* are already set
end
end
semistate = semistate ~ 1 -- fc
end
local function process_command_fc_cps_Rp(command,moves)
local color,phase,firematch,phaseexact
local template=5
delta=tonumber(string.sub(command,1,-3)) or 0
color=string.sub(command,-2,-2)
phase=string.sub(command,-1,-1)
if started==nil then
started=true
if startcolor==nil then
startcolor = (color=="o") and 0 or 1
semistate = semistate ~ startcolor
end
if (color ~= fires[semistate+1][1]) then
g.error("Startcolor does not match required color. You have to prepare another setup.")
end
-- # fire is not the last codon
semistate = semistate ~ 1 -- fc
return
end
-- we are after fire
--template 56 created during preparation of fire ... last 2 color neutral phases after fire converted to either 2 or 7 (7 if they are pair)
--templates 77 persist till phase forced or replacement 56 pair found
repeat
if (color ~= fires[semistate+1][1]) then
do boolMove(true) end
semistate = semistate ~ ((semistate//2)|5) --cps
else
dCache = string.gsub(dCache,template,"2")..template -- cps to be chosen later on at most one 5 and at most one 6 (6 accompanied with 5)
template = 11-template -- 5<->6
end
semistate = semistate ~ 2 -- #p
do moves() end
phaseexact = phase == fires[semistate+1][2]
firematch = (delta==0)
and (phaseexact or phase=="2" or string.find(dCache,"[67]") or (startphase==nil and (semistate<4)) or (startsemiphaseswitch==nil and (semistate>3)))
do boolMove(firematch) end
-- fire is not the last codon
until firematch
if phase==2 then
--update templates
if string.find(dCache,"6") then
dCache=string.gsub(dCache,"7","2") --new phasechanging pair found
dCache=string.gsub(dCache,"[56]","7")
else
dCache=string.gsub(dCache,"5","2") -- new phasechanging pair not found
end
else
if (semistate<4) and (startphase==nil) then
-- semiphaseswitch independent stage, but it influences semiphaseswitch dependent stages
startphase = phaseexact and 0 or 2
if not phaseexact and startsemiphaseswitch~=nil then
startsemiphaseswitch = startstatesemiswitch ~ 4 -- startphase 6 is maintained as startphase 2 plus startstatesemiswitch 4
semistate = semistate ~ 6 -- change phase in semiphaseswitch dependent stages will be canceled with phase change here (and we will not change start* anymore)
end
elseif (semistate>3) and (startsemiphaseswitch==nil) then
-- semiphaseswitch dependent stage .. (no influence on phase in semiphaseswitch independent stage so no correction in startphase needed)
startsemiphaseswitch = phaseexact and 0 or 4
semistate = semistate ~ startsemiphaseswitch
elseif not phaseexact then
-- string.find(dCache,"[67]") saved the day
if string.find(dCache,"6") then
dCache=string.gsub(dCache,"7","2") --new phasechanging pair found
dCache=string.gsub(dCache,"[56]","1") -- cps+cps
else
dCache=string.gsub(dCache,"5","2") -- new phasechanging pair not found
dCache=string.gsub(dCache,"7","1") -- cps+cps
end
semistate = semistate ~ 2 -- cps+cps=p
end
dCache=string.gsub(dCache,"[567]","2") -- phase is fixed, templates vanish
end
semistate = semistate ~ 1 -- fc
end
local function process_command_fc_Rcps(command,moves)
local color,phase,firematch,phaseexact
delta=tonumber(string.sub(command,1,-3)) or 0
color=string.sub(command,-2,-2)
phase=string.sub(command,-1,-1)
if started==nil then
started=true
if startcolor==nil then
startcolor = (color=="o") and 0 or 1
semistate = semistate ~ startcolor
end
if (color ~= fires[semistate+1][1]) then
g.error("Startcolor does not match required color. You have to prepare another setup.")
end
semistate = semistate ~ 1 -- fc
semistate = semistate ~ ((semistate//2)|5) --#cps fire is last codon
return
end
-- we are after fire (and the following reset)
repeat
--g.note(dCache.." A "..command.." "..delta..","..color..","..phase..","..semistate..boolean2Bit(phaseknown==nil))
do moves() end
phaseexact = phase == fires[semistate+1][2]
firematch = (delta==0) and (color == fires[semistate+1][1])
and (phaseexact or phase=="2" or (startphase==nil and (semistate<4)) or (startsemiphaseswitch==nil and (semistate>3)))
do boolMove(firematch) end
semistate = semistate ~ ((semistate//2)|5) --#cps
until firematch
if phase~=2 then
if (semistate<4) and (startphase==nil) then
-- semiphaseswitch independent stage, but it influences semiphaseswitch dependent stages
startphase = phaseexact and 0 or 2
if not phaseexact and startsemiphaseswitch~=nil then
startsemiphaseswitch = startsemiphaseswitch ~ 4 -- startphase 6 is maintained as startphase 2 plus startstatesemiswitch 4
semistate = semistate ~ 6 -- change phase in semiphaseswitch dependent stages will be canceled with phase change here (and we will not change start* anymore)
end
elseif (semistate>3) and (startsemiphaseswitch==nil) then
-- semiphaseswitch dependent stage .. (no influence on phase in semiphaseswitch independent stage so no correction in startphase needed)
startsemiphaseswitch = phaseexact and 0 or 4
semistate = semistate ~ startsemiphaseswitch
--else phaseexact is true so we are fine when start* are already set
end
end
semistate = semistate ~ 1 -- fc
end
firelogicBase["fc_cp_p"] = process_command_fc_cp_p
firelogicBase["fc_cp_#p"] = process_command_fc_cp_Rp
firelogicBase["fc_cps_#p"] = process_command_fc_cps_Rp
firelogicBase["fc_#cps"] = process_command_fc_Rcps
local dirCommonPrefix = "c:\\Golly\\DBCASalvo\\"
local function moveFDecTo12(moves,firelogic,dirName)
local mfd = io.open(dirCommonPrefix..dirName.."\\MoveFDec.txt","r")
d = io.open(dirCommonPrefix..dirName.."\\"..moves.."_"..firelogic..".txt","w")
dCache="1"
startcolor=nil --1
startphase=nil --2
startsemiphaseswitch=nil --4
-- (nil/0/2^i) where i=0,1, resp. 2 nils will be changed to "optimal" values (correspond to states justbefore the initial fire)
semistate = 0
started=nil
bitLen=0
local inputline = mfd:read()
local firepos
while inputline ~= nil do
while string.len(inputline)>0 do
firePos = string.find(inputline,"[oe]")
command=string.sub(inputline,1,1+firePos)
inputline=string.sub(inputline,firePos+2)
if string.sub(command,1,1)=="+" then
command=string.sub(command,2)
end
firelogicBase[firelogic](command,movesBase[moves])
while (string.len(dCache)>90 and not string.find(string.sub(dCache,1,80),"7")) do writeDCache() end
-- ^ we shouldnot flush a template to allow future phase (color) correction
end
inputline = mfd:read()
end
dCache=string.gsub(dCache,"7","2") -- no more need for a template
while (string.len(dCache)>0) do writeDCache() end
startcolor = startcolor or 0
startphase = startphase or 0
startsemiphaseswitch = startsemiphaseswitch or 0
if d then
d:write("("..bitLen..")["..(startcolor+startphase+startsemiphaseswitch).."]["..semistate.."]\n")
d:close()
end
return bitLen
end
local dirnameBase={"FSEEven", "JumpFSEEven", "FSEOdd", "JumpFSEOdd"}
local numBits
local r = io.open("c:\\Golly\\bitLens.csv","w")
local rCache=""
for i=1,#dirnameBase do
rCache=rCache..";"..dirnameBase[i]
end
if r then
r:write(rCache.."\n")
rCache=""
end
for moves in pairs(movesBase) do
for fireLogic in pairs(firelogicBase) do
rCache = moves.."_"..fireLogic
for i=1,#dirnameBase do
numBits = moveFDecTo12(moves,fireLogic,dirnameBase[i])
rCache=rCache..";"..numBits
end
if r then
r:write(rCache.."\n")
rCache=""
end
end
end
I have start experimenting with slsparse ... on RISKDBCA_m3_p4_fc_#cpo. I have given it P8 periodic pattern and it works
. But as we construct it with P2 "glasses", I should probably remove last glider invoking a p8 part and let it at p1/p2 and restart the search with "glider" just starting p8.
Is there a way how to say the glider is specified upto mod 8 ticks? Hmm, there is 5 times no room for glider converting seed to p8. 3 times near injectors ... they could easily be moved a bit apart. Oh ... in RCT15 DBCA is build p8 (mod 8 ) so the blinker elbow should be that much carefull?
... I have tought it waited to cordership activation. ... and the corderships just converts 2 blinkers on "bits" diagonal to p8 reflectors (to DBCA).
So the DBCA NW distance was determined by the corderships -> reflectors salvo length.
I definitely need just "defragmented.mc" no need for "outfile" translation to "quick one line salvo". I would prefere "defragmented.mc" translated to line coordinates + phase, but I will do it myself together with phase independency detection.