My programs/scripts

For scripts to aid with computation or simulation in cellular automata.
Post Reply
User avatar
Saka
Posts: 3413
Joined: June 19th, 2015, 8:50 pm
Location: In the kingdom of Sultan Hamengkubuwono X
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 105 times

Code: Select all

o3b2ob2obo3b2o2b2o$bo3b2obob3o3bo2bo$2bo2b3o5b3ob4o$3o3bo2bo2b3o3b3o$
4bo4bobo4bo$2o2b2o2b4obo2bo3bo$2ob4o3bo2bo2bo2bo$b2o3bobob2o$3bobobo5b
obobobo$3bobobob2o3bo2bobo!
(Check gen 3)
Add your computer to the Table of Lifeenthusiast Computers!

User avatar
Saka
Posts: 3413
Joined: June 19th, 2015, 8:50 pm
Location: In the kingdom of Sultan Hamengkubuwono X
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))

Code: Select all

o3b2ob2obo3b2o2b2o$bo3b2obob3o3bo2bo$2bo2b3o5b3ob4o$3o3bo2bo2b3o3b3o$
4bo4bobo4bo$2o2b2o2b4obo2bo3bo$2ob4o3bo2bo2bo2bo$b2o3bobob2o$3bobobo5b
obobobo$3bobobob2o3bo2bobo!
(Check gen 3)
Add your computer to the Table of Lifeenthusiast Computers!

Post Reply