1D range-4 B3/S23

For discussion of other cellular automata.
User avatar
testitemqlstudop
Posts: 1367
Joined: July 21st, 2016, 11:45 am
Location: in catagolue
Contact:

1D range-4 B3/S23

Post by testitemqlstudop » March 19th, 2019, 8:13 am

If this has been already posted, please pardon my ignorance!

Instead of the conventional Moore neighborhood in CGoL, the neighborhood of a cell is the four cells to the left of it and the four cells to the right of it (the original cell does not count.)

Code: Select all

x = 9, y = 1, rule = LifeHistory
4DA4D!
Nearly all soups settle in 30 generations, mostly into nothing.

There are two basic still lives and infinitely many variants:

Code: Select all

oo..oo

o..ooo...ooo..o
There exist p2, p3, and p6 oscillators.

Is there a Golly ruletable to simulate this?

Currently, no spaceships or other period oscillators are known, but you might find one with this C++ script:

MOST RECENT VERSION:

http://conwaylife.com/forums/viewtopic. ... 528#p73528

("Interesting" soups - soups that haven't settled into p1 or p3 after 30 generations - are sent to standard output and another file.)

Some soups might be false positives, just extremely long lasting sparks. However, these are most likely very rare; they are rarer than 1 in 15 million soups.
Last edited by testitemqlstudop on March 20th, 2019, 10:45 pm, edited 5 times in total.

User avatar
Macbi
Posts: 903
Joined: March 29th, 2009, 4:58 am

Re: 1D range-4 B3/S23

Post by Macbi » March 19th, 2019, 9:29 am

I've looked at this before and never managed to find the p3. Well done on finding the first non-stil-life!

User avatar
Hdjensofjfnen
Posts: 1743
Joined: March 15th, 2016, 6:41 pm
Location: re^jθ

Re: 1D range-4 B3/S23

Post by Hdjensofjfnen » March 19th, 2019, 7:47 pm

Cool C++ script!
How many soups does it run at a time? (Or does it just run ad infinitum?)
EDIT: Hold on, hacking it to run faster by reducing the computation time by half. Not sure if this is a good idea -- probably makes errors about 2^15 times more common. Nothing I can't handle, surely.
EDIT: Seven million soups and nothing but still lifes and p3s.

Code: Select all

x = 5, y = 9, rule = B3-jqr/S01c2-in3
3bo$4bo$o2bo$2o2$2o$o2bo$4bo$3bo!

Code: Select all

x = 7, y = 5, rule = B3/S2-i3-y4i
4b3o$6bo$o3b3o$2o$bo!

User avatar
testitemqlstudop
Posts: 1367
Joined: July 21st, 2016, 11:45 am
Location: in catagolue
Contact:

Re: 1D range-4 B3/S23

Post by testitemqlstudop » March 19th, 2019, 10:10 pm

It runs ad infinitum.

Here's a tip: Compile with flags "-O3 -Ofast -flto -march=native -mfpmath=both" to get about 5K soups/second per core.
(Maybe calcyman will come and rewrite everything in x86_64 assembly.)

Here's another tip: Run one instance for each core you have.
Macbi wrote:I've looked at this before and never managed to find the p3. Well done on finding the first non-stil-life!
Really? Just after ~10K soups it appeared. Also, it's incredibly common.
Hold on, hacking it to run faster by reducing the computation time by half. Not sure if this is a good idea -- probably makes errors about 2^15 times more common. Nothing I can't handle, surely.
What is this "hack"?

User avatar
Hdjensofjfnen
Posts: 1743
Joined: March 15th, 2016, 6:41 pm
Location: re^jθ

Re: 1D range-4 B3/S23

Post by Hdjensofjfnen » March 19th, 2019, 10:17 pm

Code: Select all

[...]

int main()
{
    ofstream out("interesting.txt", ofstream::out | ofstream::app);
    int s=0;
    for(;;)
    {
        Life life;
        life.randomise(61, 192);
        for(int i=0; i<30; i++)
            life.evolve();
        if(life.interesting())
        {
            cout << "Interesting!";
            cout << life.print();
            out << life.print();
        }
        s++;
        if(s % 10000 == 0)
            cout << s << " soups done" << endl;
    }
}
In the for loop, I changed i to stop at 15, not 30.
EDIT: You can do it the Wolfram way and write your p3 like this:

Code: Select all

..o..ooo...oo....oo...ooo..o..
..o..ooo...o.o..o.o...ooo..o..
..o..ooo...ooo..ooo...ooo..o..
..o..ooo...oo....oo...ooo..o..
..o..ooo...o.o..o.o...ooo..o..
..o..ooo...ooo..ooo...ooo..o..
EDIT: Oh, eww... that's disgusting. Never mind.
Last edited by Hdjensofjfnen on March 19th, 2019, 10:28 pm, edited 2 times in total.

Code: Select all

x = 5, y = 9, rule = B3-jqr/S01c2-in3
3bo$4bo$o2bo$2o2$2o$o2bo$4bo$3bo!

Code: Select all

x = 7, y = 5, rule = B3/S2-i3-y4i
4b3o$6bo$o3b3o$2o$bo!

User avatar
testitemqlstudop
Posts: 1367
Joined: July 21st, 2016, 11:45 am
Location: in catagolue
Contact:

Re: 1D range-4 B3/S23

Post by testitemqlstudop » March 19th, 2019, 10:24 pm

The reason I made it stop at 30 is that it's when (almost 100%) of soups stabilise or die out. 15 will give a lot of dying sparks that's useless.

Anyways, updated code that will stop evolving at stabilisation, hopefully 30% faster:

(OUTDATED AND BUG-RIDDEN)

Code: Select all

#include <iostream>
#include <fstream>
#include <string>
#include <map>
#include <cstdlib>
#include <cstring>
#define USIZE 256

using namespace std;

class Life
{
public:
    bool Universe[USIZE][2];
    int UID; // the current universe

    Life()
    {
        memset(Universe, 0, sizeof Universe);
        UID = 0;
    }

    void randomise(int s, int e)
    {
        for(int i=s; i<=e; i++)
            Universe[i][UID] = rand()%2;
    }

    bool evolve() // returns whether or not it stabilised: false = stabilised
    {
        bool allOff = true, identical = true;
        int n = (UID + 1) % 2;
        for(int i=0; i<USIZE; i++)
        {
            int nCount = 0;
            for(int j=i-4; j<=i+4; j++)
            {
                if(j < 0 || j == i) continue;
                if(j >= USIZE) break;
                nCount += (int)(Universe[j][UID]);
            }
            if(!Universe[i][UID]) // B
            {
                if(nCount == 3) // 3
                    Universe[i][n] = 1;
                else
                    Universe[i][n] = 0;
            }
            else // S
            {
                if(nCount == 2 || nCount == 3) // 23
                    Universe[i][n] = 1;
                else
                    Universe[i][n] = 0;
            }
            if(Universe[i][n]) allOff = false;
            if(Universe[i][n] != Universe[i][UID]) identical = false;
        }
        UID = n;
        return allOff || identical;
    }

    string print()
    {
        string ans;
        for(int i=0; i<USIZE; i++)
        {
            if(Universe[i][UID]) ans += 'o';
            else ans += '.';
        }
        return ans + '\n';
    }

    void clear()
    {
        memset(Universe, 0, sizeof Universe);
        UID = 0;
    }

    void read(string s)
    {
        clear();
        if(s.length() != USIZE)
        {
            cout << "Invalid string." << endl;
            return;
        }
        for(int i=0; i<USIZE; i++)
            Universe[i][0] = (s[i] == 'o');
        UID = 0;
    }

    bool isp3() // p3 check
    {
        Life copy;
        memcpy(&copy, this, sizeof copy);
        copy.evolve(); copy.evolve(); copy.evolve();
        for(int i=0; i<USIZE; i++)
            if(Universe[i][UID] != copy.Universe[i][copy.UID]) return false;
        return true;
    }
};

int main()
{
    ofstream out("interesting.txt", ofstream::out | ofstream::app);
    int s=0;
    for(;;)
    {
        Life life;
        life.randomise(61, 192);
        while(life.evolve());
        if(life.isp3())
        {
            cout << "Interesting!";
            cout << life.print();
            out << life.print();
        }
        s++;
        if(s % 10000 == 0)
            cout << s << " soups done" << endl;
    }
}
Last edited by testitemqlstudop on March 20th, 2019, 5:42 am, edited 1 time in total.

User avatar
Hdjensofjfnen
Posts: 1743
Joined: March 15th, 2016, 6:41 pm
Location: re^jθ

Re: 1D range-4 B3/S23

Post by Hdjensofjfnen » March 19th, 2019, 10:30 pm

testitemqlstudop wrote: Anyways, updated code that will stop evolving at stabilisation, hopefully 30% faster:
It runs about five times faster. Wow.
EDIT: In fact, I think you might need to show the console update every 100,000 soups run instead of every 10,000. It runs at around 24,000 soup Hertz.
EDIT: As for spaceships, it's very likely there aren't any, but I don't have any proofs.
Last edited by Hdjensofjfnen on March 19th, 2019, 11:23 pm, edited 1 time in total.

Code: Select all

x = 5, y = 9, rule = B3-jqr/S01c2-in3
3bo$4bo$o2bo$2o2$2o$o2bo$4bo$3bo!

Code: Select all

x = 7, y = 5, rule = B3/S2-i3-y4i
4b3o$6bo$o3b3o$2o$bo!

User avatar
testitemqlstudop
Posts: 1367
Joined: July 21st, 2016, 11:45 am
Location: in catagolue
Contact:

Re: 1D range-4 B3/S23

Post by testitemqlstudop » March 19th, 2019, 11:16 pm

Anyways, now the program won't detect spaceships, because they would crash into the 1x256 border and settle into nothing/SL :roll:

I think it should be easy to make a Golly ruletable, with each generation just updating the line itself, so we can start to Catagolue it.

User avatar
Hdjensofjfnen
Posts: 1743
Joined: March 15th, 2016, 6:41 pm
Location: re^jθ

Re: 1D range-4 B3/S23

Post by Hdjensofjfnen » March 19th, 2019, 11:26 pm

I am almost 100% sure that a 1xn pattern can't escape a 1xn^2 bounding box.
EDIT:
testitemqlstudop wrote:Anyways, now the program won't detect spaceships, because they would crash into the 1x256 border and settle into nothing/SL :roll:

I think it should be easy to make a Golly ruletable, with each generation just updating the line itself, so we can start to Catagolue it.
Would apgsearch be able to differentiate the different objects in range 4?

Code: Select all

x = 5, y = 9, rule = B3-jqr/S01c2-in3
3bo$4bo$o2bo$2o2$2o$o2bo$4bo$3bo!

Code: Select all

x = 7, y = 5, rule = B3/S2-i3-y4i
4b3o$6bo$o3b3o$2o$bo!

wildmyron
Posts: 1544
Joined: August 9th, 2013, 12:45 am
Location: Western Australia

Re: 1D range-4 B3/S23

Post by wildmyron » March 20th, 2019, 12:38 am

It's definitely possible to make a ruletable which would emulate the range 4 neighbourhood, but I think it would be better to write a new genus for lifelib rather than try to deal with the complexity of propagating a range 4 neighbourhood through the range 1 Moore neighbourhood.

In the meantime here's a quick and dirty script to simulate this CA in Golly

Code: Select all

-- Range 4 ECA implementation
-- Runs the range 4 rule B3/S23 on the last row of the current pattern

local g = golly()
local gp = require "gplus"

local r = gp.rect(g.getrect())
local y0 = r.bottom
local ngen = 40

-- Very inefficient update function
-- Evolve the ECA on the specified row and place it in the next row
local function update(y, xmin, xmax)
    local rn = {0, y, 9, 1}
    for x = xmin-2, xmax+2 do
        local islive = g.getcell(x,y)
        rn[1] = x-4
        local neighbours = g.getcells(rn)
        local count = #neighbours/2
        local state = 0
        if islive > 0 then 
            count = count-1
            if count == 2 or count == 3 then
                state = 1
            end
        else
            if count == 3 then
                state = 1
            end
        end
        if state > 0 then
            g.setcell(x, y+1, 1)
        end
    end
end

for y = y0, y0+ngen do
    update(y, r.left-2, r.right+2)
    r = gp.rect(g.getrect())
    if y > r.bottom then break end
    g.update()
end
Has anyone determined the rule number in Wolfram's notation?
Hdjensofjfnen wrote:I am almost 100% sure that a 1xn pattern can't escape a 1xn^2 bounding box.
I'm inclined to agree. I can't prove it, but I just don't see any way for the leading edge of a growing pattern to not end up with an overpopulation condition in the region behind the leading edge which ultimately results in the leading edge dying out due to underpopulation.

I suspect it may be insightful to enumerate all patterns up to a certain size and inspect all those which grow the furthest before stabilising.
Hdjensofjfnen wrote:Would apgsearch be able to differentiate the different objects in range 4?
As well as it can for Larger than Life rules - which is reasonably well.

Edit: Fixed bug in simulation script.

Here are several fuses - 6c/2, 7c/2, and 10c/3:

Code: Select all

x = 181, y = 1, rule = B017/S01
3o3b3o3b3o3b3o3b3o3b3o3b3o3b3o2bo12b3o4b3o4b3o4b3o4b3o4b3o4b3o4b3o2bo
15b2o3b2o3b2o3b2o3b2o3b2o3b2o3b2o3b2o3b2o2b2o!
The 5S project (Smallest Spaceships Supporting Specific Speeds) is now maintained by AforAmpere. The latest collection is hosted on GitHub and contains well over 1,000,000 spaceships.

Semi-active here - recovering from a severe case of LWTDS.

User avatar
Hdjensofjfnen
Posts: 1743
Joined: March 15th, 2016, 6:41 pm
Location: re^jθ

Re: 1D range-4 B3/S23

Post by Hdjensofjfnen » March 20th, 2019, 3:00 am

After 50,860,000 soups processed by testitemqlstudop's program, nothing has turned up other than p1s and p3s. I think it's going to be a long while before we see something different.
Also, are we sure we aren't missing p2s when we parse out p3s? I suppose that we might be, looking at the code.
EDIT: Anyone want to come up with a canonical name so that apgsearch doesn't unneccessarily put hauls into different censi? Of course, all the soups would have to be in the symmetry 1x256.
EDIT: wildmyron, something in your RLE really made my day.

Code: Select all

x = 17, y = 7, rule = B017/S01
bo3b$o4b$bo3b$$bo2bo2bo2bo2bo2bo$$2b2o4b2o4b2ob!

Code: Select all

x = 5, y = 9, rule = B3-jqr/S01c2-in3
3bo$4bo$o2bo$2o2$2o$o2bo$4bo$3bo!

Code: Select all

x = 7, y = 5, rule = B3/S2-i3-y4i
4b3o$6bo$o3b3o$2o$bo!

User avatar
testitemqlstudop
Posts: 1367
Joined: July 21st, 2016, 11:45 am
Location: in catagolue
Contact:

Re: 1D range-4 B3/S23

Post by testitemqlstudop » March 20th, 2019, 4:13 am

I am almost 100% sure that a 1xn pattern can't escape a 1xn^2 bounding box.
I think so too when I analyzed pattern evolution in the beginning; just as in CGoL, populations tended to alternate between rising and falling in each generation, but in 1d, it never recovered as well as CGoL in both the "rising" and "falling". Specifically in each population rise the pattern exploded, and then next generation many died of overpopulation.

(tangential thought)
I think a random soup of width N has an expected lifespan of O(log N); this is due to the fact that during evolution, the soup splits up into multiple non-interacting islands that take there own further evolution (splitting up into smaller islands, etc.)

Here's a modified version of my program that catagolues (it is officially a verb on conwaylife.com now) the lifespan of 5 million soups:

[redacted due to unknown bug]

User avatar
Hdjensofjfnen
Posts: 1743
Joined: March 15th, 2016, 6:41 pm
Location: re^jθ

Re: 1D range-4 B3/S23

Post by Hdjensofjfnen » March 20th, 2019, 4:58 am

After an additional 77.84 million soups, my compiler conked out, still empty-handed.

Code: Select all

x = 5, y = 9, rule = B3-jqr/S01c2-in3
3bo$4bo$o2bo$2o2$2o$o2bo$4bo$3bo!

Code: Select all

x = 7, y = 5, rule = B3/S2-i3-y4i
4b3o$6bo$o3b3o$2o$bo!

User avatar
testitemqlstudop
Posts: 1367
Joined: July 21st, 2016, 11:45 am
Location: in catagolue
Contact:

Re: 1D range-4 B3/S23

Post by testitemqlstudop » March 20th, 2019, 5:14 am

Fixed code: (OUTDATED)

Code: Select all

#include <iostream>
#include <fstream>
#include <string>
#include <map>
#include <cstdlib>
#include <cstring>
#define USIZE 256

using namespace std;

class Life
{
public:
    bool Universe[USIZE][2];
    int UID; // the current universe

    Life()
    {
        memset(Universe, 0, sizeof Universe);
        UID = 0;
    }

    void randomise(int s, int e)
    {
        for(int i=s; i<=e; i++)
            Universe[i][UID] = rand()%2;
    }

    bool evolve() // returns whether or not it stabilised as p1: true = stabilised into p1
    {
        bool allOff = true, identical = true;
        int n = (UID + 1) % 2;
        for(int i=0; i<USIZE; i++)
        {
            int nCount = 0;
            for(int j=i-4; j<=i+4; j++)
            {
                if(j < 0 || j == i) continue;
                if(j >= USIZE) break;
                nCount += (int)(Universe[j][UID]);
            }
            if(!Universe[i][UID]) // B
            {
                if(nCount == 3) // 3
                    Universe[i][n] = 1;
                else
                    Universe[i][n] = 0;
            }
            else // S
            {
                if(nCount == 2 || nCount == 3) // 23
                    Universe[i][n] = 1;
                else
                    Universe[i][n] = 0;
            }
            if(Universe[i][n]) allOff = false;
            if(Universe[i][n] != Universe[i][UID]) identical = false;
        }
        UID = n;
        return allOff || identical;
    }

    string print()
    {
        string ans;
        for(int i=0; i<USIZE; i++)
        {
            if(Universe[i][UID]) ans += 'o';
            else ans += '.';
        }
        return ans + '\n';
    }

    void clear()
    {
        memset(Universe, 0, sizeof Universe);
        UID = 0;
    }

    void read(string s)
    {
        clear();
        if(s.length() != USIZE)
        {
            cout << "Invalid string." << endl;
            return;
        }
        for(int i=0; i<USIZE; i++)
            Universe[i][0] = (s[i] == 'o');
        UID = 0;
    }

    bool isp3() // p3 check
    {
        Life copy;
        memcpy(&copy, this, sizeof copy);
        copy.evolve(); copy.evolve(); copy.evolve();
        for(int i=0; i<USIZE; i++)
            if(Universe[i][UID] != copy.Universe[i][copy.UID]) return false;
        return true;
    }
};

int main()
{
    ofstream out("interesting.txt", ofstream::out | ofstream::app);
    int s=0;
    for(;;)
    {
        Life life;
        life.randomise(61, 192);
        int l=0;
        while(!life.evolve() && l < 30) l++;
        if(!life.isp3())
        {
            cout << "Interesting!";
            cout << life.print();
            out << life.print();
        }
        s++;
        if(s % 100000 == 0)
            cout << s << " soups done" << endl;
    }
}

Last edited by testitemqlstudop on March 20th, 2019, 5:42 am, edited 1 time in total.

User avatar
Hdjensofjfnen
Posts: 1743
Joined: March 15th, 2016, 6:41 pm
Location: re^jθ

Re: 1D range-4 B3/S23

Post by Hdjensofjfnen » March 20th, 2019, 5:19 am

I kid you not, the new code is approximately 20 times slower to run.
EDIT: GASP! And in the first 600,000 soups, too! Let's see what it is.

Code: Select all

...........................................................................................................................................o..ooo....ooo....oooo...oooo....ooo..o...............................................................................

Code: Select all

x = 5, y = 9, rule = B3-jqr/S01c2-in3
3bo$4bo$o2bo$2o2$2o$o2bo$4bo$3bo!

Code: Select all

x = 7, y = 5, rule = B3/S2-i3-y4i
4b3o$6bo$o3b3o$2o$bo!

wildmyron
Posts: 1544
Joined: August 9th, 2013, 12:45 am
Location: Western Australia

Re: 1D range-4 B3/S23

Post by wildmyron » March 20th, 2019, 5:27 am

Hdjensofjfnen wrote:After an additional 77.84 million soups, my compiler conked out, still empty-handed.
Do you mean the program crashed?

Was that search with this version? As mentioned that would unfortunately not have detected any spaceships, if they exist.

Here are the patterns I have found with the furthest "reach". There would almost seem to be some faint hope of a c/3 spaceship (looking at the middle pattern), but I'm not yet convinced

Code: Select all

x = 104, y = 13, rule = B/S
3bob4o4b4o22b2ob4o4b4o21b4o2bobob2obo$2b2o4bo4b4obo19b2o5bo4b4obo17bob
2o6bo2bob2o$4b3o3bo2bo4b2o21b2o4bo2bo4b2o15b6obo4bobob3o$2b5o3bo3b4o
25b4o4b4o15bo8bob4o4b4o$o8b3o3b3obo21bob4o4b4obo21b2o4bo4b4obo$7b5o4b
2ob2o19b2o4bo4bo4b2o22b3o3bo2bo4b2o$5bo10b2ob3o20b3o8b3o22b5o3bo3b4o$
15b2o4b3o16b7o4b7o18bo8b3o3b3obo$17bo3b5o12bo20bo23b5o4b2ob2o$18bo8bo
53bo10b2ob3o$91b2o4b3o$93bo3b5o$94bo8bo!
Hdjensofjfnen wrote:I kid you not, the new code is approximately 20 times slower to run.
EDIT: GASP! And in the first 600,000 soups, too! Let's see what it is.

Code: Select all

...........................................................................................................................................o..ooo....ooo....oooo...oooo....ooo..o...............................................................................
It's a p2, simplified and evolved:

Code: Select all

x = 31, y = 10, rule = B/S
o2b3o4b4o3b4o4b3o2bo$o2b3o4b3o5b3o4b3o2bo$o2b3o4b4o3b4o4b3o2bo$o2b3o4b
3o5b3o4b3o2bo$o2b3o4b4o3b4o4b3o2bo$o2b3o4b3o5b3o4b3o2bo$o2b3o4b4o3b4o
4b3o2bo$o2b3o4b3o5b3o4b3o2bo$o2b3o4b4o3b4o4b3o2bo$o2b3o4b3o5b3o4b3o2bo!
P.S. I did intend to change the rule previously, but it slipped through. :)
The 5S project (Smallest Spaceships Supporting Specific Speeds) is now maintained by AforAmpere. The latest collection is hosted on GitHub and contains well over 1,000,000 spaceships.

