Page 1 of 1

A strange method of soup-searching

Posted: February 28th, 2019, 5:14 pm
by googoIpIex
So I was wondering what would happen if you repeatedly filled the same, per se, 20x20 square every time the pattern settled down. however, I am not good at python and cannot make a script to do it, so I am fairly sure there's some easy way to do it, but I am not sure how.

Re: A strange method of soup-searching

Posted: March 1st, 2019, 12:54 pm
by pcallahan
googoIpIex wrote:So I was wondering what would happen if you repeatedly filled the same, per se, 20x20 square every time the pattern settled down. however, I am not good at python and cannot make a script to do it, so I am fairly sure there's some easy way to do it, but I am not sure how.
I had a similar idea in the early 90s and I am sure others have. It sounds like you are looking for some kind of fixed point in which the settled pattern works as a catalyst. I never had much luck with that, but it may be worth exploring with more modern tools and faster computers. Sorry, I can't help with the scripting, but I am curious to hear other replies.

One thing I would recommend is that you don't fill a 20x20 square every time but start with something smaller.

Re: A strange method of soup-searching

Posted: March 1st, 2019, 4:59 pm
by googoIpIex
pcallahan wrote:
googoIpIex wrote:So I was wondering what would happen if you repeatedly filled the same, per se, 20x20 square every time the pattern settled down. however, I am not good at python and cannot make a script to do it, so I am fairly sure there's some easy way to do it, but I am not sure how.
I had a similar idea in the early 90s and I am sure others have. It sounds like you are looking for some kind of fixed point in which the settled pattern works as a catalyst. I never had much luck with that, but it may be worth exploring with more modern tools and faster computers. Sorry, I can't help with the scripting, but I am curious to hear other replies.

One thing I would recommend is that you don't fill a 20x20 square every time but start with something smaller.
Maybe have the area it fills be one cell larger each time, starting with a 3x3 square?

Re: A strange method of soup-searching

Posted: March 2nd, 2019, 12:22 am
by wildmyron
googoIpIex wrote:So I was wondering what would happen if you repeatedly filled the same, per se, 20x20 square every time the pattern settled down. however, I am not good at python and cannot make a script to do it, so I am fairly sure there's some easy way to do it, but I am not sure how.
I wrote a script based on a similar idea but randomising the small bounding box every generation rather than when the pattern has stabilised. It's here: http://conwaylife.com/forums/viewtopic. ... 839#p31839
It wouldn't be too hard to use apgsearch's naivestab to in between randomising, but how to do it really depends on what you want to achieve. Do you just want to watch cgol evolve and automatically have activity reintroduced whenever it dies down, or do you need greater efficiency to answer a bigger question about long term behaviour?

Re: A strange method of soup-searching

Posted: March 2nd, 2019, 12:36 am
by googoIpIex
wildmyron wrote:
googoIpIex wrote:So I was wondering what would happen if you repeatedly filled the same, per se, 20x20 square every time the pattern settled down. however, I am not good at python and cannot make a script to do it, so I am fairly sure there's some easy way to do it, but I am not sure how.
I wrote a script based on a similar idea but randomising the small bounding box every generation rather than when the pattern has stabilised. It's here: http://conwaylife.com/forums/viewtopic. ... 839#p31839
It wouldn't be too hard to use apgsearch's naivestab to in between randomising, but how to do it really depends on what you want to achieve. Do you just want to watch cgol evolve and automatically have activity reintroduced whenever it dies down, or do you need greater efficiency to answer a bigger question about long term behaviour?
The 1st one.

Re: A strange method of soup-searching

Posted: March 2nd, 2019, 1:02 pm
by wildmyron
This script should do what you are looking for. It only uses a fixed size area to introduce randomness into the world but you can adjust it by changing width and height. You can also adjust the delay which is there because i think it makes the soup evolution a bit more enjoyable. Set to 0 to run faster.

Code: Select all

# active_soup.py
import golly as g
from time import time

width = 4
height = 4
rect = [0, 0, width, height]
ii = 0
delay = 0.005

# Stabilisation detection based on naivestab() from apgsearch by Adam P Goucher
# Tests for population periodicity:
def naivestab():
    length = 1000
    security = 3
    period = 24
    depth = 0
    prevpop = 0
    for i in xrange(length):
        for k in xrange(period):
            t1 = time()
            while (time() < t1 + delay):
                pass
            g.run(1)
            g.update()
        currpop = int(g.getpop())
        if (currpop == prevpop):
            depth += 1
        else:
            depth = 0
        prevpop = currpop
        if (depth == security):
            # Population is periodic.
            return True

    return False

g.show("Press 'Esc' to stop the fountain.")
g.new("")
while True:
    g.select(rect)
    # p = 10 * random.randint(3,8)
    p = 50
    g.randfill(p)
    g.select([])
    g.update()
    naivestab()