ConwayLife.com - A community for Conway's Game of Life and related cellular automata
Home  •  LifeWiki  •  Forums  •  Download Golly

Infinite Soup Explorer

A forum where anything goes. Introduce yourselves to other members of the forums, discuss how your name evolves when written out in the Game of Life, or just tell us how you found it. This is the forum for "non-academic" content.

Infinite Soup Explorer

Postby fluffykitty » March 9th, 2018, 10:56 pm

So I made a script that generates a section of an infinite soup and a rule that allows you to view a guaranteed-correct window into the soup.

Not a Golly script, will convert it upon request.
import random
from sys import argv
def box(x0=-32,y0=-32,dx=64,dy=64,fill=50,liveout=False):
    def generate(x,y):
        random.seed(x+y**3-x**2+x*y) # for some reason seed=y**3-3*(y+n) behaves strangely
        return random.random()
    def rleappend(c):
        nonlocal out,rep,char
        if c==char:
            rep+=1
            return
        elif rep!=0:
            if rep==1:
                rep=""
            if liveout:
                print(end=str(rep)+char)
            else:
                out+=str(rep)+char
        rep=1
        char=c
    out="x="+str(dx)+",y="+str(dy)+",rule=Confusion0\n"
    if liveout:
        print(out)
    rep=0
    char=""
    for y in range(x0,x0+dx):
        for x in range(y0,y0+dy):
            if generate(x,y)>(fill/100):
                rleappend("A")
            else:
                rleappend("B")
        rleappend("$")
    rleappend("!")
    rleappend("")
    return out
def parse(x):
    if "." in x:
        return float(x)
    else:
        return int(x)
if len(argv)<=1:
    print("Interactive mode, input space separated values.\nArguments are topleft x, topleft y, box size x, box size y, and fill %.\nYou can use = to assign arguments, ie fill=25 gives 25% fill.")
    while 1:
        x=input(">").replace("%","").split(" ")
        y=[]
        z={}
        for i in x:
            if i=="":
                continue
            if "=" in i:
                t=i.split("=")
                z[t[0]]=parse(t[1])
            else:
                y.append(parse(i))
        print(box(*y,**z))
else:
    box(*map(parse,argv[1:]),liveout=True)

@RULE Confusion0
0 unknown
1 dead
2 alive
@TABLE
n_states:3
neighborhood:Moore
symmetries:permute
var a1={0,1,2}
var a2=a1
var a3=a1
var a4=a1
var a5=a1
var a6=a1
var a7=a1
var a8=a1
var a9=a1
1,a1,a2,1,1,1,1,1,1,1
1,2,2,2,1,1,1,1,1,2
1,2,2,2,2,a1,a2,a3,a4,1
2,a1,1,1,1,1,1,1,1,1
2,2,2,a1,1,1,1,1,1,2
2,2,2,2,2,a1,a2,a3,a4,1
a1,0,a2,a3,a4,a5,a6,a7,a8,0
@COLORS
0 0 0 0
1 48 48 48
2 255 255 255

There's an LWSS at -56,-70 at tick 220. Can you find any other cool patterns?
Edit: Pre-pulsar at -202 55 tick 185. By the time it grows into a pulsar though it's already fatally damaged. Another one is at 46 -142 tick 200, but this one is already dead. Another one is at -225 340 tick 105. It's also doomed. A queen bee at -311 132 tick 79.
I like making rules
fluffykitty
 
Posts: 334
Joined: June 14th, 2014, 5:03 pm

Return to The Sandbox

Who is online

Users browsing this forum: No registered users and 2 guests