Semi-active here - recovering from a severe case of LWTDS.

User avatar
Hdjensofjfnen
Posts: 1743
Joined: March 15th, 2016, 6:41 pm
Location: re^jθ

Re: 1D range-4 B3/S23

Post by Hdjensofjfnen » March 20th, 2019, 5:31 am

So period 1, period 3, and period 2 under our belts! I was surprised why that p2 didn't turn up sooner.
EDIT: As for the "far-reach" patterns, we need some way to keep the very thin 1xn universe from overpopulating. It can't have a run of over 5 or 6 cells in a row.
EDIT: Huh! I'm getting p2s every few hundred thousand soups now.
Last edited by Hdjensofjfnen on March 20th, 2019, 5:37 am, edited 1 time in total.

Code: Select all

x = 5, y = 9, rule = B3-jqr/S01c2-in3
3bo$4bo$o2bo$2o2$2o$o2bo$4bo$3bo!

Code: Select all

x = 7, y = 5, rule = B3/S2-i3-y4i
4b3o$6bo$o3b3o$2o$bo!

User avatar
testitemqlstudop
Posts: 1367
Joined: July 21st, 2016, 11:45 am
Location: in catagolue
Contact:

Re: 1D range-4 B3/S23

Post by testitemqlstudop » March 20th, 2019, 5:37 am

