Majestas32 wrote:@gameoflifemaniac
I don't know much python but try replacing ~= with ==
That's Lua, not Python, but the point is certainly valid. Stopping after 16 ticks is what the code is currently telling Golly to do. There's another subtle problem, which will come up if you start running a pattern at a generation count that isn't a multiple of 16, or change the multiple or the target value so that the latter isn't an exact multiple of the former.
It's not a problem as it stands, but when you notice that 50,000 is way too big and cut the number down to 5000, unless you use
tonumber(g.getgen())>= 5000 you could go right past your stopping point without ever actually stopping.
You'll need
tonumber(g.getgen()), or
int(g.getgen()) in Python, to avoid another problem: getgen() returns the current generation count as a string, not an integer, so the comparison won't work as it's written.
The original problem could have been that you need to call g.update() optionally preceded by g.fit() every time you want to see what a script is doing while it's running. See the Lua or Python help for update(), and/or autoupdate() if you want to change that behavior.
A tiny technical issue: I think there's not much point in calling g.reset() if you're just going to call g.new() immediately afterward anyway.
Code: Select all
local g = golly()
g.setrule("B3/S23")
g.new("untitled")
g.select({0,0,16,16})
g.randfill(50)
while( true ) do
g.run(16)
g.fit()
g.update()
if tonumber(g.getgen()) >= 1600
then
break
end
end
... This is still going to be pretty irritating to run, though. If you want to find soups with *WSS outputs, here's a way to write a script that will do it much quicker:
1) Use the above code to make a soup.
2) Run it 50,000 ticks, but don't worry about watching it.
3) Find the bounding box -- g.getrect() -- and calculate left, right, top, and bottom edges L, R, T, B.
4) Run another 4 ticks.
5) Check the bounding box again. If any (or all) of the new L/R/T/B values are different from the previous ones by two cells, then
A) you've found a soup that makes an *WSS, or
B) (too unlikely to worry about) you've found something hugely more interesting than a *WSS.