# Thread: Infinite game of life

1. ## Infinite game of life

I am wondering about the Conway game of life here, if it is in theory played out on an infinite plane how can it be truly modelled, i can see that it is a simple program to write but surely if you reach the edges of your model then the states of some cells cannot be tested correctly according to the rules, i mean because they are not surrounded by the full complement of neighbour cells, so their state will change in a way they might not have otherwise and then these changes are going to filter back down into the rest of the model.

having not written a version i can only assume that the patterns often assume steady state or that you could assume that model grows indefinitely if rapid expansion continues after a defined number of iterations.

But then, in the case of Mandlebrot set if you allow for more and more iterations, more and more fine detail emerges.

2. All known patterns converge on a static system, which either repeats itself or follows a know pattern of expansion. A glider gun for example, while each new stage is technically different than all previous stages, the pattern of change is known and predictable.

3. Typically you'd consider your visible universe to be a window on a larger universe.
You display data in that window but calculate it in a larger area outside it, assuming that the edges of that area are far enough away from those of your visible area to not affect it.

4. yes clearly a window would have to be used if you planned a huge area, but what i mean is that you cannot say that 'edges being far enough away will not affect it' if the rule is that the whole area must be surveyed before applying the changes. In any case, if the known patterns never require an infinite map then its moot point

5. In any case it is a moot point, as there are infinitely expanding patterns, but they expand in highly predictable ways, which makes them easy to simulate to the nth generation without actually having to simulate each generation.

Case in point, a single line of cells which stretches tot eh edge of the world and wraps around on itself will expand infinitely, but who cares, you can easily determine exactly what generation N looks like without running the simulation N times.

6. Well i see where you are coming from like fractals once the number leaves a boundary you know its not coming back but what kind of size seed patterns have been tested with game of life? Does it always have to be 9 cells or whatever you like,random scatter

7. The question assumes that the only way to represent the Life world is as a two-dimensional array of some fixed size. That's not the only way to do it. You can keep a list of where the live cells are in terms of their world coordinates, without explicitly creating a grid.

8. but the live cells need to be referenced against their dead neighbours in order to update each generation?

9. Not really, you just need to count the live neighbors.

10. Like i say i have not written anything for this yet, i can see its quite simple to do a small working version i still dont see how (and i am not complaining here just pondering) you can escape the idea of a 2d array / area at least initially, you need to define the start conditions and then ok add your live cells to a list with their positions as properties, then i suppose you as suggested check if anything in the list has n Number of live neighbours and update list and each items 'neighbour values' accordingly, then read the list again etc