## Logarithmic glider gun generator

For scripts to aid with computation or simulation in cellular automata.
simsim314
Posts: 1740
Joined: February 10th, 2014, 1:27 pm

### Logarithmic glider gun generator

Following this topic: viewtopic.php?f=2&t=1300

Me and dvgrn have figured out a way to create a relatively small (of size log(p)) glider gun for any arbitrary period. This effort ended up in a scripts that generates Log(P) glider gun for any period higher than around 9k.

Here it is (copy and run in golly):

Code: Select all

``````import golly as g
from glife import *
import random
from glife.text import *

class Glider:
def __init__(self, x, y, dx, dy, gen, state):
self.x = x
self.y = y
self.gen = gen
self.state = state
self.dx = dx
self.dy = dy
def Place(self):
gld = g.parse("3o\$2bo\$bo!", 0, 0, self.dx, 0, 0, self.dy)
gld = g.evolve(gld, self.state)
g.putcells(gld, self.x, self.y)
def PlaceD(self, deltax, deltay):
gld = g.parse("3o\$2bo\$bo!", 0, 0, self.dx, 0, 0, self.dy)
gld = g.evolve(gld, self.state)
g.putcells(gld, self.x + deltax, self.y + deltay)

def Description(self):
return " x {0} , y {1} , gen {2} , state {3}, dx {4}, dy {5} ".format(self.x, self.y, self.gen, self.state, self.dx, self.dy)

def NextIter(self):
if(self.state < 3):
self.state += 1
else:
self.x += self.dx
self.y -= self.dy
self.state = 0
self.gen += 1

def PrevIter(self):
if(self.state > 0):
self.state -= 1
else:
self.x -= self.dx
self.y += self.dy
self.state = 3
self.gen -= 1

def NextIters(self, n):

if n == 0:
return

if n > 0:
for x in xrange(0, n):
self.NextIter()

if n < 0:
for x in xrange(0, -n):
self.PrevIter()

def BringToGeneration(self, n):
self.NextIters(n - self.gen)

def Copy(self):
return Glider(self.x, self.y, self.dx, self.dy, self.gen, self.state)

class Snark:
def __init__(self, glider, dist, isRight):
self.glider = glider
self.dist = dist
self.isRight = isRight ^ (glider.dx == 1) ^ (glider.dy == 1)

self.x = glider.x + dist * glider.dx
self.y = glider.y - dist * glider.dy

if self.isRight:
self.outputGlider = Glider(self.x + 7 * self.glider.dx, self.y, self.glider.dx, -self.glider.dy, 32 + self.glider.gen + 4 * (dist - 1) + (4 - self.glider.state), 0)
else:
self.outputGlider = Glider(self.x, self.y - 9 * self.glider.dy, -self.glider.dx, self.glider.dy, 40 + self.glider.gen + 4 * (dist - 1) + (4 - self.glider.state), 0)

def Place(self):
if self.isRight:
mir = g.parse("5\$8b2o3b2o\$8b2o2bob3o\$12bo4bo\$8b4ob2o2bo\$8bo2bobobob2o\$11bobobobo\$12b2obobo\$16bo2\$2b2o\$3bo7b2o\$3bobo5b2o\$4b2o7\$14b2o\$14bo\$15b3o\$17bo!", -10, -20, 1, 0, 0, 1)
else:
mir = g.parse("14\$22bo\$4b2o14b5o\$5bo13bo5bo\$5bobo12b3o2bo\$6b2o15bob2o\$20b4o2bo\$15b2o3bo3b2o\$15b2o4b3o\$23bo\$23bob2o\$22b2ob2o3\$14b2o\$14bo\$15b3o\$17bo!", -10, -20, 1, 0, 0, 1)

mir = g.transform(mir, 0, 0, self.glider.dx, 0, 0, self.glider.dy)
g.putcells(mir, self.x, self.y)

class StaticMirror:
def __init__(self, glider, dist, isRight):
self.glider = glider
self.dist = dist
self.isRight = isRight ^ (glider.dx == 1) ^ (glider.dy == 1)

self.x = glider.x + dist * glider.dx
self.y = glider.y - dist * glider.dy

if self.isRight:
self.outputGlider = Glider(self.x + 78 * self.glider.dx, self.y - 10 * self.glider.dy, self.glider.dx, -self.glider.dy, 359 + self.glider.gen + 4 * (dist - 1) + (4 - self.glider.state), 0)
else:
self.outputGlider = Glider(self.x + 10 * self.glider.dx, self.y - 80 * self.glider.dy, -self.glider.dx, self.glider.dy, 351 + self.glider.gen + 4 * (dist - 1) + (4 - self.glider.state), 0)

def Place(self):
if self.isRight:
mir = g.parse("12\$69b2o\$69b2o9\$84b2o\$84b2o10\$64b2o\$65bo\$62b3o\$13b2o47bo\$14bo\$14bobo\$15b2o8\$18bo34bo\$16b3o32b3o\$15bo34bo\$15b2o33b2o20b2o\$5b2o56b2o7b2o\$6bo57bo\$6bobo55bobo\$7b2o4b2o44b2o4b2o\$12bo2bo44bo20b2o\$13b2o45bobo18bo\$25b2o34b2o16bobo\$25b2o52b2o8\$11b2o3b2o32b2o\$12bo3bo20b2o11b2o\$9b3o5b3o18bo\$9bo9bo15b3o35b2o\$35bo37b2o2b2o\$77bobo\$79bo\$79b2o5\$48b2o\$49bo\$46b3o\$46bo!", -10, -60, 1, 0, 0, 1)
else:
mir = g.parse("7\$58b2o\$58b2o2\$26bo\$24b3o\$8bo14bo\$8b3o12b2o\$11bo\$10b2o3\$11b2o\$11b2o17b2o\$30b2o2\$68b2o\$68b2o3\$27b2o\$27bo19b2o\$28b3o15bobo\$30bo15bo\$24b2o19b2o\$24bo\$25b3o\$27bo6\$33b2o\$33bo\$14b2o15bobo\$14b2o15b2o\$2b2o\$bobo\$bo\$2o8\$13b2o\$12bobo\$12bo\$11b2o9\$23b2o\$23b2o6\$12b2o\$13bo19b2o\$13bobo17bo\$14b2o15bobo8b2o\$26bo4b2o9bo\$25bobo15b3o\$25bobo17bo\$14b2o10bo\$13bobo\$13bo\$12b2o\$27b2o\$27bo\$28b3o\$30bo!", -20, -80, 1, 0, 0, 1)

mir = g.transform(mir, 0, 0, self.glider.dx, 0, 0, self.glider.dy)
g.putcells(mir, self.x, self.y)

class ColorSwitch:
def __init__(self, glider, dist):
self.glider = glider
self.dist = dist

self.x = glider.x + dist * glider.dx
self.y = glider.y - dist * glider.dy

self.outputGlider = Glider(self.x + 79 * self.glider.dx, self.y - 50 * self.glider.dy, self.glider.dx, self.glider.dy, 368 + self.glider.gen + 4 * (dist - 1) + (4 - self.glider.state), 0)