Funny, just now a bunch of "interestings" was spat into the file:

Code: Select all

.....................................................................................................o..ooo...o.oo.o..o...ooo..o................................................................................................................................
................................................................o..ooo...ooo...o..o.oo.o...ooo..o...............................................................................................................................................................
...............................................................................................................................o..ooo...o.oo.o.oo...ooo..o......................................................................................................
.................................................................................................................o..ooo...o.oo.o.oo...ooo..o....................................................................................................................
.....................................................................................................................................................o..ooo...o.oo.o..o...ooo..o................................................................................
......................................................................................................................................................................o..ooo...o.oo.o.oo...ooo..o...............................................................
.........................................................................................................................o..ooo....oooo...oooo....ooo....ooo..o.................................................................................................
............................................................................................o..ooo...o.o....oo...ooo..o.........................................................................................................................................
................................................................................................................................................o..ooo...o.oo.o.oo...ooo..o.....................................................................................
............................................................................o..ooo...ooo....oooo...oooo....ooo..o...............................................................................................................................................
....................................................................................................................................o..ooo...o.oo.o.oo...ooo..o...ooo..o........................................................................................
................................................................................................................................................................o..ooo....oooo...oooo....ooo..o.................................................................
........................................................................................................................................................o..ooo...o.oo.o.oo...ooo..o.............................................................................
............................................................................................................o..ooo....ooo.....ooo....ooo..o.....................................................................................................................
....................................................................................................................................o..ooo...oo.o.oo.o...ooo..o.................................................................................................
......................................................................................................................................o..ooo...ooo...o.oo.o..o...ooo..o.........................................................................................
..................................................................o..ooo...o.oo.o.oo...ooo..o...................................................................................................................................................................
................................................................................................o..ooo...o.oo.o.oo...ooo..o.....................................................................................................................................
................................................................................o..ooo...o.oo.o.oo...ooo..o.....................................................................................................................................................
Apparently all p2!

