Page 1 of 2

[GAME] Building CA from the Ground Up

Posted: February 5th, 2025, 12:04 am
by H. H. P. M. P. Cole
Day 1
All I have with me is a computer that is otherwise blank save for Python and C++.
I searched for the ConwayLife forums and LifeWiki. ConwayLife is down, and it looks like it will be that way forever.
Never mind, I could at least search for other CA-related sites… oh, never mind, the internet is down too.
The technicians in my area are not that competent and are very slow.
I still want to get back to CA again. Sadly, my old computer with all my CA files has been wrongly trashed by my archenemy.
The only information I know about CA, for now, is this:
FROM: Your friend
TO: You
A cellular automaton (CA) consists of a regular grid of cells, each in one of a finite number of states. The grid can be in any finite number of dimensions. For each cell, a set of cells called its neighbourhood is defined relative to the specified cell. An initial state (time t = 0) is selected by assigning a state for each cell. A new generation is created (advancing t by 1), according to some fixed rule (generally, a mathematical function) that determines the new state of each cell in terms of the current state of the cell and the states of the cells in its neighbourhood. The rule for updating the state of cells is the same for each cell and does not change over time and is applied to the whole grid simultaneously.
[META NOTE: This was taken and slightly paraphrased from Wikipedia.]
I’d might as well start now. First step: a zero-dimensional grid.

==============================================================================================================================

RULES TO CONTINUE THE GAME:
* Provide a day number that is the same or the successor to the previous poster. Decrementing is allowed if CA definitions from that day are not well-defined.
* DO NOT provide RLEs. You can put stuff in code tags, but nowhere in this thread do we want LifeViewer-compatible code blocks.
* All code must be in either Python or C++. No extra modules or import commands (apart from importing other programs in this thread) allowed.
* No using existing software other than Python or C++. We are building the theory of CA from the ground up.

Re: [GAME] Building CA from the Ground Up

Posted: February 5th, 2025, 12:30 am
by islptng
Day 2: Introducing 1D Grid

A zero-dimensional grid has only 1 cell, which is too limited. Let's start from 1D grid.

Let's say we have a infinitely long tape. Each cell on the tape has only 2 states, 0 or 1.
Each cell has one neighbor, that is the cell at the left.
Let's call itself C, and its neighbor L, and the next generation of cell N.

Simulation that begins with tape "...0001000...", rule N = C xor L, the 0s on the sides are trimmed and 0s in the middle are replaced by dots:

Code: Select all

1
11
1.1
1111
1...1
11..11
1.1.1.1
11111111
1.......1
11......11
1.1.....1.1
1111....1111
1...1...1...1
11..11..11..11
1.1.1.1.1.1.1.1
1111111111111111

Re: [GAME] Building CA from the Ground Up

Posted: February 5th, 2025, 12:37 am
by eRroR_6o6
Later on Day 1:

I whipped up a quick program in Python to run 0D CA.

Code: Select all

x = input()
birth = input()
survival = input()
steps = 0
steplimit = int(input())
while steps < steplimit:
     if x = 0:
          if x = b:
                x = 1
          else:
                x = 0
     else:
          if x = s:
                x = 1
          else:
                x = 0
     steps = steps+1
It turns out, CA on a zero-dimensional grid aren't very interesting. Either it turns on forever, turns off forever, stays as is forever, or alternates forever.
Maybe it would be more interesting if we moved up a dimension. Second step: a one-dimensional grid.

Edit: whoops i was too late (just assume this chronologically happens before last post i guess)

Re: [GAME] Building CA from the Ground Up

Posted: February 5th, 2025, 12:49 am
by H. H. P. M. P. Cole
eRroR_6o6 wrote: February 5th, 2025, 12:37 am Later on Day 1:
[META NOTE: We are already on Day 2.]
eRroR_6o6 wrote: February 5th, 2025, 12:37 am I whipped up a quick program in Python to run 0D CA.

Code: Select all