def Place(self):
mir = g.parse("5\$66b2o\$66b2o11\$80b2o\$80bobo\$82bo\$82b2o6\$61b2o\$62bo\$59b3o\$59bo3\$13b2o\$14bo\$14bobo\$15b2o61b2o\$78bo\$79b3o\$81bo2\$15bo34bo\$13b3o32b3o\$12bo34bo\$12b2o33b2o20b2o\$2b2o56b2o7b2o\$3bo57bo\$3bobo55bobo\$4b2o4b2o44b2o4b2o\$9bo2bo44bo20b2o\$10b2o45bobo18bo\$22b2o34b2o16bobo\$22b2o52b2o8\$8b2o3b2o32b2o\$9bo3bo20b2o11b2o\$6b3o5b3o18bo\$6bo9bo15b3o35b2o\$32bo37b2o2b2o\$74bobo\$76bo\$2b2o72b2o\$2bobo\$4bo\$4b2o2\$45b2o\$46bo\$43b3o\$43bo!", 0, -60, 1, 0, 0, 1)
mir = g.transform(mir, 0, 0, self.glider.dx, 0, 0, self.glider.dy)
g.putcells(mir, self.x, self.y)

class UniversalGliderGun():
def __init__(self, x, y, period):
self.x = x
self.y = y
self.period = period
self.numBits = 3

def PlaceStart(self, turnOnBit):
startPart = g.parse("6\$44bo\$43bobo\$43bobo\$44bo18\$64b2o\$65bo\$65bobo\$66b2o5\$63b2o\$64bo\$64bobo\$65b2o18\$104b2o3b2o\$102b3obo2b2o\$60b2o39bo4bo\$59bobo39bo2b2ob4o\$59bo25b2o13b2obobobo2bo\$58b2o25bo15bobobobo\$66b2o15bobo15bobob2o\$66b2o15b2o17bo2\$115b2o\$106b2o7bo\$106b2o5bobo\$113b2o7\$65b2o36b2o\$64bobo37bo\$64bo36b3o\$63b2o36bo2\$103b2o3b2o\$103b2o2bob3o\$107bo4bo\$103b4ob2o2bo\$103bo2bobobob2o\$106bobobobo\$107b2obobo\$75b2o34bo\$75b2o\$87b2o8b2o\$87bobo8bo7b2o\$89bo8bobo5b2o\$89b2o8b2o2\$64b2o\$65bo19b2o\$65bobo17bo56bo\$66b2o15bobo38b2o14b5o\$70b2o6bo4b2o40bo13bo5bo\$69bo2bo4bobo29b2o14bobo12b3o2bo\$70b2o5bobo29bo16b2o15bob2o\$66b2o10bo31b3o27b4o2bo\$65bobo44bo22b2o3bo3b2o\$65bo69b2o4b3o\$64b2o77bo\$79b2o62bob2o\$79bo62b2ob2o\$80b3o\$82bo\$98b2o34b2o\$99bo34bo\$99bobo33b3o\$100b2o2b2o31bo5bo\$104b2o35b3o15bo9bo\$140bo18b3o5b3o\$127b2o11b2o20bo3bo\$127b2o32b2o3b2o8\$40bo57b2o52b2o\$38b5o14b2o38bobo16b2o34b2o\$37bo5bo13bo39bo18bobo45b2o\$37bo2b3o12bobo38b2o20bo44bo2bo\$36b2obo15b2o55b2o4b2o44b2o4b2o\$36bo2b4o69bobo55bobo\$37b2o3bo3b2o66bo57bo\$39b3o4b2o57b2o7b2o56b2o\$39bo65b2o20b2o33b2o\$36b2obo88bo34bo\$36b2ob2o84b3o32b3o\$125bo34bo2\$47b2o\$48bo\$45b3o47b2o\$45bo50bo\$96bobo\$97b2o2\$49bo\$47b3o\$46bo69bo\$46b2o66b3o\$113bo\$113b2o5\$36b2o\$35bobo5b2o47b2o\$35bo7b2o48bo\$34b2o57bobo\$94b2o\$48bo39bo\$44b2obobo38b3o\$43bobobobo41bo\$40bo2bobobob2o39b2o\$40b4ob2o2bo\$44bo4bo\$40b2o2bob3o\$40b2o3b2o3\$100b2o6b2o\$93b2o5bobo5b2o\$93b2o7bo\$102b2o2\$89bo\$88bobob2o\$88bobobobo\$87b2obobobo2bo\$88bo2b2ob4o\$88bo4bo\$89b3obo2b2o\$91b2o3b2o26\$238bo\$236b3o\$235bo\$235b2o7\$225b2o\$224bobo5b2o\$224bo7b2o\$223b2o2\$237bo\$233b2obobo\$232bobobobo\$229bo2bobobob2o\$229b4ob2o2bo\$233bo4bo\$229b2o2bob3o\$229b2o3b2o!", 0, -60, 1, 0, 0, 1)
g.putcells(startPart, self.x, self.y)

if turnOnBit:
blocker = g.parse("\$b2o\$bo\$2b3o\$4bo!", 60,-43, 1, 0, 0, 1)
g.putcells(blocker, self.x, self.y)