Let me modify the code to mark p2 as "uninteresting"..

User avatar
testitemqlstudop
Posts: 1367
Joined: July 21st, 2016, 11:45 am
Location: in catagolue
Contact:

Re: 1D range-4 B3/S23

Post by testitemqlstudop » March 20th, 2019, 5:41 am

New glorious code with optional population catagolue ability: (OUTDATED)

Code: Select all

#include <iostream>
#include <fstream>
#include <string>
#include <map>
#include <cstdlib>
#include <cstring>
#define USIZE 256

// uncomment to catagolue lifespan
// #define LSP

using namespace std;

class Life
{
public:
    bool Universe[USIZE][2];
    int UID; // the current universe

    Life()
    {
        memset(Universe, 0, sizeof Universe);
        UID = 0;
    }

    void randomise(int s, int e)
    {
        for(int i=s; i<=e; i++)
            Universe[i][UID] = rand()%2;
    }

    bool evolve() // returns whether or not it stabilised as p1: true = stabilised into p1
    {
        bool allOff = true, identical = true;
        int n = (UID + 1) % 2;
        for(int i=0; i<USIZE; i++)
        {
            int nCount = 0;
            for(int j=i-4; j<=i+4; j++)
            {
                if(j < 0 || j == i) continue;
                if(j >= USIZE) break;
                nCount += (int)(Universe[j][UID]);
            }
            if(!Universe[i][UID]) // B
            {
                if(nCount == 3) // 3
                    Universe[i][n] = 1;
                else
                    Universe[i][n] = 0;
            }
            else // S
            {
                if(nCount == 2 || nCount == 3) // 23
                    Universe[i][n] = 1;
                else
                    Universe[i][n] = 0;
            }
            if(Universe[i][n]) allOff = false;
            if(Universe[i][n] != Universe[i][UID]) identical = false;
        }
        UID = n;
        return allOff || identical;
    }

