Game of Life 生命遊戲 (I)

Conway’s Game of Life is a kind of cellular automation. It is a kind of zero-player game and it let the player to devise or modify the pattern of the cells and observe the evolution of the cells. (Wikipedia)


It has simple rules to control and evolve the cells. The rules are associated with the relationship of main cells and the surrounding eight cells :

  • Too much neighbour cells (bigger than 3 cells) around will cause the death of the main cell.
  • Less neighbour cells (smaller than 2 cells) around and the main cell died due to isolation and lacking nutrition.
  • Main cell will continue live on to next generation when there are only 3 or 2 neighbouring cells.
  • When there are 3 neighbouring cells alive which surrounded the dead cell, it will become alive again.


  • 當周遭的活細胞太多(多於三個)時造成壅擠所以主要的細胞會死亡
  • 當周遭的活細胞太少(少於四個)時,除了主要細胞因為被孤立而且缺乏營養,所以主要細胞會死亡
  • 當主要的細胞在剛剛好可以生存的狀態,也就是周遭的細胞只有兩個或三個的時候,主要細胞可以繼續存活到下一代
  • 當死亡的細胞周圍剛好有三個活細胞時,死亡的細胞會在下一代再度復活
Game of Life by Maxwell Alexius

Because of curiosity, I created the game and put it on CodePen. You can also play this game in my website. Playing with different patterns of life and the results are interesting. There are several patterns that can be discussed, such as the still patterns illustrated below which will remain still unless you add other cells to modify the pattern.


Still Lives in Game of Life

However, there are much more interesting patterns to discuss, so I will present other types of life pattern in the next article. Have fun with Conway’s Game of Life =)


Recommended : HTML5 Canvas (I)

自薦文章:HTML5 Canvas (I)