def PlaceEnd(self, turnOnBit, numBits):
startPart = g.parse("121bo\$81b2o38b3o\$82bo41bo14bo\$82bobo38b2o12b3o\$83b2o2b2o47bo\$87b2o47b2o3\$135b2o\$116b2o17b2o\$116b2o6\$81b2o36b2o\$80bobo16b2o19bo\$80bo18bobo15b3o\$79b2o20bo15bo\$95b2o4b2o19b2o\$95bobo25bo\$97bo22b3o\$88b2o7b2o21bo\$88b2o7\$78b2o\$79bo\$79bobo\$80b2o\$96bo\$94b3o\$93bo\$93b2o28b2o\$122bobo\$122bo29b2o\$121b2o29bobo\$61b2o91bo\$38bo23bo64b2o25b2o\$36b3o23bobo61bobo4b2o\$35bo27b2o61bo7bo\$35b2o88b2o4b3o\$131bo\$12bo42bo83b2o\$12b3o38b3o44b2o36bobo\$5bo9bo36bo47b2o36bo\$5b3o6b2o23b2o11b2o83b2o\$8bo30b2o\$7b2o\$95b2o\$95b2o\$99b2o54b2o\$99b2o54bobo\$157bo\$157b2o\$64b2o27b2o\$3bo23b2o35b2o11b2o14b2o\$2bobo22bo49bo\$3bo14b2o8b3o47b3o\$18bo11bo49bo\$19b3o\$21bo125b2o\$138b2o7b2o\$5b2o32b2o98bo\$4bobo33bo98bobo\$4bo32b3o100b2o\$3b2o32bo85bo32b2o\$19b2o100b3o32bo\$19bobo52b2o21bo22bo33bobo\$21bo52b2o21b3o20b2o32b2o\$12b2o7b2o40b2o35bo\$12b2o50bo34b2o38bo\$64bobo72b3o\$65b2o63bo11bo\$130b3o8b2o14bo\$133bo22bobo\$132b2o23bo2\$2b2o58b2o25b2o\$3bo59bo25b2o\$3bobo57bobo\$4b2o58b2o3\$77b2o\$77bobo6b2o32b2o\$22b2o55bo6bo20b2o11b2o23b2o23bo\$22bo56b2o6b3o18bo36bo22b3o\$20bobo66bo15b3o38b3o18bo\$20b2o83bo42bo18b2o2\$124b2o\$125bo49b2ob2o\$75b2o45b3o51bob2o\$75bobo44bo53bo\$77bo90b2o4b3o\$77b2o89b2o3bo3b2o\$173b4o2bo\$159b2o15bob2o\$158bobo12b3o2bo\$158bo13bo5bo\$2b2o15b2o38b2o96b2o14b5o\$bobo15b2o37bobo114bo\$bo25b2o29bo25b2o129b2o\$2o25bo29b2o25bo131bo\$25bobo37b2o15bobo131bobo\$25b2o38b2o15b2o133b2o\$242b2o\$242b2o2\$210bo\$208b3o\$192bo14bo\$192b3o12b2o\$195bo\$194b2o3\$64b2o129b2o\$63bobo129b2o17b2o\$63bo150b2o\$62b2o\$252b2o\$252b2o3\$20b2o58b2o129b2o\$20bobo57bobo128bo19b2o\$22bo59bo40bo88b3o15bobo\$22b2o58b2o39b3o88bo15bo\$126bo81b2o19b2o\$125b2o81bo\$209b3o\$18b2o191bo\$18bobo93b2ob2o\$20bo93b2obo\$20b2o50b2o43bo\$63b2o7b2o43b3o4b2o\$64bo50b2o3bo3b2o\$64bobo47bo2b4o96b2o\$65b2o47b2obo15b2o82bo\$48bo32b2o32bo2b3o12bobo62b2o15bobo\$46b3o32bo33bo5bo13bo62b2o15b2o\$22bo22bo33bobo34b5o14b2o\$22b3o20b2o32b2o37bo\$25bo\$24b2o38bo\$64b3o\$55bo11bo\$55b3o8b2o14bo\$58bo22bobo\$57b2o23bo3\$197b2o\$196bobo\$196bo\$195b2o2\$77b2o\$45b2o30bo\$32b2o11b2o23b2o6b3o\$33bo36bo9bo\$30b3o38b3o82b2o\$30bo42bo82b2o2\$49b2o156b2o\$50bo156b2o\$47b3o93b2o\$47bo96bo\$144bobo\$145b2o2\$196b2o\$197bo19b2o5b2o\$163b2o32bobo17bo6bo\$163b2o15bo17b2o15bobo7b3o\$178b3o29bo4b2o10bo\$145b2o30bo31bobo\$144bobo30b2o30bobo\$144bo53b2o10bo\$143b2o52bobo\$197bo\$196b2o\$211b2o\$154b2o55bo\$153bobo56b3o\$153bo60bo\$152b2o5\$174b2o\$174bobo\$176bo\$176b2o17\$215b2o\$216bo\$216bobo\$217b2o\$242b2o\$242b2o2\$210bo\$208b3o\$192bo14bo\$192b3o12b2o\$195bo\$194b2o3\$195b2o\$195b2o17b2o\$214b2o2\$252b2o\$252b2o3\$211b2o\$211bo19b2o\$212b3o15bobo\$214bo15bo\$208b2o19b2o\$208bo\$209b3o\$211bo6\$217b2o\$217bo\$198b2o15bobo\$198b2o15b2o12\$197b2o\$196bobo\$196bo\$195b2o9\$207b2o\$207b2o6\$196b2o\$197bo19b2o5b2o\$197bobo17bo6bo\$198b2o15bobo7b3o\$210bo4b2o10bo\$209bobo\$209bobo\$198b2o10bo\$197bobo\$197bo\$196b2o\$211b2o\$211bo\$212b3o\$214bo!", 1, -108, 1, 0, 0, 1)
g.putcells(startPart, self.x + 75 * numBits, self.y - numBits * 75)

if turnOnBit:
blocker = g.parse("\$b2o\$bo\$2b3o\$4bo!", 60,-43, 1, 0, 0, 1)
g.putcells(blocker, self.x + 75 * numBits, self.y - numBits * 75)

def PlaceBitStream(self, blocks):
d = 0

for toBlock in blocks:
bit = g.parse("87b2o\$88bo\$43bo44bobo\$41b3o45b2o\$40bo\$40b2o2\$17bo42bo\$17b3o38b3o15bo\$10bo9bo36bo18b3o6b2o\$10b3o6b2o23b2o11b2o20bo6bo\$13bo30b2o32b2o6bobo\$12b2o73b2o5\$75b2o\$75b2o2\$8bo23b2o\$7bobo22bo\$8bo14b2o8b3o\$23bo11bo\$24b3o55b2o\$26bo56bo\$80b3o6bo\$10b2o32b2o34bo7bobo\$9bobo33bo43bo\$9bo32b3o\$8b2o32bo\$24b2o\$24bobo52b2o\$26bo52b2o\$17b2o7b2o40b2o\$17b2o50bo\$69bobo\$70b2o5\$7b2o58b2o25b2o\$8bo59bo25b2o\$8bobo57bobo\$9b2o58b2o3\$82b2o\$82bobo6b2o\$27b2o55bo6bo\$27bo56b2o6b3o\$25bobo66bo\$25b2o4\$80b2o\$80bobo\$82bo\$82b2o5\$7b2o15b2o38b2o\$6bobo15b2o37bobo\$6bo25b2o29bo25b2o\$5b2o25bo29b2o25bo\$30bobo37b2o15bobo\$30b2o38b2o15b2o5\$12b2o\$13bo\$13bobo\$14b2o4\$69b2o\$bo66bobo\$b3o6b2o56bo\$4bo6bo55b2o\$3b2o6bobo\$12b2o3\$25b2o58b2o\$25bobo57bobo\$2o25bo59bo\$2o25b2o58b2o4\$23b2o\$23bobo\$7b2o16bo\$8bo16b2o50b2o\$5b3o6bo53b2o7b2o\$5bo7bobo53bo\$14bo54bobo\$70b2o\$53bo32b2o\$51b3o32bo\$4b2o21bo22bo33bobo\$4b2o21b3o20b2o32b2o\$30bo\$29b2o38bo\$69b3o\$60bo11bo\$60b3o8b2o14bo\$63bo22bobo\$62b2o23bo2\$19b2o\$19b2o5\$7b2o73b2o\$7bobo6b2o32b2o30bo\$9bo6bo20b2o11b2o23b2o6b3o\$9b2o6b3o18bo36bo9bo\$19bo15b3o38b3o\$35bo42bo2\$54b2o\$55bo\$5b2o45b3o\$5bobo44bo\$7bo\$7b2o!", 71, -142, 1, 0, 0, 1)
g.putcells(bit, self.x + d, self.y - d)

if toBlock:
blocker = g.parse("\$b2o\$bo\$2b3o\$4bo!", 60,-43, 1, 0, 0, 1)
g.putcells(blocker,self.x + 75 + d, self.y - 75 - d)

