My programs/scripts

For scripts to aid with computation or simulation in cellular automata.
Post Reply
User avatar
Saka
Posts: 3627
Joined: June 19th, 2015, 8:50 pm
Location: Indonesia
Contact:

My programs/scripts

Post by Saka » December 18th, 2016, 10:11 am

Hello Guys,
I'm currently learning C but I can do Python pretty well (Well at least for Life programs/tools), so I would like to share some random scripts I have.
First off is very useful, but very simple, it converts the selection into a cell list:

Code: Select all

#Converts selection into cell list
#Final.
#Selection --> CL
#Developed over 5 seconds by Saka

import golly as g
g.setclipstr(str(g.getcells(g.getselrect())))
Next is a bit of a surprise, I'm still working on it, here's a snippet from the comments:

Code: Select all

#Python version of XXXXX's XXXX
#Searches for XXXXX in gliderles rules
#Not designed for walled cities (Use the original XXXX instead)
#Designed for smaller XXXX (10x10 or less)
Can you guess what it is?
Next is a Windows version of Gfind, a console, to be specific, it is in the attachments. I just added some stuff at the end to keep it from closing and messed with the banner text.
Gfind-Win.zip
Gfind console for Windows, this is a standalone EXE
(19.61 KiB) Downloaded 209 times

User avatar
Saka
Posts: 3627
Joined: June 19th, 2015, 8:50 pm
Location: Indonesia
Contact:

Re: My programs/scripts

Post by Saka » December 19th, 2016, 3:16 am

Here's a little function that devolves

Code: Select all

def devolve(numgens):
    curgen = int(g.getgen())
    if curgen == 0:
        g.exit("Can't devolve at generation 0")
    elif curgen == 1:
        g.reset()
    else:
        g.reset()
        g.run(curgen - int(numgens))

Post Reply