This does sort of ruin the fun, but I hacked together a script to do it automatically:
Code: Select all
import lifelib
sess = lifelib.load_rules('b3s23')
lt = sess.lifetree(n_layers = 1, memory = 1000)
transformations = ['identity', 'rot270', 'rot180', 'rot90', 'flip_x', 'flip_y', 'swap_xy', 'swap_xy_flip']
import random
def addpt(pt):
pt += basept(random.choice(transformations))(random.randint(-placearea, placearea), random.randint(-placearea, placearea))[random.randint(0, period-1)]
return pt
rle = input('Enter headerless RLE of pattern.\n>')
objs = int(input('How many objects do you want to place?\n>'))
basept = lt.pattern(rle)
bbox = basept.bounding_box
placearea = round(max(bbox[2], bbox[3]) * 2.2)
period = basept.period
componentnums = [len(basept[x].components()) for x in range(period)]
min_components = objs * min(componentnums)
max_components = objs * max(componentnums)
for n in range(1000000):
if (n+1)%1000 == 0:
print(str(n+1)+'/1000000 solutions tested.')
pt = lt.pattern('b!')
for x in range(objs):
pt = addpt(pt)
if len(pt.components()) >= min_components and len(pt.components()) <= max_components:
if pt[200].population == 5:
if pt[200].wechsler in ['153', '163']:
print('#C Solution found:')
print(pt.rle_string())
break
An example solution using three copies:
Code:
Select all
#CLL state-numbering golly
x = 12, y = 16, rule = B3/S23
2b2o$bo2bo$2bobo$3bo$4b3o3bo$6bo2bobo$8bo2bo$7bob2o$7bo$6b2o$4bo$
3bobo$2bo2bo$bob2o$bo$2o!
It is quite slow, but it gets there in the end for small objects:
Code:
Select all
x = 15, y = 15, rule = B3/S23
3b2o$3bobo$5bo$b4o$o$obo3b2o$b2o2bo2bo$5bob2o$2b2obo6b2o$2bo2bo6bobo$
3b2o9bo$10b4o$9bo$9bobo$10b2o!