I'm bored and my current Python script has one major glitch I can't seem to fix so I need some ideas for python scripts to make. Criteria:
-Must be simple
-NOT a spaceship search program
-Is doable
-Does not require the separation of objects (I don't know how to do this yet)
-Does not require the detection of stabilizing in rules with gliders (the gliders get in the way)
-Must be suitable for an amateur programmer
Python script ideas needed
Re: Python script ideas needed
Would you consider branching out into Lua? There are all kinds of things to be tried with the Golly 2.9 beta's new overlay functionality. Check out the new buttons, checkboxes and sliders in pop-plot.lua, for example. Some more controls will need to be invented, but eventually it should be possible to make better GUI front ends for various search utilities.Saka wrote:I'm bored and my current Python script has one major glitch I can't seem to fix so I need some ideas for python scripts to make...
Maybe that's a bit ambitious for just starting out with Lua, but check out overlay-demo.lua -- see if any of the samples give you ideas for things to experiment with.
Seems to me we probably need to add a button in overlay-demo.lua to show how to use the "cellview" options to create animations of actual patterns, as opposed to the completely non-pattern-related animations we have so far. Oddly enough, there's not a single "cellview" in the current overlay-demo.lua; even the glider in the "Animation" demo is animated frame by frame with no use of Golly's simulation abilities (!). Here's a sample use of cellview that I put together yesterday.
If you want to stick with Python, I've been thinking that there should be a few more tools that ship with Golly, to do things like change cell states in some organized way. I have one named "ToChangeColors.py", that expects you to pick a drawing color, then click on a cell in the current selection, and it will change all the cells of the clicked color to the current drawing color. That lets you get rid of all blue history cells in LifeHistory by changing them to state 0, for example, or mark all state-1 cells in a selection by changing them to state 3 or state 4.
What other tools along those lines would be useful to have as part of Golly's standard toolkit? Think of something that you wish Golly had available, and then implement it.
Alternatively, maybe code something from your list in Python? A nice simple Python and/or Lua function can be written for a lot of those -- and then they might get included in the glife or gplus packages in some cases. It's unlikely that they'd be added to the list of native Golly script functions, unless the function has to do something that Python and Lua really can't do without a change to Golly's codebase.
Re: Python script ideas needed
Yes! I will make a "LifePlus" module that does the things I suggest! Awesome! Tomorrow!
Re: Python script ideas needed
We do now!dvgrn wrote:Seems to me we probably need to add a button in overlay-demo.lua to show how to use the "cellview" options to create animations of actual patterns
LifeViewer https://lazyslug.com/lifeviewer
Re: Python script ideas needed
From Script request thread, admitting that I'm absolutely useless with both Python and C
Script that calculates a number of gliders to be fired at a selected pattern to yield a non-zero number of spaceships, no static ash (so 0 still lifes, 0 oscillators... only spaceships)
If possible, it would be great if the script allowed non-CGoL rules with gliders to be explored too.
Script that calculates a number of gliders to be fired at a selected pattern to yield a non-zero number of spaceships, no static ash (so 0 still lifes, 0 oscillators... only spaceships)
If possible, it would be great if the script allowed non-CGoL rules with gliders to be explored too.
Re: Python script ideas needed
I've put my oar in about this request before, but here's another attempt:Rhombic wrote:Script that calculates a number of gliders to be fired at a selected pattern to yield a non-zero number of spaceships, no static ash (so 0 still lifes, 0 oscillators... only spaceships)
If the request is "find the minimum number of gliders..." then it's technically possible to write such a script, but for most target objects you might run it for years/decades/centuries before getting a definite answer.
If the request is "find a not necessarily minimal number of gliders..." then such a program has already been written, several times, most recently as a compiled C utility (simeks' GoL_destroy) (but that adds more objects to the pattern in question). There was another recent project that tried all possible single gliders on a pattern, and chose the result that reduced the population the most. I'll find the link eventually, if no one else does...
EDIT: Here it is.
If the request is somewhere between those two, such that GoL_destroy and Andrew Wade's Gemini-destroying search script are not good enough, then please be more specific. Presumably you want to exclude the following two cases:
1) Find gliders that destroy the pattern completely, then add another glider that doesn't interact with the destruction at all;
2) Find gliders that destroy the pattern almost completely but leave a glider turner (like a boat) or a spaceship seed of your choice -- then fire a final glider at the turner or seed.