d += 75
def PlaceReflector(self):
blocker = g.parse("9b2o\$10bo\$10bobo\$11b2o2b2o37bo\$15b2o35b3o15bo9bo\$51bo18b3o5b3o\$38b2o11b2o20bo3bo\$38b2o32b2o3b2o8\$9b2o52b2o\$8bobo16b2o34b2o\$8bo18bobo45b2o\$7b2o20bo44bo2bo\$23b2o4b2o44b2o4b2o\$23bobo55bobo\$25bo57bo\$16b2o7b2o56b2o\$o15b2o20b2o33b2o\$3o36bo34bo\$3bo32b3o32b3o\$2b2o32bo34bo6\$71b2o\$71bobo\$73bo\$73b2o2\$27bo\$25b3o\$24bo\$24b2o10\$4b2o\$4b2o9\$19b2o\$19b2o!", 263,-15, 1, 0, 0, 1)
g.putcells(blocker, self.x - 112, self.y + 112)

def ZeroPeriodMod8(self, mod8Value):
if mod8Value == 0:
return 8248

if mod8Value == 1:
return 8281

if mod8Value == 2:
return 8642

if mod8Value == 3:
return 8115

if mod8Value == 4:
return 8212

if mod8Value == 5:
return 8045

if mod8Value == 6:
return 8414

if mod8Value == 7:
return 8559

def HoldMechanismGliderPrepare(self, mod8Value):

if mod8Value == 0:

golly.select( [self.x +111 + 75,self.y-140 - 75,4,4] )
golly.clear(0)
gld = Glider(self.x +113 + 75,self.y -140 - 75, 1,1,0,0)
snk = Snark(gld, 15, False)
snk.Place()
return snk.outputGlider

if mod8Value == 1:

golly.select( [self.x +111,self.y -140,4,4] )
golly.clear(0)
gld = Glider(self.x +113, self.y -140, 1,1,0,0)
snk = Snark(gld, 15, False)
snk.Place()
return snk.outputGlider

if mod8Value == 2:

golly.select( [self.x +111 +  75,self.y-140 - 75,4,4] )
golly.clear(0)
gld = Glider(self.x +113 +  75, self.y-140 -  75, 1,1,0,0)
snk = Snark(gld, 15, False)
snk.Place()
return snk.outputGlider

if mod8Value == 3:

golly.select( [self.x +111 + 75,self.y-140 - 75,4,4] )
golly.clear(0)
gld = Glider(self.x +113 + 75, self.y-140 - 75, 1,1,0,0)
snk = Snark(gld, 15, False)
snk.Place()
return snk.outputGlider

if mod8Value == 4:

golly.select( [self.x +78,self.y-100,4,4] )
golly.clear(0)
gld = Glider(self.x +80, self.y-100, -1,1,0,0)
return gld

if mod8Value == 5:

golly.select( [self.x +81,self.y-133,4,4] )
golly.clear(0)
gld = Glider(self.x +82,self.y -133, -1,1,0,0)
return gld

if mod8Value == 6:

golly.select( [self.x +111,self.y-140,4,4] )
golly.clear(0)
gld = Glider(self.x +113, self.y-140, 1,1,0,0)
snk = Snark(gld, 15, False)
snk.Place()
return snk.outputGlider

if mod8Value == 7:

golly.select( [self.x +81,self.y-133,4,4] )
golly.clear(0)
gld = Glider(self.x +82, self.y-133, -1,1,0,0)
return gld

def SnarkSnake(self, Mod8Multiplier, gld):

a = [0,-1, -1, -1, -1, -1, -1]

if self.SnarkSnakeCalculationsNew(Mod8Multiplier, gld, [0], False) <= 0:
return Mod8Multiplier

i = 0
idx = 0
while  self.SnarkSnakeCalculationsNew(Mod8Multiplier, gld, a , False) > 0:
i+= 1

if i > 75 * (self.numBits - 1) - 40:
idx += 1
i = 0

a[idx] = i

a[idx] -= 1

return self.SnarkSnakeCalculationsNew(Mod8Multiplier, gld, a, True)

'''
bestDist = -1
bestD = -1

if not self.SnarkSnakeCalculations(Mod8Multiplier, gld, 0, False):
return Mod8Multiplier

for d in xrange(0, 75 * (self.numBits - 1) - 40):
val = self.SnarkSnakeCalculations(Mod8Multiplier, gld, d, False)
if  val > bestDist:
val = bestDist
bestD = d

return self.SnarkSnakeCalculations(Mod8Multiplier, gld, bestD, True)
'''

def SnarkSnakeCalculations(self, Mod8Multiplier, gldIn, delta, toPlace):

curDist = Mod8Multiplier

gld = gldIn.Copy()

i = 0
x = gld.x

while True:
if curDist < 55 + (x - gld.x) + delta:
if toPlace:
return curDist
break

if i == 0:
degrees = [(True, 22), (False, 15 + delta), (False, 15), (True, 17 + delta)]
else:
degrees = [(True, 15), (False, 15 + delta), (False, 15), (True, 17 + delta)]
for deg in degrees:
sn = Snark(gld, deg[1], deg[0])
if toPlace:
sn.Place()
gld = sn.outputGlider

curDist -= (26 + delta)
i += 1

return curDist

def SnarkSnakeCalculationsNew(self, Mod8Multiplier, gldIn, delta, toPlace):

curDist = Mod8Multiplier

gld = gldIn.Copy()

i = 0
x = gld.x

for i in xrange(0, len(delta)):
if delta[i] >= 0:
if curDist < 75 + (x - gld.x) + delta[i]:
return -1

if i == 0:
degrees = [(True, 25), (False, 15 + delta[i]), (False, 15), (True, 17 + delta[i])]
else:
degrees = [(True, 15), (False, 15 + delta[i]), (False, 15), (True, 17 + delta[i])]

for deg in degrees:
sn = Snark(gld, deg[1], deg[0])
if toPlace:
sn.Place()
gld = sn.outputGlider

curDist -= (26 + delta[i])

return curDist

def PlaceHoldMechanism(self, period0):

mod8Value = period0 % 8
Mod8Multiplier = (period0 - self.CalculateZeroPeriod(self.numBits, mod8Value)) / 8
gld = self.HoldMechanismGliderPrepare(mod8Value)
Mod8Multiplier = self.SnarkSnake(Mod8Multiplier, gld)

if mod8Value == 0:

snk = Snark(gld, 15 + Mod8Multiplier, False)
snk.Place()
sw = ColorSwitch(snk.outputGlider, 10)
sw.Place()
snk = Snark(sw.outputGlider, 88 + 75, False)
snk.Place()
return 8248 + 8 * Mod8Multiplier

if mod8Value == 1:

snk = Snark(gld, 15 + Mod8Multiplier, False)
snk.Place()
snk = StaticMirror(snk.outputGlider, 122, False)
snk.Place()
return 8281 + 8 * Mod8Multiplier

if mod8Value == 2:

snk = StaticMirror(gld, 15 + Mod8Multiplier, False)
snk.Place()
sw = ColorSwitch(snk.outputGlider, 10)
sw.Place()
snk = StaticMirror(sw.outputGlider, 17 +75, False)
snk.Place()
return 8642 + 8 * Mod8Multiplier

if mod8Value == 3:

snk = Snark(gld, 15 + Mod8Multiplier, False)
snk.Place()
snk = StaticMirror(snk.outputGlider, 122 + 75, False)
snk.Place()
return 8115 + 8 * Mod8Multiplier

if mod8Value == 4:

