CGOL Algebraic Equation

For general discussion about Conway's Game of Life.
Post Reply
dakoder
Posts: 3
Joined: January 2nd, 2020, 3:54 pm

CGOL Algebraic Equation

Post by dakoder » December 29th, 2020, 8:56 am

Hello all, just thought I would share my equation for conways game of life, I am sure someone here may find it interesting.

https://uk.mathworks.com/matlabcentral/ ... e-equation

Happy holidays

Graham

Yoel
Posts: 394
Joined: July 2nd, 2020, 1:02 am
Location: Electronic jungle
Contact:

Re: CGOL Algebraic Equation

Post by Yoel » February 15th, 2021, 7:07 pm

Can you explain, please, what do these variables mean exactly?

dakoder
Posts: 3
Joined: January 2nd, 2020, 3:54 pm

Re: CGOL Algebraic Equation

Post by dakoder » February 17th, 2021, 1:43 pm

Hi Yoel, thanks for showing an interest.
The equation is similar to the "Langtons Ant Wave Equation" https://viewer.mathworks.com/?viewer=pl ... &embed=web
and uses the same one dimensional vector state space ( a flat torus ) so "z" in CGOL is the same as "Psi_d" in LAWE, "Psi_d" holds integers -1,0 and +1 as elements, but in "z" it holds 0 or 1 (black or white square) so z = (Psi_d + 1) / 2 if you wanted to share the same data and state space across both cellular automata.

In CGOL the ant does not rotate but simply moves along the vector z one element at a time until the entire vector has been processed (this is a frame) and each frame generates a new state space.

The Top equation simply sums up all the surrounding area of the "Ant" using a linear mapping of y=mx+c such that "mx" is the y axis co-ordinate and "c" is the x axis co-ordinate and "mx+c" is the index into the vector "z" where "z" holds all of the binary squares, so a chess board would be y=0*x + 0 for the top left corner and y=4*8+4 for the middle of the board and y=7*8+8 or 8*8 for the bottom right square

The bottom equation has two parts and is mutually exclusive such that if n indexes into z ie z_n

z_n = 0 ( a black square ) then LHS=0 and RHS function is used
z_n = 1 ( a white square) then LHS function is processed and RHS=0

The LHS and RHS in the bottom equation simply converts the sum "theta" (top equation) into angular (radian) components (hence theta is used) and scales them such that rounding the phase shift leaves either a zero or one which is then injected back into the state space "z" these two functions compute the current cell, note the top equation sums up 9 squares (includes the center where the ant is) so this is removed hence "z_n" is subtracted in the LHS and RHS equations leaving a sum of 8 elements surrounding the ant.

btw, the LHS on its own and summing up only the three cells above will also give wolframs eca rule 30 and several other variants depending on the phase offset, its interesting that RULE30, langtons ant and cellular automata can be defined using the same equations but with different angular components.


recap:

x^2 is the area of the state space, set x to 8 if you want 64 pixles
z and zprime are the same thing, you could use z(t,*) where t is the time step of multiple state spaces and * is 1 to 64 for a 8x8 board, that way you could make a 3d evolving cgol, (I will do that next weekend and upload the code)

n is a loop from first pixle to last pixle, 64 loops for a chessboard, it is a line calculation.
k is how many frames you want, each frame is a surface calculation.
theta(t+1)=theta(t)+z(m*x+c) a linear index to the state space is summed, thus Delta Theta = z(mx+c), c = left/right and m = up/down, x is the size of the edge of the lattice

I wish I could explain it better, perhaps someone will take this algorithm and present it in a more friendly way because after reading what I have just written I am more confused than I was earlier.

topalogically speaking, z is a long piece of string, wrap it around a cylinder, draw your cgol then unravel the string and each pixle will be a black or white mark on the string somwhere, for chessboard there should be 64 dots along the string.

Thank you again for asking.


Graham

Yoel
Posts: 394
Joined: July 2nd, 2020, 1:02 am
Location: Electronic jungle
Contact:

Re: CGOL Algebraic Equation

Post by Yoel » February 24th, 2021, 4:20 pm

Eh... wait a second. How can one-dimensional vector space be a torus? I think I understand what you mean, but it sounds like a finite ring, not a torus.

As far as I understand, your formula only works for finite patterns. Almost all patterns in Life are theoretically infinite, which enables Turing-completeness, among other things.

dakoder
Posts: 3
Joined: January 2nd, 2020, 3:54 pm

Re: CGOL Algebraic Equation

Post by dakoder » February 26th, 2021, 4:44 pm

Yes it is a finite ring but I think it is more fully described as a https://en.wikipedia.org/wiki/Solenoid_(mathematics), its a recurrence relation so a closed form should be possible (not as easy as it sounds since it contains a discontinuity in the indices and taking limits became messy so gave up, maybe someone here might be able to ?) either way at least it is an equation and can be iterated just like Fibonaccii can.
If anyone makes headway with this I would love to hear about it :-)

Post Reply