Making a python version of Gfind
-
- Posts: 318
- Joined: January 24th, 2018, 4:36 pm
- Location: The hertzsprung gap
Making a python version of Gfind
I would like to make a python version of Gfind so that people can run gfind without using a c compiler.
The source code can be found here.
The Paper describing how it works can be found here.
I think we should write pseudocode and then I can port it to python.
The source code can be found here.
The Paper describing how it works can be found here.
I think we should write pseudocode and then I can port it to python.
Look at me! I make patterns in golly and go on the forums! I wanna be Famous!
Re: Making a python version of Gfind
I suspect that this program would run very slowly, because Python is generally slower than C (being an interpreted language rather than a compiled one).
I got away with writing LLS in Python because all the actual work is done by the SAT solver; which is written in C.
I got away with writing LLS in Python because all the actual work is done by the SAT solver; which is written in C.
-
- Posts: 318
- Joined: January 24th, 2018, 4:36 pm
- Location: The hertzsprung gap
Re: Making a python version of Gfind
Yes, but this would be easier to use. No installing Cygwin, just using golly.
Look at me! I make patterns in golly and go on the forums! I wanna be Famous!
Re: Making a python version of Gfind
"Just using Golly" in this case would technically also involve installing Python. These days a script most likely to Just Work for everybody should really be written in Lua instead.googleplex wrote:Yes, but this would be easier to use. No installing Cygwin, just using golly.
This has always been a difficult dividing line -- basically between people who think that compiling these C/C++ search utilities is trivial, and those who find it to be a very high and mysterious barrier.
As Macbi mentions, the problem is that a Lua or Python script will be only maybe one-tenth as fast as the equivalent compiled C code. What this seems to mean in practice is that for anything interesting that can be found by running a hypothetical gfind script, the odds are very high that it has already been found long ago by someone running a compiled executable.
Given the size and complexity of the gfind utility, it doesn't seem as if any possible pseudocode is likely to end up being any easier to understand -- or less buggy -- than the C code that already exists. Might as well start porting to Python or Lua right away, if that still seems like a good idea.googleplex wrote:...I think we should write pseudocode and then I can port it to python.
Re: Making a python version of Gfind
As one of the very few people with an in-depth understanding of the gfind source code, I can say that this would be a lot of work, and probably not worth the effort.
I would rather help guide people through installing a c compiler. There are other utilities besides gfind that are written in c (e.g. knight2, knightt, zfind, qfind). Learning to compile c programs will allow users to make use of a much broader spectrum of search programs.
I would rather help guide people through installing a c compiler. There are other utilities besides gfind that are written in c (e.g. knight2, knightt, zfind, qfind). Learning to compile c programs will allow users to make use of a much broader spectrum of search programs.
-Matthias Merzenich
-
- Posts: 1334
- Joined: July 1st, 2016, 3:58 pm
Re: Making a python version of Gfind
Is it possible that this idea could be adapted to search for ships in LTL? There are no spaceship searching scripts for LTL that don't involve soup searching, and it would be cool to see one that implemented similar methods to the "find" programs. Golly might help, as it has LTL built in.
I manage the 5S project, which collects all known spaceship speeds in Isotropic Non-totalistic rules. I also wrote EPE, a tool for searching in the INT rulespace.
Things to work on:
- Find (7,1)c/8 and 9c/10 ships in non-B0 INT.
- EPE improvements.
Things to work on:
- Find (7,1)c/8 and 9c/10 ships in non-B0 INT.
- EPE improvements.
Re: Making a python version of Gfind
Dev C++ portable compiles gfind and gfind-pt easily in Windows. No installation required.