snk = Snark(gld, 15 + Mod8Multiplier, False)
snk.Place()
sw = ColorSwitch(snk.outputGlider, 10)
sw.Place()
snk = Snark(sw.outputGlider, 32, False)
snk.Place()
return 8212 + 8 * Mod8Multiplier

if mod8Value == 5:

snk = Snark(gld, 15 + Mod8Multiplier, False)
snk.Place()
snk = Snark(snk.outputGlider, 124, False)
snk.Place()
return 8045 + 8 * Mod8Multiplier

if mod8Value == 6:

snk = Snark(gld, 15 + Mod8Multiplier, False)
snk.Place()
sw = ColorSwitch(snk.outputGlider, 10)
sw.Place()
snk = Snark(sw.outputGlider, 88, False)
snk.Place()
return 8414 + 8 * Mod8Multiplier

if mod8Value == 7:

snk = StaticMirror(gld, 30 + Mod8Multiplier, False)
snk.Place()
snk = StaticMirror(snk.outputGlider, 53, False)
snk.Place()
return 8559 + 8 * Mod8Multiplier

def RotationPeriod(self, numBits):
return 3415 + 1200 * (numBits - 3)

def RotationPeriodHoldBack(self, numBits):
return 1200 * (numBits - 3)

def BitHoldBack(self, numBits):
return 932 * (numBits - 3)

def CalculateZeroPeriod(self, numBits, periodMod8):
return self.BitHoldBack(numBits) + self.ZeroPeriodMod8(periodMod8) + self.RotationPeriodHoldBack(numBits)

def CalculateMaxPeriod(self, numBits, periodMod8):
return self.CalculateZeroPeriod(numBits, periodMod8) + (2**numBits - 1) * self.RotationPeriod(numBits)

def CalculateNumBits(self, period):

while self.CalculateMaxPeriod(self.numBits, period%8) < period:
self.numBits += 2

return self.numBits

def DoAllCalculations(self):
period = self.period

if period < self.ZeroPeriodMod8(period % 8):
golly.exit("The period is too low")

numBits = self.CalculateNumBits(period)

rot = self.RotationPeriod(numBits)
zero = self.CalculateZeroPeriod(numBits, (period - self.RotationPeriod(numBits)) % 8)

zeroMultiplier = (zero - zero % rot) / rot
periodMultipler = (period - period % rot) / rot
multiplier = periodMultipler - zeroMultiplier - 10
period -= multiplier * rot

while period >= self.CalculateZeroPeriod(numBits, period % 8):
multiplier += 1
period -= rot

bits = 2**numBits - multiplier

endBit = bits < 2**(numBits - 1)

if not endBit:
bits -= 2**(numBits - 1)

startBit = bits % 2 == 0
bits = (bits - bits%2) / 2

middlebits = []

for i in xrange(0, self.numBits - 2):
middlebits.extend([bits % 2 == 0])
bits = (bits - bits%2) / 2

period0 = period  + rot

#golly.show('{0}, {1}, {2}'.format(startBit, middlebits[0], endBit))
return [startBit, middlebits, endBit, period0]

def Place(self):
values = self.DoAllCalculations();
self.PlaceStart(values[0])
self.PlaceBitStream(values[1])
self.PlaceEnd(values[2],self.numBits - 1)
self.PlaceReflector()
gld = Glider(self.x + 167, self.y + 63, -1,-1,0,0)
gld.Place()
self.PlaceHoldMechanism(values[3])

periodText = make_text (str(self.period))
g.putcells(periodText,self.x - 50, self.y + 200)

gen = g.getstring("Enter Gun Period: ")

g.select([0,0,1,1])
g.clear(1)
g.clear(0)

gun = UniversalGliderGun(0,0,int(gen))
gun.Place()

'''
for x in xrange(0, 100):
gun = UniversalGliderGun(0,2000 * x,17985 + 12289 *  x)
gun.Place()
'''

g.fit()
``````
We ended up with the following challenge: to fit this design into √logp x √logp bounding box. Due to the fact that the current design is "long and thin" we though that it would be an interesting and theoretically valuable effort to squeeze it inside the smallest bounding box possible. This by itself can be considered a scripting and design challenge.
Last edited by simsim314 on April 4th, 2014, 10:25 am, edited 1 time in total.

simsim314
Posts: 1740
Joined: February 10th, 2014, 1:27 pm

### Re: Logarithmic glider gun generator

I was thinking, that the first step to "boxy" design is to make a "flat" binary. It's can be easily done with gliders and snarks, probably it can be done with Herschels too.

Something like this:

Code: Select all