    string print()
    {
        string ans;
        for(int i=0; i<USIZE; i++)
        {
            if(Universe[i][UID]) ans += 'o';
            else ans += '.';
        }
        return ans + '\n';
    }

    void clear()
    {
        memset(Universe, 0, sizeof Universe);
        UID = 0;
    }

    void read(string s)
    {
        clear();
        if(s.length() != USIZE)
        {
            cout << "Invalid string." << endl;
            return;
        }
        for(int i=0; i<USIZE; i++)
            Universe[i][0] = (s[i] == 'o');
        UID = 0;
    }

    bool isp3() // p3 check
    {
        Life copy;
        memcpy(&copy, this, sizeof copy);
        copy.evolve(); copy.evolve(); copy.evolve();
        for(int i=0; i<USIZE; i++)
            if(Universe[i][UID] != copy.Universe[i][copy.UID]) return false;
        return true;
    }

    bool isp2() // p2 check
    {
        Life copy;
        memcpy(&copy, this, sizeof copy);
        copy.evolve(); copy.evolve();
        for(int i=0; i<USIZE; i++)
            if(Universe[i][UID] != copy.Universe[i][copy.UID]) return false;
        return true;
    }
};

#ifdef LSP
int lifespans[51];
#endif

int main()
{
    ofstream out("interesting.txt", ofstream::out | ofstream::app);
    int s=0;
#ifdef LSP
    for(;s < 5000000;)
#else
    for(;;)
#endif
    {
        Life life;
        life.randomise(61, 192);
        int l=0;
        while(!life.evolve() && l < 50) l++;
#ifdef LSP
        lifespans[l]++;
#endif
        if(!life.isp3() && !life.isp2()) // check p3 and then check p2
        {
            cout << "Interesting!";
            cout << life.print();
            out << life.print();
        }
        s++;
        if(s % 100000 == 0)
            cout << s << " soups done" << endl;
    }
#ifdef LSP
    for(int i=1; i<51; i++)
        cout << "Soups that settled in " << i << " generations: " << lifespans[i] << endl;
#endif
}
Last edited by testitemqlstudop on March 20th, 2019, 6:05 am, edited 1 time in total.

