Skip to content

The Game of Life is cellular automation, a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input.

Notifications You must be signed in to change notification settings

zenithexpo/GameOfLife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GameOfLife

Rule: A given cell (i, j) in the simulation is accessed on a grid [i][j], where i and j are the row and column indices, respectively. The value of a given cell at a given instant of time depends on the state of its neighbors at the previous time step. Conway’s Game of Life has four rules.
If a cell is alive and has fewer than two neighbors that are alive, it turns dead
If a cell is alive and has either two or three neighbors that are alive, it remains alive.
If a cell is alive and has more than three neighbors that are alive, it turns dead.
If a cell is dead and has exactly three neighbors that are alive, it turns alive.

Algorithm

  1. Initialize the cells in the grid.
  2. At each time step in the simulation, for each
    cell (i, j) in the grid, do the following:
    a. Update the value of cell (i, j) based on its neighbors, taking into account the boundary conditions.
    b. Update the display of grid values.

resources: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
https://nicholasrui.com/2017/12/18/convolutions-and-the-game-of-life/

About

The Game of Life is cellular automation, a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages