rougier/numpy-100

Game of Life - 'lifeless boundary'

ibah opened this issue · 2 comments

ibah commented

Hi,
The implementation of the Game of Life sets all the boundary cells (i.e. rows and columns indexed 0 and -1) to 0, independent of the statuses of the adjacent cells.

E.g. if the top-right corner is:
[[0,1,...],
[1,1,...],
then the cell [0,0] should be recognized as 'birth' and become '1'. Instead it is set to 0, as all cells on the boundaries.

Is it an intended behavior or should be corrected? I can add a version/correction allowing for life cells also on the boundaries.

It is intentional actually.

ibah commented

Is it a convention for the game of life on finite boards to have this 'dead zone' on the margins? I found it strange for life cells to be allowed there at the start of the game but forbidden in next generations.