User avatar
Hdjensofjfnen
Posts: 1743
Joined: March 15th, 2016, 6:41 pm
Location: re^jθ

Re: 1D range-4 B3/S23

Post by Hdjensofjfnen » March 20th, 2019, 5:43 am

It's very, very likely that no spaceships with period 2 exist in this rule.
EDIT: Here are all the p2s that my side found:

Code: Select all

clang version 7.0.0-3~ubuntu0.18.04.1 (tags/RELEASE_700/final)
100000 soups done
200000 soups done
300000 soups done
400000 soups done
500000 soups done
Interesting!...........................................................................................................................................o..ooo....ooo....oooo...oooo....ooo..o...............................................................................
600000 soups done
Interesting!.....................................................................................................o..ooo...oo.o.oo.o...ooo..o................................................................................................................................
700000 soups done
Interesting!................................................................o..ooo...ooo...o.oo.o.oo...ooo..o...............................................................................................................................................................
800000 soups done
Interesting!...............................................................................................................................o..ooo...oo....o.o...ooo..o......................................................................................................
900000 soups done
1000000 soups done
1100000 soups done
1200000 soups done
Interesting!.................................................................................................................o..ooo...oo....o.o...ooo..o....................................................................................................................
1300000 soups done
Interesting!.....................................................................................................................................................o..ooo...oo.o.oo.o...ooo..o................................................................................
1400000 soups done
1500000 soups done
1600000 soups done
Interesting!......................................................................................................................................................................o..ooo...oo....o.o...ooo..o...............................................................
1700000 soups done
Interesting!.........................................................................................................................o..ooo....oooo...oooo....ooo....ooo..o.................................................................................................
1800000 soups done
1900000 soups done
Interesting!............................................................oooooooo............................................................................................................................................................................................
2000000 soups done
2100000 soups done
Interesting!............................................................................................o..ooo...o.oo.o..o...ooo..o.........................................................................................................................................
Interesting!................................................................................................................................................o..ooo...oo....o.o...ooo..o.....................................................................................
2200000 soups done
2300000 soups done
2400000 soups done
Interesting!............................................................................o..ooo...ooo....oooo...oooo....ooo..o...............................................................................................................................................
Interesting!....................................................................................................................................o..ooo...oo....o.o...ooo..o...ooo..o........................................................................................
2500000 soups done
Interesting!................................................................................................................................................................o..ooo....oooo...oooo....ooo..o.................................................................
2600000 soups done
2700000 soups done
2800000 soups done
Interesting!........................................................................................................................................................o..ooo...oo....o.o...ooo..o.............................................................................
2900000 soups done
Interesting!............................................................................................................o..ooo....ooo.....ooo....ooo..o.....................................................................................................................
3000000 soups done
3100000 soups done
3200000 soups done
3300000 soups done
Interesting!....................................................................................................................................o..ooo...o.o....oo...ooo..o.................................................................................................
Interesting!......................................................................................................................................o..ooo...ooo...oo.o.oo.o...ooo..o.........................................................................................
3400000 soups done
3500000 soups done
3600000 soups done
3700000 soups done
Interesting!..................................................................o..ooo...oo....o.o...ooo..o...................................................................................................................................................................
3800000 soups done
Interesting!................................................................................................o..ooo...oo....o.o...ooo..o.....................................................................................................................................
EDIT: New code, new "Interesting", looks like a p2 to me:

