algorithmlogicautomataconways-game-of-life

How to escape stable pattern in conway's game of life?


I built conway's game of life and its working fine but my game after many generations is either ending with no lives or reaching a stable pattern which it can't escape.

For example I have followed these rules

Any live cell with fewer than two live neighbours dies, as if by underpopulation. 
         (live_cell = True and neighourhood < 2)
Any live cell with two or three live neighbours lives on to the next generation. 
         (live_cell = True and neighourhood == 2 or neighourhood == 3)
Any live cell with more than three live neighbours dies, as if by overpopulation. 
         (live_cell = True and neighourhood > 3)
Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction. 
         (live_cell = False and neighourhood == 3)

This is my game of life matrix where 1 is life and 0 not

000000
001000
010100
001000
000000
000000

and this is its corresponding neighbourhood maps created by my programe

011100
122210
124210
122210
011100
000000

After reaching this pattern even after thousands of generation its still stuck in this pattern itself. I dont know how to escape this pattern ?


Solution

  • If the space is finite, then the number of possible configurations is finite and then the GoL will end either in a stable pattern or in a loop. If the space is very small (as it looks like) then you will observe only stupid behavior. You need at least to use a much bigger space (500x500), fill it with 1's at many places and look; that is the basic play with GoL. The next step is to build interesting configurations, and there exists a lot that have been discovered over time, for examples see GoL Pattern Library. Basic well-known patterns are gliders, glider-guns, oscillators... You will discover that GoL is in fact a very interesting way of programming: the initial configuration is a program code executed by the machine that you can see evolving on your screen. But that programming is not so easy, especially if you want to obtain a specific behavior!