Page 12 of 27
Re: Thread for your script-related questions
Posted: September 2nd, 2022, 1:08 am
by carsoncheng
GUYTU6J wrote: August 20th, 2022, 12:22 pm
Only the first result is correct, and the rest is for a different R+loaf collision. Their population sequence diverts at generation 18:
Code: Select all
x = 42, y = 16, rule = B3/S23
5b3o26b3o$4bo2bo25bo2bo$4b2o3bo23b2o3bo$7b3o26b3o$8bo28bo2$10bo28bo$4b
ob6o21bob6o$3bo8bo19bo8bo$4bo6bo21bo6bo$11bo28bo$8bobo26bobo$2bo28bo$b
obo26bobo$o2bo26bo2bo$b2o28b2o!
#C [[ STOP 18 ]]
So, how late should I choose the target pattern to avoid the false positive results?
Well, that explains the issue. As far as I know, popseq only checks for population matches for up to 16 generations, so any difference after that point is not being recorded. Therefore, if you're getting an unmanageable amount of false positives, advance your pattern by a few generations and try again.
Re: Thread for your script-related questions
Posted: December 13th, 2022, 8:04 pm
by C28
how does bellman find catalysts? like if i wanted to find a replacement catalyst for the block in this pattern:
Code: Select all
x = 12, y = 4, rule = B3/S23
9b3o$9b3o$2o6bobo$2o6b2o!
how would bellman go about finding one?
Re: Thread for your script-related questions
Posted: December 15th, 2022, 4:34 pm
by squareroot12621
Is there already an RLE→Plaintext converter? If not, I've made one:
Code: Select all
# RLE to Plaintext converter.
rle = input("Input a two-state RLE here.")
useful = [i for i in "".join([j for j in rle.replace("\r", "").split("\n") if j.replace(" ", "").replace("\t", "")[0] not in ["#", "x"]]).replace("o", " O ").replace("b", " . ").replace("$", " $ ").replace("!", "").replace(" ", " ").split(" ") if i != ""]
# Split RLE into lines______________________ # Remove lines starting with "#" or "x"_____________________ # Put whitespace around different "groups" and turn it into a Pseudo-Plaintext format in a list____________ # Remove empty characters
for k in range(len(useful)):
if len(useful[k].replace("O", ".").replace("$", ".").split(".")) == 1:
useful[k] = int(useful[k]) # Turn string-type numbers into integer-type numbers
plaintext_oneline = ""
for l in range(len(useful)):
if str(type(useful[l])) == "<class 'str'>":
if str(type(useful[max([l-1,0])])) == "<class 'str'>":
plaintext_oneline += useful[l]
else:
plaintext_oneline += useful[l-1] * useful[l]
plaintext_multiline = plaintext_oneline.split("$")
# Turning <number><character> into <character>, repeated <number> times
plaintext_length = len(max(plaintext_multiline))
for m in range(len(plaintext_multiline)):
plaintext_multiline[m] = plaintext_multiline[m] + (plaintext_length - len(plaintext_multiline[m]) + 1) * "."
# Adding .'s at the end of each line to make them the same length
plaintext = "\n".join(plaintext_multiline)
# Finally, joining the array together to create Plaintext format
print(plaintext)
Re: Thread for your script-related questions
Posted: December 15th, 2022, 5:08 pm
by Book
Re: Thread for your script-related questions
Posted: December 17th, 2022, 10:35 pm
by bibunsekibun
Does a script exist to discover the parent of a given pattern?
Re: Thread for your script-related questions
Posted: December 18th, 2022, 1:47 pm
by Book
bibunsekibun wrote: December 17th, 2022, 10:35 pm
Does a script exist to discover the parent of a given pattern?
A pattern can have many parents. Some, infinitely many.
Re: Thread for your script-related questions
Posted: December 18th, 2022, 2:26 pm
by silversmith
bibunsekibun wrote: December 17th, 2022, 10:35 pm
Does a script exist to discover the parent of a given pattern?
Logic Life Search is a program which can do that, although it is not a simple golly script.
Re: Thread for your script-related questions
Posted: January 3rd, 2023, 8:41 pm
by bibunsekibun
I downloaded synthesis-patt, but it doesn't finish "Decompressing rles.txt.bz2...". How do I fix this?
Re: Thread for your script-related questions
Posted: January 25th, 2023, 8:57 am
by shuich01
Does an algorithm that can detect a spaceship's exitance in certain width instead of "really" searching for spaceships exist?
Re: Thread for your script-related questions
Posted: January 26th, 2023, 8:45 am
by pzq_alex
shuich01 wrote: January 25th, 2023, 8:57 am
Does an algorithm that can detect a spaceship's exitance in certain width instead of "really" searching for spaceships exist?
tl;dr: no.
Most spaceship search algorithms represents the actual spaceship as a path in a certain graph and preforms a search on that graph. It's hard to say there isn't a path on the graph until you've seen everything that's reachable from the starting point!
Re: Thread for your script-related questions
Posted: February 11th, 2023, 4:17 am
by LaundryPizza03
Is it possible to import an external module such as
NumPy into a Golly script?
Re: Thread for your script-related questions
Posted: February 11th, 2023, 10:34 am
by dvgrn
LaundryPizza03 wrote: February 11th, 2023, 4:17 am
Is it possible to import an external module such as
NumPy into a Golly script?
Sure -- just have to install whatever you want, probably with "pip install".
Install into the copy of Python that Golly is actually pointed to. Given all the horrible user-directory locations that different copies of Python can be installed to these days, pulling up the right command prompt to run "pip install" can sometimes be the tricky part.
Re: Thread for your script-related questions
Posted: February 12th, 2023, 2:18 pm
by LaundryPizza03
dvgrn wrote: February 11th, 2023, 10:34 am
LaundryPizza03 wrote: February 11th, 2023, 4:17 am
Is it possible to import an external module such as
NumPy into a Golly script?
Sure -- just have to install whatever you want, probably with "pip install".
Install into the copy of Python that Golly is actually pointed to. Given all the horrible user-directory locations that different copies of Python can be installed to these days, pulling up the right command prompt to run "pip install" can sometimes be the tricky part.
How do I determine which Python directory is used by Golly on my system?
Re: Thread for your script-related questions
Posted: February 12th, 2023, 11:10 pm
by dvgrn
LaundryPizza03 wrote: February 12th, 2023, 2:18 pm
How do I determine which Python directory is used by Golly on my system?
Is this on Windows? The general idea is to check GollyPrefs for a line that looks like
If that line has a full path,
C:\blah\blah\blah\python39.dll, then that's the version you're looking for.
If it just says "python39.dll" as above, then Golly is relying on the Python DLL's location being included in the system PATH variable. Search in Start bar for "Advanced system settings", click on "Environment variables", look under "System variables" for PATH. On my system it looks like this, just as an example:
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\PowerShell7\7\;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Oracle\EPM Automate\bin;C:\Python39\Scripts;C:\Python39;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files (x86)\dotnet-core-uninstall\
Re: Thread for your script-related questions
Posted: February 13th, 2023, 2:38 am
by LaundryPizza03
dvgrn wrote: February 12th, 2023, 11:10 pm
LaundryPizza03 wrote: February 12th, 2023, 2:18 pm
How do I determine which Python directory is used by Golly on my system?
Is this on Windows? The general idea is to check GollyPrefs for a line that looks like
If that line has a full path,
C:\blah\blah\blah\python39.dll, then that's the version you're looking for.
If it just says "python39.dll" as above, then Golly is relying on the Python DLL's location being included in the system PATH variable. Search in Start bar for "Advanced system settings", click on "Environment variables", look under "System variables" for PATH. On my system it looks like this, just as an example:
C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\PowerShell7\7\;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Oracle\EPM Automate\bin;C:\Python39\Scripts;C:\Python39;C:\Program Files\PuTTY\;C:\Program Files\Git\cmd;C:\Program Files (x86)\dotnet-core-uninstall\
No, I am using the macOS version. 12.5.1, to be specific.
Re: Thread for your script-related questions
Posted: February 13th, 2023, 10:11 am
by dvgrn
LaundryPizza03 wrote: February 13th, 2023, 2:38 am
No, I am using the macOS version. 12.5.1, to be specific.
Got it. Hopefully somebody with a Mac can give you Mac-specific details -- I'd probably only lead you astray, since I only have available the same Google search results that you do.
However, the first part about looking for the "python3_lib=" line in your GollyPrefs is equally true for any platform. Now, the GollyPrefs can be in a couple different locations, one location overriding the other. By default it's in Golly's data directory, which on a Mac should be
~/Library/Application Support/Golly/
but if you put a copy of the GollyPrefs file in the same folder as Golly.app, then it won't look in the ~/Library location. This is a potentially confusing feature that makes perfect sense if you always follow the exact recommended instructions for doing an upgrade to a new version of Golly, automatically keeping your old favorite settings from the previous version -- but nobody (myself included) ever does seem to follow those instructions.
Re: Thread for your script-related questions
Posted: March 9th, 2023, 6:10 pm
by Anivec
Is there a script for finding 2c/4 flyby reactions?
Re: Thread for your script-related questions
Posted: April 7th, 2023, 11:45 pm
by PHPBB12345
How to convert Golly's Lua script from/to
Glu's Lua script?
Re: Thread for your script-related questions
Posted: August 31st, 2023, 2:19 am
by Haycat2009
What are the list of bespoke constructions in Slmake?
Re: Thread for your script-related questions
Posted: August 31st, 2023, 2:45 am
by confocaloid
Haycat2009 wrote: August 31st, 2023, 2:19 am
What are the list of bespoke constructions in Slmake?
I think it is here:
https://gitlab.com/apgoucher/slmake/-/t ... type=heads
Re: Thread for your script-related questions
Posted: September 2nd, 2023, 3:22 pm
by MEisSCAMMER
I'm trying to configure apgluxe so that it automatically calls it with my payosha256 key, which I keep forgetting to add manually. How do I go about this?
edit: solved (on mac) by staring at the recompile script a lot and finding a useful-looking command, then creating "apgsearch.sh":
Re: Thread for your script-related questions
Posted: September 2nd, 2023, 6:54 pm
by dvgrn
MEisSCAMMER wrote: September 2nd, 2023, 3:22 pm
I'm trying to configure apgluxe so that it automatically calls it with my payosha256 key, which I keep forgetting to add manually. How do I go about this?
Put your preferred call into a batch file, maybe, then always initiate apgsearch via the batch file?
Re: Thread for your script-related questions
Posted: October 19th, 2023, 8:36 pm
by DaveTree339
How does one get "import golly as g" to work in python?
I have golly 4.2 64 bit and python 3.11.0 64 installed and the golly scripts like pop-plot work just fine but this is what happens when I put in "import golly as g" in python:
>>> import golly as g
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'golly'
>>>
I tried to find answers just by searching the forums and discord but I didn't find any so I'm clueless as to how to proceed with importing the golly module since the function that's supposed to do it isn't working for a reason I can't figure out.
Re: Thread for your script-related questions
Posted: October 19th, 2023, 9:50 pm
by dvgrn
DaveTree339 wrote: October 19th, 2023, 8:36 pm
How does one get "import golly as g" to work in python?
The "import golly as g" line only works for Python scripts run from Golly (while Golly is open). Otherwise the relevant pieces of Golly functionality won't be available.
Re: Thread for your script-related questions
Posted: October 19th, 2023, 10:13 pm
by DaveTree339
Ok, I do not understand what you mean. I'm trying to follow this tutorial:
https://conwaylife.com/wiki/Tutorials/Y ... hon_script
Are you saying I have to somehow write the script in golly so that the script runs from golly?
The tutorial mentions a python ide window but doesn't elaborate on what it is, I assumed it was just the python window if that's the right name for it.