x = input()
birth = input()
survival = input()
steps = 0
steplimit = int(input())
while steps < steplimit:
     if x = 0:
          if x = b:
                x = 1
          else:
                x = 0
     else:
          if x = s:
                x = 1
          else:
                x = 0
     steps = steps+1
[META NOTE: Corrected and more user-friendly program]

Code: Select all

x = int(input("Enter starting state: "))
birth = int(input("Allow birth? 1 for Yes and 0 for No "))
survival = int(input("Allow survival? 1 for Yes and 0 for No "))
steps = 0
steplimit = int(input("Enter step limit: "))
while steps < steplimit:
     if x = 0:
          if x = birth:
                x = 1
          else:
                x = 0
     else:
          if x = survival:
                x = 1
          else:
                x = 0
     steps = steps+1
     print(x)
eRroR_6o6 wrote: February 5th, 2025, 12:37 am It turns out, CA on a zero-dimensional grid aren't very interesting. Either it turns on forever, turns off forever, stays as is forever, or alternates forever.
Maybe it would be more interesting if we moved up a dimension. Second step: a one-dimensional grid.
[META NOTE: we've already moved up]

Re: [GAME] Building CA from the Ground Up

Posted: February 5th, 2025, 1:04 am
by LuveelVoom
later on Day 2
I don't know how to code, but let's consider the possible functions for a single cell with a neighborhood of itself and the left and right neighbors, and only 0 or 1 for cells. Clearly, there are 8 possible sets of these:

Code: Select all

000, 001, 010, 011, 100, 101, 110, 111
Each of these can lead to the active cell turning either on or off, so there are 2^8 or 256 possible functions with a 3-cell neighborhood, 2 values for cells, and a 1 dimensional grid.
However, since flipping 0 and 1 results in functions with the same behavior but flipped values, there are really only 2^7 or 128 different functions.
Do any of these have special properties?

Re: [GAME] Building CA from the Ground Up

Posted: February 5th, 2025, 11:09 pm
by hotcrystal0
(Pure blue (#0000FF) text in parentheses is out-of-universe talk.
I think we should start using blatantly fake emails.)
To: hotcrystal0@cgol.ca, luveelvoom@example.com
From: hppmpcole@inlook.com
Subject: I got my internet back

I got my internet back, but unfortunately they only set up the weak plan, so I can only access social media sites and email sites, but not video streaming sites. I can’t even access Google to search about CA.

Re: [GAME] Building CA from the Ground Up

Posted: February 6th, 2025, 7:52 am
by unname4798
hotcrystal0 wrote: February 5th, 2025, 11:09 pm (Pure blue (#0000FF) text in parentheses is out-of-universe talk.
I think we should start using blatantly fake emails.)
To: hotcrystal0@cgol.ca, luveelvoom@example.com
From: hppmpcole@inlook.com
Subject: I got my internet back

I got my internet back, but unfortunately they only set up the weak plan, so I can only access social media sites and email sites, but not video streaming sites. I can’t even access Google to search about CA.
To: hotcrystal0@cgol.ca, luvelvoom@example.com, u4798990@odeyala.com
From: hppmpcole@inlook.com
Subject: Internet got better

I can also access other sites, only 3+ frendly ones. Unfortunately, my router broke without recover and I don't have money to buy a new router. I don't have a job.
Day 3:
I extended the number of possible outputs to 3, so there are 2^24 (16777216) rules. This is becoming high!
There are only 8! (40320) reversible rules.
I hope that there are many nice specimens of this rulespace of 40320 rules.

Re: [GAME] Building CA from the Ground Up

Posted: February 7th, 2025, 8:45 am
by H. H. P. M. P. Cole
We should be as thorough as possible in our explorations: remember, we are building CA from the ground up. It is possible for us to explore the ideas put forward by LuveelVoom and unname4798, just later on.
unname4798 wrote: February 6th, 2025, 7:52 am Day 3:
I extended the number of possible outputs to 3, so there are 2^24 (16777216) rules. This is becoming high!
There are only 8! (40320) reversible rules.
I hope that there are many nice specimens of this rulespace of 40320 rules.
This is not well-defined enough. Hence we will still be on Day 2 for now.
LuveelVoom wrote: February 5th, 2025, 1:04 am later on Day 2
I don't know how to code, but let's consider the possible functions for a single cell with a neighborhood of itself and the left and right neighbors, and only 0 or 1 for cells. Clearly, there are 8 possible sets of these:

Code: Select all

000, 001, 010, 011, 100, 101, 110, 111
Each of these can lead to the active cell turning either on or off, so there are 2^8 or 256 possible functions with a 3-cell neighborhood, 2 values for cells, and a 1 dimensional grid.
However, since flipping 0 and 1 results in functions with the same behavior but flipped values, there are really only 2^7 or 128 different functions.
Do any of these have special properties?
Back to the narrator's perspective.

This is an interesting idea, but we have not investigated fully the sixteen 1D CA where there is one neighbour in the cell's neighbourhood.

Later on Day 2:
islptng wrote: February 5th, 2025, 12:30 am Day 2: Introducing 1D Grid
To: hotcrystal0@cgol.ca, luveelvoom@example.com, islptng@hmail.com
From: hppmpcole@inlook.com
Subject: 1D CA notation

I have designed a notation for 1D CA based on islptng's (thanks!) idea.
Basically, each CA can be denoted by four numbers: abcd. We define the CA corresponding to abcd as follows:

Code: Select all

t = 0   00   01   10   11
t = 1    a    b    c    d
There are 16 CA of this type. I made a Python program to simulate them all.

Code: Select all

# IMPORTANT
# Initial soup
soup = '1011'
# The definition of the CA
cadef = '0110'
# The number of the steps you want to run the CA for.
numofsteps = 16
# These are the workings 'behind the scenes'. DO NOT MODIFY.
soup = list(soup)
initial = ['0']
for i in soup:
    initial.append(i)
initial.append('0')
old = initial
print(''.join(soup))
for i in range(0,numofsteps):
    new = ['0']
    for j in range(0,len(old)-1):
        if old[j] == '0' and old[j+1] == '0':
            new.append(cadef[0])
        if old[j] == '0' and old[j+1] == '1':
            new.append(cadef[1])
        if old[j] == '1' and old[j+1] == '0':
            new.append(cadef[2])
        if old[j] == '1' and old[j+1] == '1':
            new.append(cadef[3])
    new.append('0')
    print(''.join(new[1:-1]))
    old = new
We should all explore four CA each (if more people join in, they can!) and we can provide descriptions of their behaviours. Are you all okay with this project?

Re: [GAME] Building CA from the Ground Up

Posted: February 7th, 2025, 9:12 am
by unname4798
You decremented the day counter. That's not valid.

Re: [GAME] Building CA from the Ground Up

Posted: February 7th, 2025, 9:13 am
by H. H. P. M. P. Cole
unname4798 wrote: February 7th, 2025, 9:12 am You decremented the day counter. That's not valid.
Oh yes. That is valid because your CA definition is ill-defined. I will update the first post to include that.

Re: [GAME] Building CA from the Ground Up

Posted: February 7th, 2025, 9:15 am
by islptng
Later on Day 2:
To: hppmpcole@inlook.com
From: islptng@hmail.com
Subject: Improvement of your code and a classification method

Improvement of your code:

Code: Select all

# Zeros are replaced with dots for visibility.
def calculate(cadef, grid):
    cadef = cadef.replace("0",".")
    grid = "." + grid
    newgrid = ""
    conv = {".": False, "1": True}
    for i in range(1, len(grid)):
        index = conv[grid[i-1]]*2 + conv[grid[i]]
        newgrid += cadef[index]
    return newgrid

def run(cadef, grid, steps):
    res = ""
    for i in range(steps):
        res += grid + "\n"
        grid = calculate(cadef, grid)
    res += grid
    return res

print(run("0110","1.......................",23))
Classification:

Code: Select all

3 Growing: Most thing expands.
2 Stable: Most thing stays in its original box.
1 Dying: Most thing becomes smaller, either dies out, or leaves something stable.
So 0110 is Class 3.
The classification from 0000 to 0111:

Code: Select all

0000 1
0001 1
0010 3
0011 3
0100 1.5
0101 2
0110 3
0111 3

Re: [GAME] Building CA from the Ground Up

Posted: February 7th, 2025, 9:37 am
by H. H. P. M. P. Cole
Later on Day 2:
To: islptng@hmail.com
From: hppmpcole@inlook.com
Subject: A better classification method and some notes on each of the sixteen CA

Thank you for the code. I have been using it instead of my old code. However, mine has the advantage of an ever-expanding grid.

I propose this classification system:

Code: Select all

On Growth:
	3 Growing: Most things expand.
	2 Stable: Most things become stable but not all patterns die.
	1 Dying: All patterns die.
Here is a classification of all 16 1D CA using this scheme and eRroR_606's names.

Code: Select all

0000 -> 1 "everything turns off forever"
0001 -> 1
0010 -> 2 (leaves only one-dot moving things)
0011 -> 2 (everything moves to the right one cell every 1 tick)
0100 -> 2 (leaves only one-dot unmoving things)
0101 -> 2 "everything stays as is forever"
0110 -> 3
0111 -> 3 (but everything becomes state 1)
1000 -> 2 (everything moves to the right one cell every 2 ticks and leaves something alternating on the left)
1001 -> 3
1010 -> 2 "everything alternates forever"
1011 -> 2
1100 -> 2 (everything moves to the right two cells every 2 ticks)
1101 -> 2
1110 -> 2
1111 -> 2 "everything turns on forever"
I just realized that the alternating thing on the left for 1000 and 1101 are different. The former is like

Code: Select all

111111
......
111111
......
111111
and the latter is like

Code: Select all

1.1.1.
.1.1.1
1.1.1.
.1.1.1
1.1.1.
Maybe call the first one zebra stripes and the second one checkerboard?

I realized that the CA 0010 and 0100 are like edge finders. 0010 finds the right edges of every line and moves them forming one-dot moving things and 0100 finds the left edges of every line and makes them into one-dot unmoving things. I think these are the most interesting CA of these 16. What about you? And why?

Notably, there are only a few CA where there are only a few stable objects: 0010, 0100, 1011 (but checkerboard is laid out on the left, it almost works like 0010 but with states 0 and 1 reversed), 1101 (these are like edge finders again and it works like 0100 but with states 0 and 1 reversed), and 1110.
EDIT:
1110 seems to have patterns which move one cell to the right every 2 ticks. They are noticeably slower than the moving things in 0010.

Re: [GAME] Building CA from the Ground Up

Posted: February 8th, 2025, 10:32 pm
by b-engine
LuveelVoom wrote: February 5th, 2025, 1:04 am later on Day 2
I don't know how to code, but let's consider the possible functions for a single cell with a neighborhood of itself and the left and right neighbors, and only 0 or 1 for cells. Clearly, there are 8 possible sets of these:

Code: Select all

000, 001, 010, 011, 100, 101, 110, 111
Each of these can lead to the active cell turning either on or off, so there are 2^8 or 256 possible functions with a 3-cell neighborhood, 2 values for cells, and a 1 dimensional grid.
However, since flipping 0 and 1 results in functions with the same behavior but flipped values, there are really only 2^7 or 128 different functions.
Do any of these have special properties?
Day 3
I begin to explore all functions, expect those with 000 > 1.
Turn those 8 possible sets into a binary number representing the cell state after applying the function. Turn the resulting binary into a decimal.
For example:

Code: Select all

100 = 000 001 010 011 100 101 110 111
       0   1   1   0   0   1   0   0 = 100 (decimal)
Function 100 would be like:

Code: Select all

       1
      11
     1
    11
   1
  11
 1
11
Not very interesting.

Re: [GAME] Building CA from the Ground Up

Posted: February 10th, 2025, 12:13 am
by H. H. P. M. P. Cole
b-engine wrote: February 8th, 2025, 10:32 pm Day 3
I begin to explore all functions, expect those with 000 > 1.
Turn those 8 possible sets into a binary number representing the cell state after applying the function. Turn the resulting binary into a decimal.
For example:

Code: Select all

100 = 000 001 010 011 100 101 110 111
       0   1   1   0   0   1   0   0 = 100 (decimal)
Function 100 would be like:

Code: Select all

       1
      11
     1
    11
   1
  11
 1
11
Not very interesting.
This is a very interesting concept. However, there are 2^7 = 128 possible functions. How do we investigate them all? Which ones are reflections of each other?

I decided to calculate how many unique functions are there where the 'reflection' of one rule is counted as the same as the original and then I ended up with 2*2*2*5 = 80 such functions. (I might be wrong.) My notes are below:

Code: Select all

010

101

111

001 = 100
011 = 110
001-011 = 100-110
001-110 = 100-011
(The reflection of the neighbourhood 001 is 100, and the reflection of the neighbourhood 011 is 110, and vice versa.) (EDITED to be more clear)

Re: [GAME] Building CA from the Ground Up

Posted: February 10th, 2025, 1:28 am
by b-engine
H. H. P. M. P. Cole wrote: February 10th, 2025, 12:13 am This is a very interesting concept. However, there are 2^7 = 128 possible functions. How do we investigate them all? Which ones are reflections of each other?

I decided to calculate how many unique functions are there where the 'reflection' of one rule is counted as the same as the original and then I ended up with 2*2*2*5 = 80 such functions. (I might be wrong.) My notes are below:

Code: Select all

010

101

111

001 = 100
011 = 110
001-011 = 100-110
001-110 = 100-011
(The reflection of 001 is 100, and the reflection of 011 is 110, and vice versa.)
Func * is a decimal rather than binary, therefore func 100 isn't the same as func 001.

This would be each iteration of func 001 on a single cell:

Code: Select all

......
111111
......
111111
......
-

Func 110:

Code: Select all

         1
        11
       111
      11.1
     11111
    11...1
   111..11
  11.1.111 
 1111111.1

Re: [GAME] Building CA from the Ground Up

Posted: February 10th, 2025, 1:30 am
by H. H. P. M. P. Cole
b-engine wrote: February 10th, 2025, 1:28 am Func * is a decimal rather than binary, therefore func 100 isn't the same as func 001.
No, I was talking about the neighbourhood of a cell. Sorry if I was not being clear.

Re: [GAME] Building CA from the Ground Up

Posted: February 17th, 2025, 4:26 am
by b-engine
Day 4

I found a CD in my storage room. It's labeled "LifeWiki - 311224", but I don't have a CD reader.

If I ever find a CD reader, I would email the content to anyone who asked.

-

Function 124 is exactly same as function 110, while I'm able to simulate it by hand easier without typing spaces.
15 generations of it:

Code: Select all

1
11
111
1.11
11111
1...11
11..111
111.1.11
1.1111111
111.....11
1.11....111
11111...1.11
1...11..11111
11..111.1...11
111.1.1111..111
Slightly similar to a fractal, but I suspect it doesn't.

Re: [GAME] Building CA from the Ground Up

Posted: February 17th, 2025, 7:22 am
by unname4798
Don't make a well defined description or your brain will explode.

Re: [GAME] Building CA from the Ground Up

Posted: February 17th, 2025, 8:12 am
by b-engine
b-engine wrote: February 17th, 2025, 4:26 am Function 124 is exactly same as function 110, while I'm able to simulate it by hand easier without typing spaces.
15 generations of it: Slightly similar to a fractal, but I suspect it doesn't.
Later on Day 4

This is how it would look after 300 iterations.
F124-300.png
F124-300.png (74.13 KiB) Viewed 4071 times
I used a drawing software to simulate the function. It is painfully slow…but at least worth it.

(Well, I just used LifeViewer)

Re: [GAME] Building CA from the Ground Up

Posted: February 18th, 2025, 10:59 pm
by Banananananan
Midnight, Day 5
Found this file from my old notes from 7 years ago. My phone wasn't the best so the image is a bit pixilated. It vaguely shows a 5×5 grid with off cells represented by 0 and alive cells represented by 1. I don't know anything else about the picture because I got memory loss during a car crash. Here it is:

Re: [GAME] Building CA from the Ground Up

Posted: February 19th, 2025, 7:34 am
by unname4798
Banananananan wrote: February 18th, 2025, 10:59 pm Midnight, Day 5
Found this file from my old notes from 7 years ago. My phone wasn't the best so the image is a bit pixilated. It vaguely shows a 5×5 grid with off cells represented by 0 and alive cells represented by 1. I don't know anything else about the picture because I got memory loss during a car crash. Here it is:
It's probably B1/S/@5A on a new 2D grid.

Re: [GAME] Building CA from the Ground Up

Posted: February 19th, 2025, 9:50 pm
by Banananananan
Banananananan wrote: February 18th, 2025, 10:59 pm Midnight, Day 5
Found this file from my old notes from 7 years ago. My phone wasn't the best so the image is a bit pixilated. It vaguely shows a 5×5 grid with off cells represented by 0 and alive cells represented by 1. I don't know anything else about the picture because I got memory loss during a car crash. Here it is:
7:49 am, Day 5
My roommate told me this about the file:a cell births 4 orthogonally adjacent cells then dies. If a dead cell has more than 1 neighbor it doesn’t birth.

Re: [GAME] Building CA from the Ground Up

Posted: February 20th, 2025, 11:05 am
by hotcrystal0
3:02 PM, Day 5
To: islptng@hmail.com, hppmpcole@inlook.com, hotcrystal0@cgol.ca
From: luveelvoom@example.com
Subject: an old paper

I found this while looking in my closet for old papers that might help us redevelop cellular automata. I thought I lost it in a housefire, but I found it. The problem is that several parts were either burned or rendered unintelligible. Since I am on a laptop and I don't have my phone or any other device that can take pictures right now, here's a transcript:

For [UNINTELLIGIBLE] 'glider', see Glider (disambiguation).
For other uses of 'G', se[BURNED]
The glider (or featherweight spaceship) is the smallest, most common, and first-discovered spaceship in [BURNED] diagonally across the grid at a speed of [BURNED]nt because they are easily produced (by glider guns and rakes - for an exa[BURNED]d with each other to form more [UNINTELLIGIBLE] (see glider synthesis), and can be [BURNED] distances.

[BURNED] John Conway has stated he regrets calling it a glider, saying it looks more like an ant walking across the plane.

Re: [GAME] Building CA from the Ground Up

Posted: February 20th, 2025, 6:03 pm
by b-engine
Day 6
b-engine wrote: February 17th, 2025, 4:26 am Day 4

I found a CD in my storage room. It's labeled "LifeWiki - 311224", but I don't have a CD reader.

If I ever find a CD reader, I would email the content to anyone who asked.
Found a CD reader.
Here's a part of it:
9b2o$9bo$10bo2b2o$7b3obo2bo$6bo4b2obob2o$6bob2o2bobob2o$3b2obo3b2o2bo
$3bo2b2o3bob2o$2obobo2b2obo$2obob2o4bo$3bo2bob3o$3b2o2bo$8bo$7b2o!

Tritoad is a period-3 oscillator that was found by David Buckingham in October 1977.

External links
Tritoad at the Life Lexicon
Tritoad at Adam P. Goucher's Catagolue
60P3.9 at Heinrich Koenig's Game of Life Object Catalogs
I don't know what pattern is it, and the pattern consists of an unknown encoded string.

Re: [GAME] Building CA from the Ground Up

Posted: February 20th, 2025, 7:54 pm
by H. H. P. M. P. Cole
Everyone, we're going too far. I propose we add a new rule: No references to external sources.

Remember, we don't know anything about CA other than what is in this thread.