But the only effective same color lane available, is 4hd, and it has some "holes". There is no good recipe for WHITE gliders on both edges (there is such good recipe for BLACK gliders):
Here is the recipes for this case:
Code: Select all
x = 1177, y = 1181, rule = LifeHistory
1176.A$1174.2A$1175.2A66$1108.A$1106.2A$1107.2A67$1038.A.A$1038.2A$
1039.A68$968.A.A$968.2A$969.A65$901.A.A$901.2A$902.A75$824.A.A$824.2A
$825.A78$744.A$744.A.A$744.2A48$695.A$693.2A$694.2A74$618.A.A$618.2A$
619.A59$561.2A$560.A.A$562.A68$491.2A$490.A.A$492.A68$421.A$421.2A$
420.A.A68$351.2A$350.A.A$352.A68$281.2A$280.A.A$282.A68$211.A$211.2A$
210.A.A68$141.2A$140.A.A$142.A68$71.2A$70.A.A$72.A68$.A$.2A$A.A!
Code: Select all
x = 1628, y = 1881, rule = LifeHistory
1627.A$1625.2A$1626.2A72$1552.A.A$1552.2A$1553.A71$1479.A.A$1479.2A$
1480.A74$1403.A.A$1403.2A$1404.A27$1624.A$1623.A$1623.3A33$1340.A$
1338.2A$1339.2A39$1549.A$1547.2A$1548.2A29$1267.A$1267.A.A$1267.2A35$
1480.A$1480.A.A$1480.2A20$1208.A$1207.A$1207.3A47$1410.A$1408.2A$
1409.2A29$1129.A$1127.2A$1128.2A43$1333.A.A$1333.2A$1334.A22$1059.A$
1059.A.A$1059.2A41$1266.A$1266.A.A$1266.2A38$976.A$976.A.A$976.2A35$
1189.A.A$1189.2A$1190.A26$911.A$911.A.A$911.2A32$1127.A$1126.A$1126.
3A29$847.A$845.2A$846.2A34$1060.A$1059.A$1059.3A41$770.3A$772.A$771.A
38$977.A$976.A$976.3A28$700.3A$702.A$701.A28$917.A$917.A.A$917.2A37$
631.A$631.2A$630.A.A30$846.A$846.A.A$846.2A37$560.3A$562.A$561.A38$
770.3A$772.A$771.A28$490.3A$492.A$491.A37$701.A$701.2A$700.A.A29$420.
3A$422.A$421.A38$630.3A$632.A$631.A28$350.3A$352.A$351.A37$561.A$561.
2A$560.A.A28$281.A$281.2A$280.A.A38$491.A$491.2A$490.A.A29$210.3A$
212.A$211.A38$420.3A$422.A$421.A28$140.3A$142.A$141.A38$350.3A$352.A$
351.A28$70.3A$72.A$71.A38$280.3A$282.A$281.A28$3A$2.A$.A38$210.3A$
212.A$211.A68$140.3A$142.A$141.A67$71.A$71.2A$70.A.A68$.A$.2A$A.A!
So preferably OGC-RU should have different color output gliders, unless there could be something that can compensate for about 10-15 tracks lost on the edge of WHITE glider in the same color output case.
And for references and improvements here is the script I wrote to search for OGC-RU recipes:
Code: Select all
import golly as g
from glife import *
from string import *
from copy import copy, deepcopy
# Snakial font
__sfont = dict ()
__sfont['0'] = pattern ("2b2obo$2bob2o$2o4b2o$o5bo$bo5bo$2o4b2o$o5bo$bo5bo$2o4b2o$o5bo$bo5bo$2o4b2o$2b2obo$2bob2o!", 0, -14)
__sfont['0'].width = 10
__sfont['1'] = pattern ("2o$bo$o$2o2$2o$bo$o$2o2$2o$bo$o$2o!", 1, -14)
__sfont['1'].width = 6
__sfont['2'] = pattern ("2b2obo$2bob2o$6b2o$6bo$7bo$6b2o$2b2obo$2bob2o$2o$o$bo$2o$2b2obo$2bob2o!", 0, -14)
__sfont['2'].width = 10
__sfont['3'] = pattern ("2obo$ob2o$4b2o$4bo$5bo$4b2o$2obo$ob2o$4b2o$4bo$5bo$4b2o$2obo$ob2o!", 0, -14)
__sfont['3'].width = 8
__sfont['4'] = pattern ("2o3b2o$2o3b2o2$2o3b2o$obobobo$2bobo$b2obo$5b2o$6bo$5bo$5b2o$6bo$5bo$5b2o!", 0, -14)
__sfont['4'].width = 9
__sfont['5'] = pattern ("2b2obo$2bob2o$2o$o$bo$2o$2b2obo$2bob2o$6b2o$6bo$7bo$6b2o$2b2obo$2bob2o!", 0, -14)
__sfont['5'].width = 10
__sfont['6'] = pattern ("2b2obo$2bob2o$2o$o$bo$2o$2b2obo$2bob2o$2o4b2o$o5bo$bo5bo$2o4b2o$2b2obo$2bob2o!", 0, -14)
__sfont['6'].width = 10
__sfont['7'] = pattern ("ob2o$2obo$4b2o$5bo$4bo$4b2o$2b2o$3bo$2bo$2b2o$2o$bo$o$2o!", 0, -14)
__sfont['7'].width = 8
__sfont['8'] = pattern ("2b2obo$2bob2o$2o4b2o$o5bo$bo5bo$2o4b2o$2b2obo$2bob2o$2o4b2o$o5bo$bo5bo$2o4b2o$2b2obo$2bob2o!", 0, -14)
__sfont['8'].width = 10
__sfont['9'] = pattern ("2b2obo$2bob2o$2o4b2o$o5bo$bo5bo$2o4b2o$2b2obo$2bob2o$6b2o$6bo$7bo$6b2o$2b2obo$2bob2o!", 0, -14)
__sfont['9'].width = 10
__sfont['-'] = pattern ("2obo$ob2o!", 0, -8)
__sfont['-'].width = 6
__sfont[' '] = pattern ("8b!", 0, -8)
__sfont[' '].width = 8
def make_text (string):
p = pattern ()
x = 0
for c in string:
if not __sfont.has_key (c):
c = ' '
symbol = __sfont[c]
p += symbol (x, 0)
x += symbol.width
return p
def PlaceGliders(dat, inc, d):
for data in dat:
g.putcells(gld, -d, d)
d += 145 + 2 * inc
if data[1] == 1:
gldj = gld
if data[1] == 0:
gldj = g.evolve(gld,1)
if data[1] > 1:
gldj = g.evolve(gld,5 - data[1])
data[0] -= 1
g.putcells(gldj, -d + data[0], d - data[0])
d += 145
return d
def PlaceGld(dy, d, stat, toText, dx):
gldj = g.parse("3A$2.A$.A!")
gld = g.parse("3A$2.A$.A!")
if stat[1] > 0:
gldj = g.evolve(gldj, stat[1])
if stat[2] == 1:
gld = g.evolve(gld, 1)
g.putcells(gld, -d, -dx + d)
g.putcells(gldj, d + stat[0], - dx - dy - d - stat[0], -1,0,0,-1)
if toText:
periodText = make_text (str(dy) + " " + str(stat[0]) + " " + str(stat[1]) + " " + str(stat[2]))
g.putcells(periodText, 70 + d + stat[0], - dx - dy - d - stat[0])
gld = g.parse("3A$2.A$.A!")
ij = [(-9,3),(-8,1),(-8,3),(-7,3),(-6,1),(-6,2),(-6,3),(-5,2),(-4,3),(-2,3),(-1,2),(0,1),(0,2),(0,3),(1,1),(2,1),(2,3),(3,0),(3,1)]
#ijstat = [(2,3,[-6,0]),(2,1,[-4,2]),(1,1,[-9,2]), (1,1,[-7,0]), (-1,2,[1,3]), (-5,2,[0,1]), (-7,3,[10,2]), (-7,3,[7,0]), (-8,3,[-6,0]), (-8,1,[-4,2])]
#ijstat = [(-7,3,[[0,0],[7,0],[4,1]]), (-7,3,[[10,2],[5,3],[0,-10]])]
#ijstat = [(-7,3,[[0,0],[7,0],[4,1]]), (-7,3,[[0,0],[10,2],[5,3],[20,2]])]
ij = [(-8,1)]
potential=[[-4,3,0],[-3,3,0],[-4,3,1],[-5,3,1],[-5,3,0],[-6,3,1],[-5,3,0],[-7,3,0],[-14,3,1],[-16,3,1],[-4,2,1],[-4,2,0],[-5,2,0],[-6,2,1],[-6,2,0],[-16,2,0],[-6,1,1],[-6,1,0],[-3,0,0],[-4,0,1],[-4,0,0],[-5,0,1],[-6,0,1,],[-6,0,0],[-7,0,1],[-8,0,1],[-11,0,0]]
dx = 0
'''
datW = [[0,0],[7,0],[4,1]]
datB = [[0,0],[10,2],[5,3],[20,2]]
d = 0
#inc = 12 (datW)
#inc = -6(datW)
#inc = 12 (datB)
#inc = 0 (datB)
inc = 0
d = PlaceGliders(datW, 12, d)
datW = [[0,0],[7,0],[4,1]]
datB = [[0,0],[10,2],[5,3],[20,2]]
d = PlaceGliders(datW, -6, d)
d = PlaceGliders(datB, 12, d)
datW = [[0,0],[7,0],[4,1]]
datB = [[0,0],[10,2],[5,3],[20,2]]
d = PlaceGliders(datB, 0, d)
def PlaceGld(i, j, d, stat, toText):
gldj = g.parse("3A$2.A$.A!")
if j + stat[1] > 0:
gldj = g.evolve(gldj, j + stat[1])
g.putcells(gld, -d, -dx + d)
g.putcells(gldj, 10 + d + stat[0], -10 - dx - i - d - stat[0], -1,0,0,-1)
if toText:
periodText = make_text (str(i) + " " + str(j) + " " + str(stat[0]) + " " + str(stat[1]) )
g.putcells(periodText, 70 + 10 + d + stat[0], -10 - dx - i - d - stat[0])
dk = 0
du = 0
for p in ijstat:
#for m in xrange(0, 4):
# for n in xrange(-15,15):
i = p[0]
j = p[1]
for k in xrange(0,len(p[2])):
p[2][k][0] += du
PlaceGld(i,j, dk + k * 20, p[2][k], False)
dk +=130
du = -10
#dx += 100
for p in ijstat:
i = p[0]
j = p[1]
PlaceGld(i,j, 20, [0,0], False)
PlaceGld(i,j, 40, p[2], False)
PlaceGld(i,j, 60, [0,0], False)
PlaceGld(i,j, 90, p[2], True)
dx += 250
'''
def PlaceResults(results, dy, dx):
g.new("")
for p in results:
glds = p[0]
step = 40
for gld in glds:
PlaceGld(dy, step, gld, False, dx)
step += 70
dx += 250
result = []
def AnalyzeState(maxPop, maxWidth):
g.step()
pop = int(g.getpop())
if pop == 0:
return [0]
if pop > maxPop:
return [-1]
g.run(2)
pop1 = int(g.getpop())
if not pop1 == pop:
return [-2]
#Search Glider Shoots
rect = g.getrect()
g.run(16)
rect1 = g.getrect()
gld = []
if int(g.getpop()) == 5 and rect[0] - rect[1] == rect1[0] - rect1[1] and rect[0] - rect1[0] != 0 and rect[2] == 3 and rect[3] == 3:
w = rect1[0]
rectx = g.getrect()
step = 1
while rectx[0] == w:
g.run(1)
rectx = g.getrect()
step += 1
g.run(1)
rectx = g.getrect()
gld = [rectx[0] + rectx[2] - 3, rectx[1] + rectx[3] - 1, rectx[0] - w, rectx[0] - w, int(g.getgen())]
if step % 2 == 1:
g.run(1)
return [1, gld, 0]
if rect[0] == rect1[0] and rect[1] == rect1[1] and rect1[2] - rect[2] == 4 and rect1[3] - rect[3] == 4:
w = rect1[3]
rectx = g.getrect()
step = 1
while rectx[3] == w:
g.run(1)
rectx = g.getrect()
step += 1
g.run(1)
rectx = g.getrect()
gld = [rectx[0] + rectx[2] - 3, rectx[1] + rectx[3] - 1, 1, 1, int(g.getgen())]
for i in xrange(0, 3):
for j in xrange(0, 3):
g.setcell(gld[0] + i, gld[1] - j,0)
if step % 2 == 1:
g.run(1)
#g.show(str(rect) + "," + str(rect1))
if rect1[2] - rect[2] == 4 and rect1[3] - rect[3] == 4 and rect[0] - rect1[0] == 4 and rect[1] - rect1[1] == 4:
x = rect1[0]
rectx = g.getrect()
step = 1
while rectx[0] == x:
g.run(1)
rectx = g.getrect()
step += 1
g.run(1)
rectx = g.getrect()
gld = [rectx[0] + 2, rectx[1], -1, -1, int(g.getgen())]
for i in xrange(0, 3):
for j in xrange(0, 3):
g.setcell(gld[0] - i, gld[1] + j,0)
if step % 2 == 1:
g.run(1)
if gld == [] and not(rect[0] == rect1[0] and rect[1] == rect1[1] and rect[2] == rect1[2] and rect[3] == rect1[3]):
return [-3]
#Search Single Block
rect = g.getrect()
g.run(4)
rect1 = g.getrect()
if rect[2] > maxWidth or rect[3] > maxWidth:
return [-5]
if not(rect[0] == rect1[0] and rect[1] == rect1[1] and rect[2] == rect1[2] and rect[3] == rect1[3]):
return [-4]
rect = g.getrect()
g.run(1)
rect1 = g.getrect()
g.run(1)
if rect[2] > rect1[2]:
rect = rect1
block = []
if rect[2] == 7 and rect[3] == 7 and int(g.getpop()) == 12:
block = [rect[0], rect[1]]
return [1, gld, block]
def Analyze(curState, dy, maxStep, toCreateList):
idx = 0
global x
global result
newState = []
total = len(curState)
for pn in curState:
p = pn[1]
idx += 1
for m in xrange(0, 4):
for n in xrange(-maxStep, maxStep + 1):
for s in xrange(0,2):
g.new("")
g.setstep(4)
g.show(str(len(result)) + " , " + str(idx) + " / " + str(total) + " , " + str(len(newState))+ " , " + str(x))
step = 40
for gld in p:
PlaceGld(dy,step, gld, False, 0)
step += 70
PlaceGld(dy,step, [n,m,s], False, 0)
stp = AnalyzeState(18, 14)
if stp[0] > 0:
if stp[2] == 0:
#if len([t for t in result if (t[1] == stp[1][2] and t[2] == (stp[1][0] + stp[1][1])%2)]) == 0:
px = deepcopy(p)
px.append([n,m,s])
result.append([px,stp[1][2],(stp[1][0] + stp[1][1])%2, stp[1][0] - stp[1][1]])
else:
if toCreateList:
strW = GetStr()
g.run(1)
strB = GetStr()
g.run(1)
if len([t for t in newState if (t[0] == strW or t[0] == strB)]) == 0:
px = deepcopy(p)
px.append([n,m,s])
newState.append([strW, px])
g.update()
'''
g.step()
g.update()
if int(g.getpop()) == 5:
rect = g.getrect()
g.run(4)
rectCur = g.getrect()
if rect[2] == rectCur[2] and rect[3] == rectCur[3] and rect[0] != rectCur[0] and rect[1] != rectCur[1]:
result.append((i,j,[[0,0,0], p, [n,m,s]]))
'''
return newState
def PrepareResults(result):
bUp = [t for t in result if (t[1] == 1 and t[2] == 1)]
wUp = [t for t in result if (t[1] == 1 and t[2] == 0)]
bDown = [t for t in result if (t[1] == -1 and t[2] == 1)]
wDown = [t for t in result if (t[1] == -1 and t[2] == 0)]
curRes = []
if len(bUp) > 0 and len(wUp) > 0:
rbMin = min([t for t in result if (t[1] == 1 and t[2] == 1)], key=lambda w: w[3])
rbMax = max([t for t in result if (t[1] == 1 and t[2] == 1)], key=lambda w: w[3])
rwMin = min([t for t in result if (t[1] == 1 and t[2] == 0)], key=lambda w: w[3])
rwMax = max([t for t in result if (t[1] == 1 and t[2] == 0)], key=lambda w: w[3])
rwMin[0].extend(rwMax[0])
rwMin[0].extend(rbMin[0])
rwMin[0].extend(rbMax[0])
curRes.append([rwMin[0]])
if len(bDown) > 0 and len(wDown) > 0:
rbMin = min([t for t in result if (t[1] == -1 and t[2] == 1)], key=lambda w: w[3])
rbMax = max([t for t in result if (t[1] == -1 and t[2] == 1)], key=lambda w: w[3])
rwMin = min([t for t in result if (t[1] == -1 and t[2] == 0)], key=lambda w: w[3])
rwMax = max([t for t in result if (t[1] == -1 and t[2] == 0)], key=lambda w: w[3])
rwMin[0].extend(rwMax[0])
rwMin[0].extend(rbMin[0])
rwMin[0].extend(rbMax[0])
curRes.append([rwMin[0]])
return curRes
def GetStr():
rect = g.getrect()
#strW = str(rect[1] + rect[0])
strW = str(rect[1]) + ":" + str(rect[0])
for mi in xrange(rect[0], rect[0] + rect[2] + 1):
strW += "$"
for mj in xrange(rect[1], rect[1] + rect[3] + 1):
strW += str(g.getcell(mi,mj))
return strW
#dy = 1 #3hd
#dy = 1 #4hd
dy = 2 #5hd
cur = [["",[]]]
x = 0
full = []
for x in xrange(0, 3):
temp = []
if x == 0:
temp = Analyze(cur,dy, 2, x < 2)
else:
temp = Analyze(cur,dy, 12, x < 2)
cur = temp
PlaceResults(PrepareResults(result), dy, 0)