Code: Select all

.....................................................................................................o..ooo...o.oo.o..o...ooo..o................................................................................................................................

Code: Select all

x = 5, y = 9, rule = B3-jqr/S01c2-in3
3bo$4bo$o2bo$2o2$2o$o2bo$4bo$3bo!

Code: Select all

x = 7, y = 5, rule = B3/S2-i3-y4i
4b3o$6bo$o3b3o$2o$bo!

User avatar
testitemqlstudop
Posts: 1367
Joined: July 21st, 2016, 11:45 am
Location: in catagolue
Contact:

Re: 1D range-4 B3/S23

Post by testitemqlstudop » March 20th, 2019, 5:47 am

I agree, but in 1d the speed limit is apparently 2 cells/gen (c = 4, not 1 now)

[very-obvious-statement]
No photons exist.
[/very-obvious-statement]

Hdjen:

P5, LET'S GOOOOOO

Code: Select all

x = 27, y = 42, rule = B2ei3ikq4cejr5akq6ack/S1c2-n3ajry4aejkyz5ijry6aci8
o2b3o3bob2obo2bo3b3o2bo$o2b3o3bob2obob2o3b3o2bo$o2b3o3bobo4b2o3b3o2bo$
o2b3o3bo2bob2obo3b3o2bo$o2b3o3b2obob2obo3b3o2bo$o2b3o3b2o4bobo3b3o2bo$
o2b3o3bob2obo2bo3b3o2bo$o2b3o3bob2obob2o3b3o2bo$o2b3o3bobo4b2o3b3o2bo$
o2b3o3bo2bob2obo3b3o2bo$o2b3o3b2obob2obo3b3o2bo$o2b3o3b2o4bobo3b3o2bo$
o2b3o3bob2obo2bo3b3o2bo$o2b3o3bob2obob2o3b3o2bo$o2b3o3bobo4b2o3b3o2bo$
o2b3o3bo2bob2obo3b3o2bo$o2b3o3b2obob2obo3b3o2bo$o2b3o3b2o4bobo3b3o2bo$
o2b3o3bob2obo2bo3b3o2bo$o2b3o3bob2obob2o3b3o2bo$o2b3o3bobo4b2o3b3o2bo$
o2b3o3bo2bob2obo3b3o2bo$o2b3o3b2obob2obo3b3o2bo$o2b3o3b2o4bobo3b3o2bo$
o2b3o3bob2obo2bo3b3o2bo$o2b3o3bob2obob2o3b3o2bo$o2b3o3bobo4b2o3b3o2bo$
o2b3o3bo2bob2obo3b3o2bo$o2b3o3b2obob2obo3b3o2bo$o2b3o3b2o4bobo3b3o2bo$
o2b3o3bob2obo2bo3b3o2bo$o2b3o3bob2obob2o3b3o2bo$o2b3o3bobo4b2o3b3o2bo$
o2b3o3bo2bob2obo3b3o2bo$o2b3o3b2obob2obo3b3o2bo$o2b3o3b2o4bobo3b3o2bo$
o2b3o3bob2obo2bo3b3o2bo$o2b3o3bob2obob2o3b3o2bo$o2b3o3bobo4b2o3b3o2bo$
o2b3o3bo2bob2obo3b3o2bo$o2b3o3b2obob2obo3b3o2bo$o2b3o3b2o4bobo3b3o2bo!
Last edited by testitemqlstudop on March 20th, 2019, 5:56 am, edited 2 times in total.

User avatar
Hdjensofjfnen
Posts: 1743
Joined: March 15th, 2016, 6:41 pm
Location: re^jθ

Re: 1D range-4 B3/S23

Post by Hdjensofjfnen » March 20th, 2019, 5:49 am

I don't think your code is filtering out "Interesting!"s properly.

Code: Select all

clang version 7.0.0-3~ubuntu0.18.04.1 (tags/RELEASE_700/final)
100000 soups done
200000 soups done
300000 soups done
400000 soups done
500000 soups done
600000 soups done
Interesting!.....................................................................................................o..ooo...o.oo.o..o...ooo..o................................................................................................................................
700000 soups done
Interesting!................................................................o..ooo...ooo...o..o.oo.o...ooo..o...............................................................................................................................................................
800000 soups done
Interesting!...............................................................................................................................o..ooo...o.oo.o.oo...ooo..o......................................................................................................
900000 soups done
1000000 soups done
1100000 soups done
1200000 soups done
Interesting!.................................................................................................................o..ooo...o.oo.o.oo...ooo..o....................................................................................................................
1300000 soups done
Interesting!.....................................................................................................................................................o..ooo...o.oo.o..o...ooo..o................................................................................
1400000 soups done
1500000 soups done
1600000 soups done
Interesting!......................................................................................................................................................................o..ooo...o.oo.o.oo...ooo..o...............................................................
1700000 soups done
1800000 soups done
EDIT: Wait. They're all the same ... ?
EDIT: Yeah, these are all the same object, just translated/flipped/stator modified.
Last edited by Hdjensofjfnen on March 20th, 2019, 5:50 am, edited 1 time in total.