``````x = 427, y = 104, rule = B3/S23
58b2o103b2o103b2o103b2o\$36b2o20b2o81b2o20b2o81b2o20b2o81b2o20b2o\$37bo
104bo104bo104bo\$26bo10bobo91bo10bobo91bo10bobo91bo10bobo\$24b3o11b2o89b
3o11b2o89b3o11b2o89b3o11b2o\$8bo14bo89bo14bo89bo14bo89bo14bo\$8b3o12b2o
88b3o12b2o88b3o12b2o88b3o12b2o\$11bo104bo104bo104bo\$10b2o103b2o103b2o
103b2o3\$11b2o103b2o103b2o103b2o\$11b2o17b2o84b2o17b2o84b2o17b2o84b2o17b
2o\$30b2o103b2o103b2o103b2o2\$68b2o103b2o103b2o103b2o\$68b2o103b2o103b2o
103b2o3\$27b2o103b2o103b2o103b2o\$27bo19b2o83bo19b2o83bo19b2o83bo19b2o\$
28b3o15bobo84b3o15bobo84b3o15bobo84b3o15bobo\$30bo15bo88bo15bo88bo15bo
88bo15bo\$24b2o19b2o82b2o19b2o82b2o19b2o82b2o19b2o\$24bo104bo104bo104bo\$
25b3o102b3o102b3o102b3o\$27bo104bo104bo104bo6\$33b2o103b2o103b2o103b2o\$
33bo104bo104bo104bo\$14b2o15bobo85b2o15bobo85b2o15bobo85b2o15bobo\$14b2o
15b2o86b2o15b2o86b2o15b2o86b2o15b2o\$2b2o103b2o103b2o103b2o\$bobo102bobo
102bobo102bobo\$bo104bo104bo104bo\$2o103b2o103b2o103b2o3\$63b2o3b2o98b2o
3b2o98b2o3b2o98b2o3b2o\$63b2o2bob3o96b2o2bob3o96b2o2bob3o96b2o2bob3o\$
67bo4bo99bo4bo99bo4bo99bo4bo\$63b4ob2o2bo95b4ob2o2bo95b4ob2o2bo95b4ob2o
2bo\$63bo2bobobob2o94bo2bobobob2o94bo2bobobob2o94bo2bobobob2o\$13b2o51bo
bobobo45b2o51bobobobo45b2o51bobobobo45b2o51bobobobo\$12bobo52b2obobo44b
obo52b2obobo44bobo52b2obobo44bobo52b2obobo\$12bo58bo45bo58bo45bo58bo45b
o58bo\$11b2o103b2o103b2o103b2o\$57b2o103b2o103b2o103b2o\$58bo7b2o95bo7b2o
95bo7b2o95bo7b2o\$58bobo5b2o95bobo5b2o95bobo5b2o95bobo5b2o\$59b2o103b2o
103b2o103b2o5\$23b2o103b2o103b2o103b2o\$23b2o103b2o103b2o103b2o\$69b2o
103b2o103b2o103b2o\$69bo104bo104bo104bo\$70b3o102b3o102b3o102b3o\$72bo
104bo104bo104bo2\$12b2o103b2o103b2o103b2o\$13bo19b2o83bo19b2o83bo19b2o
83bo19b2o\$13bobo17bo84bobo17bo84bobo17bo84bobo17bo\$14b2o15bobo85b2o15b
obo85b2o15bobo85b2o15bobo\$26bo4b2o98bo4b2o98bo4b2o98bo4b2o\$25bobo102bo
bo102bobo102bobo\$25bobo102bobo102bobo102bobo\$14b2o10bo31b2o59b2o10bo
31b2o59b2o10bo31b2o59b2o10bo31b2o\$13bobo42bo59bobo42bo59bobo42bo59bobo
42bo\$13bo42bobo59bo42bobo59bo42bobo59bo42bobo\$12b2o42b2o59b2o42b2o59b
2o42b2o59b2o42b2o\$27b2o103b2o103b2o103b2o\$27bo13b2o89bo13b2o89bo13b2o
89bo13b2o\$28b3o10b2o90b3o10b2o90b3o10b2o90b3o10b2o\$30bo104bo104bo104bo
\$50b2o58bo44b2o58bo44b2o58bo44b2o58bo\$50b2o6b2o48b3o44b2o6b2o48b3o44b
2o6b2o48b3o44b2o6b2o48b3o\$58b2o47bo55b2o47bo55b2o47bo55b2o47bo\$9b2o96b
2o103b2o103b2o103b2o\$8bobo\$10bo35bo104bo104bo104bo\$45bobo102bobo102bob
o102bobo\$45b2o6b2o95b2o6b2o95b2o6b2o95b2o6b2o\$53bo104bo104bo104bo\$54b
3o102b3o102b3o102b3o\$56bo40b2o62bo40b2o62bo40b2o62bo40b2o\$96bobo5b2o
95bobo5b2o95bobo5b2o95bobo5b2o\$96bo7b2o95bo7b2o95bo7b2o95bo7b2o\$95b2o
103b2o103b2o103b2o2\$109bo104bo104bo104bo\$105b2obobo99b2obobo99b2obobo
99b2obobo\$104bobobobo98bobobobo98bobobobo98bobobobo\$101bo2bobobob2o94b
o2bobobob2o94bo2bobobob2o94bo2bobobob2o\$101b4ob2o2bo95b4ob2o2bo95b4ob
2o2bo95b4ob2o2bo\$105bo4bo99bo4bo99bo4bo99bo4bo\$101b2o2bob3o96b2o2bob3o
96b2o2bob3o96b2o2bob3o\$101b2o3b2o98b2o3b2o98b2o3b2o98b2o3b2o!
``````
I also managed to make the "boxy" concept with Herschels. They have an obvious advantage regarding orthogonal design, so probably the glider gun and the hold back mechanism should be of the same nature as well:

Code: Select all

