Infinite game of life

This is a discussion on Infinite game of life within the General AI Programming forums, part of the Cprogramming.com and AIHorizon.com's Artificial Intelligence Boards category; I am wondering about the Conway game of life here, if it is in theory played out on an infinite ...

  1. #1
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,438

    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. #2
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    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.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  3. #3
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    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. #4
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,438
    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. #5
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    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.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  6. #6
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,438
    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. #7
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,273
    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.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  8. #8
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,438
    but the live cells need to be referenced against their dead neighbours in order to update each generation?

  9. #9
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Not really, you just need to count the live neighbors.

  10. #10
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,438
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 2D RPG Online Game Project. 30% Complete. To be released and marketed.
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 10-28-2006, 01:48 AM
  2. C Programming 2d Array Question
    By jeev2005 in forum C Programming
    Replies: 3
    Last Post: 04-26-2006, 04:18 PM
  3. Game Of Life
    By din1983 in forum C Programming
    Replies: 20
    Last Post: 10-11-2005, 11:36 PM
  4. Game of Life - HELP!
    By Folklord* in forum C Programming
    Replies: 1
    Last Post: 01-14-2004, 04:21 AM
  5. Please help with some coding..
    By stehigs321 in forum C Programming
    Replies: 2
    Last Post: 10-27-2003, 06:44 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21