Code: Select all

x = 5, y = 9, rule = B3-jqr/S01c2-in3
3bo$4bo$o2bo$2o2$2o$o2bo$4bo$3bo!

Code: Select all

x = 7, y = 5, rule = B3/S2-i3-y4i
4b3o$6bo$o3b3o$2o$bo!

User avatar
testitemqlstudop
Posts: 1367
Joined: July 21st, 2016, 11:45 am
Location: in catagolue
Contact:

Re: 1D range-4 B3/S23

Post by testitemqlstudop » March 20th, 2019, 5:50 am

Pfft, those are all p5.
Last edited by testitemqlstudop on March 20th, 2019, 5:56 am, edited 1 time in total.

User avatar
Hdjensofjfnen
Posts: 1743
Joined: March 15th, 2016, 6:41 pm
Location: re^jθ

Re: 1D range-4 B3/S23

Post by Hdjensofjfnen » March 20th, 2019, 5:51 am

Another oscillator period down... and another write-up I suppose. It must be getting annoying.
EDIT: According to your program, oscillators appear with a frequency of 7.3e-5.

Code: Select all

Soups that settled in 1 generations: 173
Soups that settled in 2 generations: 8791
Soups that settled in 3 generations: 122617
Soups that settled in 4 generations: 663198
Soups that settled in 5 generations: 1140860
Soups that settled in 6 generations: 1049074
Soups that settled in 7 generations: 813496
Soups that settled in 8 generations: 555545
Soups that settled in 9 generations: 292168
Soups that settled in 10 generations: 164023
Soups that settled in 11 generations: 91375
Soups that settled in 12 generations: 48260
Soups that settled in 13 generations: 24174
Soups that settled in 14 generations: 12504
Soups that settled in 15 generations: 6198
Soups that settled in 16 generations: 3746
Soups that settled in 17 generations: 1774
Soups that settled in 18 generations: 853
Soups that settled in 19 generations: 390
Soups that settled in 20 generations: 197
Soups that settled in 21 generations: 107
Soups that settled in 22 generations: 54
Soups that settled in 23 generations: 31
Soups that settled in 24 generations: 13
Soups that settled in 25 generations: 9
Soups that settled in 26 generations: 1
Soups that settled in 27 generations: 1
Soups that settled in 28 generations: 1
Soups that settled in 29 generations: 0
Soups that settled in 30 generations: 0
Soups that settled in 31 generations: 0
Soups that settled in 32 generations: 1
Soups that settled in 33 generations: 0
Soups that settled in 34 generations: 0
Soups that settled in 35 generations: 0
Soups that settled in 36 generations: 0
Soups that settled in 37 generations: 0
Soups that settled in 38 generations: 0
Soups that settled in 39 generations: 0
Soups that settled in 40 generations: 0
Soups that settled in 41 generations: 0
Soups that settled in 42 generations: 0
Soups that settled in 43 generations: 0
Soups that settled in 44 generations: 0
Soups that settled in 45 generations: 0
Soups that settled in 46 generations: 0
Soups that settled in 47 generations: 0
Soups that settled in 48 generations: 0
Soups that settled in 49 generations: 0
Soups that settled in 50 generations: 366

Code: Select all

x = 5, y = 9, rule = B3-jqr/S01c2-in3
3bo$4bo$o2bo$2o2$2o$o2bo$4bo$3bo!

Code: Select all

x = 7, y = 5, rule = B3/S2-i3-y4i
4b3o$6bo$o3b3o$2o$bo!

wildmyron
Posts: 1544
Joined: August 9th, 2013, 12:45 am
Location: Western Australia

Re: 1D range-4 B3/S23

Post by wildmyron » March 20th, 2019, 6:01 am

I don't know if you guys have actually found a p4 or p5 yet, but this one is definitely p6:

Code: Select all

x = 27, y = 20, rule = B/S
o2b3o3bob2obob2o3b3o2bo$o2b3o3bobo4b2o3b3o2bo$o2b3o3bo2bob2obo3b3o2bo$
o2b3o3b2obob2obo3b3o2bo$o2b3o3b2o4bobo3b3o2bo$o2b3o3bob2obo2bo3b3o2bo$
o2b3o3bob2obob2o3b3o2bo$o2b3o3bobo4b2o3b3o2bo$o2b3o3bo2bob2obo3b3o2bo$
o2b3o3b2obob2obo3b3o2bo$o2b3o3b2o4bobo3b3o2bo$o2b3o3bob2obo2bo3b3o2bo$
o2b3o3bob2obob2o3b3o2bo$o2b3o3bobo4b2o3b3o2bo$o2b3o3bo2bob2obo3b3o2bo$
o2b3o3b2obob2obo3b3o2bo$o2b3o3b2o4bobo3b3o2bo$o2b3o3bob2obo2bo3b3o2bo$
o2b3o3bob2obob2o3b3o2bo$o2b3o3bobo4b2o3b3o2bo!
(In case it's not obvious, the fact that it's a flipper requires the period to be even)
Last edited by wildmyron on March 20th, 2019, 6:05 am, edited 1 time in total.
The 5S project (Smallest Spaceships Supporting Specific Speeds) is now maintained by AforAmpere. The latest collection is hosted on GitHub and contains well over 1,000,000 spaceships.

Semi-active here - recovering from a severe case of LWTDS.

Post Reply