``````x = 733, y = 561, rule = B3/S23
55\$213bo149bo149bo\$213b3o147b3o147b3o\$89bo20bo78bo26bo22bo20bo78bo26bo
22bo20bo78bo26bo22bo20bo78bo20bo\$87b3o11bo7bobo75b3o25b2o20b3o11bo7bob
o75b3o25b2o20b3o11bo7bobo75b3o25b2o20b3o11bo7bobo75b3o11bo7bobo\$86bo
14b3o6bo75bo49bo14b3o6bo75bo49bo14b3o6bo75bo49bo14b3o6bo75bo14b3o6bo\$
86b2o16bo16b2o63b2o48b2o16bo16b2o63b2o48b2o16bo16b2o63b2o48b2o16bo16b
2o63b2o16bo16b2o\$103b2o16bo131b2o16bo131b2o16bo131b2o16bo81b2o16bo\$
119bobo41bo42bo62bobo41bo42bo62bobo41bo42bo62bobo41bo55bobo\$119b2o42b
3o38b3o62b2o42b3o38b3o62b2o42b3o38b3o62b2o42b3o53b2o\$156bo9bo36bo102bo
9bo36bo102bo9bo36bo102bo9bo\$156b3o6b2o23b2o11b2o101b3o6b2o23b2o11b2o
101b3o6b2o23b2o11b2o101b3o6b2o\$159bo30b2o117bo30b2o117bo30b2o117bo\$96b
2o25b2o33b2o86b2o25b2o33b2o86b2o25b2o33b2o86b2o25b2o33b2o36b2o25b2o\$
96b2o25bo122b2o25bo122b2o25bo122b2o25bo72b2o25bo\$121bobo147bobo147bobo
147bobo97bobo\$121b2o148b2o148b2o148b2o98b2o3\$108b2o148b2o148b2o148b2o
98b2o\$99b2o6bobo105b2o32b2o6bobo105b2o32b2o6bobo105b2o32b2o6bobo89b2o
6bobo\$78b2o20bo6bo46bo23b2o35b2o11b2o20bo6bo46bo23b2o35b2o11b2o20bo6bo
46bo23b2o35b2o11b2o20bo6bo46bo23b2o20bo6bo\$78bo18b3o6b2o45bobo22bo49bo
18b3o6b2o45bobo22bo49bo18b3o6b2o45bobo22bo49bo18b3o6b2o45bobo22bo18b3o
6b2o\$79b3o15bo56bo14b2o8b3o47b3o15bo56bo14b2o8b3o47b3o15bo56bo14b2o8b
3o47b3o15bo56bo14b2o8b3o15bo\$81bo87bo11bo49bo87bo11bo49bo87bo11bo49bo
87bo11bo\$170b3o147b3o147b3o147b3o\$172bo38b2o109bo38b2o109bo38b2o109bo\$
211bo149bo149bo\$110b2o44b2o32b2o20b3o45b2o44b2o32b2o20b3o45b2o44b2o32b
2o20b3o45b2o44b2o52b2o\$109bobo43bobo33bo22bo44bobo43bobo33bo22bo44bobo
43bobo33bo22bo44bobo43bobo51bobo\$109bo45bo32b3o68bo45bo32b3o68bo45bo
32b3o68bo45bo53bo\$108b2o44b2o32bo69b2o44b2o32bo69b2o44b2o32bo69b2o44b
2o52b2o\$170b2o148b2o148b2o148b2o\$170bobo147bobo147bobo147bobo\$172bo
149bo149bo149bo\$163b2o7b2o139b2o7b2o139b2o7b2o139b2o7b2o\$126b2o35b2o
111b2o35b2o111b2o35b2o111b2o35b2o61b2o\$126bobo147bobo147bobo147bobo97b
obo\$101b2o25bo122b2o25bo122b2o25bo122b2o25bo72b2o25bo\$102bo25b2o122bo
25b2o122bo25b2o122bo25b2o72bo25b2o\$102bobo15b2o130bobo15b2o130bobo15b
2o130bobo15b2o80bobo15b2o\$103b2o15b2o131b2o15b2o131b2o15b2o131b2o15b2o
81b2o15b2o2\$153b2o148b2o148b2o148b2o\$154bo149bo149bo149bo\$154bobo147bo
bo147bobo147bobo\$155b2o148b2o148b2o148b2o5\$173b2o148b2o148b2o148b2o\$
173bo149bo149bo149bo\$121b2o48bobo97b2o48bobo97b2o48bobo97b2o48bobo47b
2o\$121bobo47b2o98bobo47b2o98bobo47b2o98bobo47b2o48bobo\$123bo149bo149bo
149bo99bo\$123b2o148b2o148b2o148b2o98b2o5\$105b2o148b2o148b2o148b2o98b2o
\$104bobo147bobo147bobo147bobo97bobo\$104bo149bo149bo149bo99bo25b2o\$103b
2o148b2o148b2o148b2o98b2o25bo\$661b2o15bobo\$153b2o15b2o131b2o15b2o131b
2o15b2o131b2o15b2o39b2o15b2o\$152bobo15b2o130bobo15b2o130bobo15b2o130bo
bo15b2o\$152bo25b2o122bo25b2o122bo25b2o122bo25b2o\$151b2o25bo122b2o25bo
122b2o25bo122b2o25bo\$176bobo147bobo147bobo147bobo\$113b2o61b2o85b2o61b
2o85b2o61b2o85b2o61b2o\$113b2o7b2o139b2o7b2o139b2o7b2o139b2o7b2o\$122bo
149bo149bo149bo\$120bobo147bobo147bobo147bobo\$120b2o148b2o148b2o148b2o\$
104b2o32bo19b2o94b2o32bo19b2o94b2o32bo19b2o94b2o32bo19b2o\$105bo32b3o
18bo95bo32b3o18bo95bo32b3o18bo95bo32b3o18bo\$105bobo33bo17bobo93bobo33b
o17bobo93bobo33bo17bobo93bobo33bo17bobo48b2o\$106b2o32b2o18b2o94b2o32b
2o18b2o94b2o32b2o18b2o94b2o32b2o18b2o47bobo\$659bo\$122bo149bo149bo149bo
85b2o\$120b3o147b3o147b3o147b3o\$119bo11bo137bo11bo137bo11bo137bo11bo\$
104bo14b2o8b3o15bo106bo14b2o8b3o15bo106bo14b2o8b3o15bo106bo14b2o8b3o
15bo\$103bobo22bo18b3o6b2o95bobo22bo18b3o6b2o95bobo22bo18b3o6b2o95bobo
22bo18b3o6b2o\$104bo23b2o20bo6bo96bo23b2o20bo6bo96bo23b2o20bo6bo96bo23b
2o20bo6bo68b2o\$149b2o6bobo139b2o6bobo139b2o6bobo139b2o6bobo66bobo\$158b
2o148b2o148b2o148b2o41b2o25bo\$652bo25b2o\$652bobo15b2o\$171b2o148b2o148b
2o148b2o30b2o15b2o\$171bobo147bobo147bobo147bobo\$146b2o25bo122b2o25bo
122b2o25bo122b2o25bo\$108b2o36b2o25b2o83b2o36b2o25b2o83b2o36b2o25b2o83b
2o36b2o25b2o\$109bo149bo149bo149bo\$106b3o6b2o139b3o6b2o139b3o6b2o139b3o
6b2o\$106bo9bo139bo9bo139bo9bo139bo9bo\$113b3o147b3o147b3o147b3o\$113bo
56b2o91bo56b2o91bo56b2o91bo56b2o\$170bobo147bobo147bobo147bobo\$136b2o
34bo113b2o34bo113b2o34bo113b2o34bo\$136bo35b2o112bo35b2o112bo35b2o112bo
35b2o\$137b3o21b2o124b3o21b2o124b3o21b2o124b3o21b2o58b2o\$139bo21b2o126b
o21b2o126bo21b2o126bo21b2o58bobo\$673bo\$673b2o2\$152bo149bo149bo149bo\$
151bobo7bo139bobo7bo139bobo7bo139bobo7bo\$152bo6b3o140bo6b3o140bo6b3o
140bo6b3o\$140b2o16bo131b2o16bo131b2o16bo131b2o16bo46b2o\$141bo16b2o131b
o16b2o131bo16b2o131bo16b2o44bobo\$141bobo147bobo147bobo147bobo60bo25b2o
\$142b2o148b2o148b2o148b2o59b2o25bo\$661b2o15bobo\$661b2o15b2o12\$660b2o\$
659bobo\$659bo\$658b2o5\$676b2o\$676bobo\$651b2o25bo\$652bo25b2o\$652bobo15b
2o\$653b2o15b2o12\$671b2o\$671bobo\$673bo\$673b2o5\$655b2o\$654bobo\$654bo25b
2o\$653b2o25bo\$661b2o15bobo\$661b2o15b2o12\$660b2o\$659bobo\$659bo\$658b2o5\$
676b2o\$676bobo\$651b2o25bo\$652bo25b2o\$652bobo15b2o\$653b2o15b2o12\$671b2o
\$671bobo\$673bo\$673b2o5\$655b2o\$654bobo\$654bo25b2o\$653b2o25bo\$661b2o15bo
bo\$661b2o15b2o12\$660b2o\$659bobo\$659bo\$658b2o5\$676b2o\$676bobo\$651b2o25b
o\$652bo25b2o\$652bobo15b2o\$653b2o15b2o12\$671b2o\$671bobo\$673bo\$673b2o5\$
655b2o\$654bobo\$654bo25b2o\$653b2o25bo\$661b2o15bobo\$661b2o15b2o12\$660b2o
\$659bobo\$659bo\$658b2o5\$676b2o\$676bobo\$651b2o25bo\$652bo25b2o\$652bobo15b
2o\$653b2o15b2o12\$671b2o\$671bobo\$673bo\$673b2o5\$655b2o\$654bobo\$654bo25b
2o\$653b2o25bo\$661b2o15bobo\$661b2o15b2o12\$660b2o\$659bobo\$659bo\$658b2o5\$
676b2o\$676bobo\$651b2o25bo\$652bo25b2o\$652bobo15b2o\$653b2o15b2o12\$671b2o
\$671bobo\$673bo\$673b2o5\$655b2o\$654bobo\$654bo25b2o\$653b2o25bo\$661b2o15bo
bo\$661b2o15b2o2\$89b2o148b2o148b2o148b2o\$89bobo147bobo147bobo147bobo\$
73b2o16bo131b2o16bo131b2o16bo131b2o16bo\$74bo16b2o131bo16b2o131bo16b2o
131bo16b2o\$71b3o6bo140b3o6bo140b3o6bo140b3o6bo\$71bo7bobo139bo7bobo139b
o7bobo139bo7bobo\$80bo149bo149bo149bo4\$70b2o21bo126b2o21bo126b2o21bo
126b2o21bo116b2o\$70b2o21b3o124b2o21b3o124b2o21b3o124b2o21b3o113bobo\$
59b2o35bo112b2o35bo112b2o35bo112b2o35bo112bo\$60bo34b2o113bo34b2o113bo
34b2o113bo34b2o111b2o\$60bobo147bobo147bobo147bobo\$61b2o56bo91b2o56bo
91b2o56bo91b2o56bo\$117b3o147b3o147b3o147b3o\$116bo9bo139bo9bo139bo9bo
139bo9bo\$116b2o6b3o139b2o6b3o139b2o6b3o139b2o6b3o99b2o\$123bo149bo149bo
149bo102bobo\$58b2o25b2o36b2o83b2o25b2o36b2o83b2o25b2o36b2o83b2o25b2o
36b2o76b2o25bo\$59bo25b2o122bo25b2o122bo25b2o122bo25b2o115bo25b2o\$59bob
o147bobo147bobo147bobo140bobo15b2o\$60b2o148b2o148b2o148b2o141b2o15b2o
3\$73b2o148b2o148b2o148b2o\$73bobo6b2o139bobo6b2o139bobo6b2o139bobo6b2o\$
75bo6bo20b2o23bo96bo6bo20b2o23bo96bo6bo20b2o23bo96bo6bo20b2o23bo\$75b2o
6b3o18bo22bobo95b2o6b3o18bo22bobo95b2o6b3o18bo22bobo95b2o6b3o18bo22bob
o\$85bo15b3o8b2o14bo106bo15b3o8b2o14bo106bo15b3o8b2o14bo106bo15b3o8b2o
14bo\$101bo11bo137bo11bo137bo11bo137bo11bo\$110b3o147b3o147b3o147b3o\$
110bo149bo149bo149bo2\$71b2o18b2o32b2o94b2o18b2o32b2o94b2o18b2o32b2o94b
2o18b2o32b2o94b2o\$71bobo17bo33bobo93bobo17bo33bobo93bobo17bo33bobo93bo
bo17bo33bobo93bobo\$73bo18b3o32bo95bo18b3o32bo95bo18b3o32bo95bo18b3o32b
o95bo\$73b2o19bo32b2o94b2o19bo32b2o94b2o19bo32b2o94b2o19bo32b2o94b2o\$
111b2o148b2o148b2o148b2o\$110bobo147bobo147bobo147bobo\$110bo149bo149bo
149bo\$109b2o7b2o139b2o7b2o139b2o7b2o139b2o7b2o\$55b2o61b2o85b2o61b2o85b
2o61b2o85b2o61b2o85b2o\$54bobo147bobo147bobo147bobo147bobo\$54bo25b2o
122bo25b2o122bo25b2o122bo25b2o122bo25b2o\$53b2o25bo122b2o25bo122b2o25bo
122b2o25bo122b2o25bo\$61b2o15bobo130b2o15bobo130b2o15bobo130b2o15bobo
130b2o15bobo\$61b2o15b2o131b2o15b2o131b2o15b2o131b2o15b2o131b2o15b2o2\$
128b2o148b2o148b2o148b2o\$128bo149bo149bo149bo\$126bobo147bobo147bobo
147bobo\$126b2o148b2o148b2o148b2o5\$108b2o148b2o148b2o148b2o\$109bo149bo
149bo149bo\$60b2o7b3o37bobo98b2o47bobo98b2o47bobo98b2o47bobo98b2o\$59bob
o8bo39b2o97bobo48b2o97bobo48b2o97bobo48b2o97bobo\$59bo8b3o138bo149bo
149bo149bo\$58b2o148b2o148b2o148b2o148b2o5\$76b2o148b2o148b2o148b2o148b
2o\$76bobo147bobo147bobo147bobo147bobo\$78bo149bo149bo149bo149bo\$78b2o
148b2o148b2o148b2o148b2o2\$111b2o15b2o131b2o15b2o131b2o15b2o131b2o15b2o
\$111b2o15bobo130b2o15bobo130b2o15bobo130b2o15bobo\$103b2o25bo122b2o25bo
122b2o25bo122b2o25bo\$104bo25b2o122bo25b2o122bo25b2o122bo25b2o\$104bobo
147bobo147bobo147bobo\$105b2o111b2o35b2o111b2o35b2o111b2o35b2o111b2o\$
209b2o7b2o139b2o7b2o139b2o7b2o139b2o7b2o\$210bo149bo149bo149bo\$210bobo
147bobo147bobo147bobo\$211b2o148b2o148b2o148b2o\$123b2o69bo32b2o44b2o69b
o32b2o44b2o69bo32b2o44b2o69bo32b2o\$123bo68b3o32bo45bo68b3o32bo45bo68b
3o32bo45bo68b3o32bo\$121bobo44bo22bo33bobo43bobo44bo22bo33bobo43bobo44b
o22bo33bobo43bobo44bo22bo33bobo\$121b2o45b3o20b2o32b2o44b2o45b3o20b2o
32b2o44b2o45b3o20b2o32b2o44b2o45b3o20b2o32b2o\$171bo149bo149bo149bo\$
170b2o38bo109b2o38bo109b2o38bo109b2o38bo\$210b3o147b3o147b3o147b3o\$151b
o49bo11bo87bo49bo11bo87bo49bo11bo87bo49bo11bo\$135bo15b3o47b3o8b2o14bo
56bo15b3o47b3o8b2o14bo56bo15b3o47b3o8b2o14bo56bo15b3o47b3o8b2o14bo\$
125b2o6b3o18bo49bo22bobo45b2o6b3o18bo49bo22bobo45b2o6b3o18bo49bo22bobo
45b2o6b3o18bo49bo22bobo\$125bo6bo20b2o11b2o35b2o23bo46bo6bo20b2o11b2o
35b2o23bo46bo6bo20b2o11b2o35b2o23bo46bo6bo20b2o11b2o35b2o23bo\$123bobo
6b2o32b2o105bobo6b2o32b2o105bobo6b2o32b2o105bobo6b2o32b2o\$123b2o148b2o
148b2o148b2o3\$110b2o148b2o148b2o148b2o\$109bobo147bobo147bobo147bobo\$
109bo25b2o122bo25b2o122bo25b2o122bo25b2o\$108b2o25b2o86b2o33b2o25b2o86b
2o33b2o25b2o86b2o33b2o25b2o86b2o\$191b2o30bo117b2o30bo117b2o30bo117b2o
30bo\$178b2o11b2o23b2o6b3o101b2o11b2o23b2o6b3o101b2o11b2o23b2o6b3o101b
2o11b2o23b2o6b3o\$179bo36bo9bo102bo36bo9bo102bo36bo9bo102bo36bo9bo\$112b
2o62b3o38b3o42b2o62b3o38b3o42b2o62b3o38b3o42b2o62b3o38b3o\$111bobo62bo
42bo41bobo62bo42bo41bobo62bo42bo41bobo62bo42bo\$111bo16b2o131bo16b2o
131bo16b2o131bo16b2o\$110b2o16bo16b2o48b2o63b2o16bo16b2o48b2o63b2o16bo
16b2o48b2o63b2o16bo16b2o48b2o\$122bo6b3o14bo49bo75bo6b3o14bo49bo75bo6b
3o14bo49bo75bo6b3o14bo49bo\$121bobo7bo11b3o20b2o25b3o75bobo7bo11b3o20b
2o25b3o75bobo7bo11b3o20b2o25b3o75bobo7bo11b3o20b2o25b3o\$122bo20bo22bo
26bo78bo20bo22bo26bo78bo20bo22bo26bo78bo20bo22bo26bo\$167b3o147b3o147b
3o147b3o\$169bo149bo149bo149bo!
``````