gameoflifemaniac wrote:Where's the rule table? It's not in AA.zip.
The Larger than Life rules require a neighborhood size that Golly rule tables don't support. See the
Larger than Life rule syntax from MCell.
If someone wanted to get very basic Golly support for Larger than Life rules, it would be easy enough to write a slow and simple Lua script to simulate Larger than Life rules copied to the clipboard. Might be kind of fun to finally see Bosco, and Dean Hickerson's 90-degree-turning version, do their dances in Golly after all these years.
Brian mentioned "Bosco" in a
recent post. Here's a copy, assuming I've resuscitated this strange beast correctly -- I haven't tried running it in SquareCell yet:
Code: Select all
#N Bosco
#O Kellie Evans
#C A period 166 180-degree reflectorless rotating oscillator
#C in the Larger than Life "Bugs" rule
x = 11, y = 11, rule = R5,C0,M1, S34..58, B34..45,NM
4b4o$3b6o$b5obboo$5o4boo$4o5boo$4o4b3o$5obb3o$b9o$3b6o$3b6o$4b4o!
To bring Bosco to life you have to count all the neighbors in a 11x11 square around each cell. For Dean Hickerson's more widely traveled 90-degree-turning critter, it's a 15x15 square.
That doesn't have to be quite as calculation-intensive as it sounds -- I can think of a couple of obvious mathematical shortcuts, and no doubt there are some unobvious bit-twiddling ones.
I'm afraid it would be tricky to invent a HashLife variant algorithm that could handle Larger than Life rules, though. One of HashLife's basic assumptions -- the speed of light being one cell per tick -- just plain isn't true in Larger than Life. The speed of light changes with the rule, all the way up to ten cells per tick.
EDIT: In case anyone wants to see Bosco in action in Golly, here's a Python script running the Bugs rule. It wouldn't work well at all for multiple copies of Bosco, but as long as there's just one it does kind of okay. The script could be made to run much faster, but not in the fifteen minutes I gave myself to write this...!
Code: Select all
# Bosco_in_Bugs.py
# painfully slow Larger than Life Bugs rule simulator
# (pretty much only works for small single patterns like Bosco...)
import golly as g
g.addlayer()
g.new("Bosco")
g.putcells(g.parse("4b2o$2b6o$b3o3b2o$4o4bo$4o4b2o$4o2bob2o$9o$b8o$2b6o$3b5o!"))
if g.numstates()>2: g.exit("Please switch to a two-state rule.")
while 1:
rmin=g.getrect()
r=[rmin[0]-5,rmin[1]-5,rmin[2]+10,rmin[3]+10]
newlist=[]
for j in range(r[1],r[1]+r[3]):
for i in range(r[0],r[0]+r[2]):
count=0
for y in range(-5,6):
for x in range(-5,6):
count+=g.getcell(i+x,j+y)
# for now, just hard-code the Bugs rule
# (we'll generalize later)
# (and speed things up a lot)
# Bugs rule = R5,C0,M1, S34..58, B34..45,NM
if g.getcell(i,j)==1:
if count<34 or count>58: newlist+=[i,j,0]
else:
if count>=34 and count<=45: newlist+=[i,j,1]
if len(newlist)%2==0: newlist+=[0]
g.putcells(newlist,0,0,1,0,0,1,"copy") # use copy mode so the state-0 cells overwrite state-1 cells
g.setgen("+1")
g.update()
A couple of Dean Hickerson's wondrous beasts:
Code: Select all
# WondrousBeasts.py
# painfully slow Larger than Life rule simulator
# (pretty much only works for patterns with reliably limited bounding boxes..)
import golly as g
g.addlayer()
g.new("WondrousBeasts")
g.putcells(g.parse("""32b4o$30b7o$29b10o$28b12o$28b13o$27b3o5b6o$5b3o19b3o5b6o$3b7o17b3o5b6o
$2b9o16b3o5b6o$b12o15b3o2b8o$b13o14b12o$5o3b6o15b10o$2o7b5o16b7o$2o7b
5o18b3o$3o5b6o$3o2b9o$b3ob8o$2b10o$3b7o$4b5o!"""))
if g.numstates()>2: g.exit("Please switch to a two-state rule.")
while 1:
rmin=g.getrect()
r=[rmin[0]-5,rmin[1]-5,rmin[2]+10,rmin[3]+10]
newlist=[]
for j in range(r[1],r[1]+r[3]):
for i in range(r[0],r[0]+r[2]):
count=0
for y in range(-7,8):
for x in range(-7,8):
count+=g.getcell(i+x,j+y)
# for now, just hard-code the Wondrous Beasts rule
# (we'll generalize later)
# (and speed things up a lot)
# rule = R7,C0,M1,S65..114,B65..95,NM
if g.getcell(i,j)==1:
if count<65 or count>114: newlist+=[i,j,0]
else:
if count>=65 and count<=95: newlist+=[i,j,1]
if len(newlist)%2==0: newlist+=[0]
g.putcells(newlist,0,0,1,0,0,1,"copy") # use copy mode so the state-0 cells overwrite state-1 cells
g.setgen("+1")
g.update()
I'm pretty much only posting this second version to encourage someone to write a new Golly simulator script that can run Larger than Life at a reasonable speed -- this one is really embarrassingly slow...!