This Game is a modified version of the famous "Conway's Game of Life", originally introduced by John Conway in 1970. The Rules of this game are adjusted so as to simulate Logistic Growth based on the equation,
Or more specifically,
Note it can be modified for other equations also, but for now this equation is selected.
Play the Game!
The modification on the rules of this game are my ideas, so please give credit if you are sharing :-)
Rules of the game at each step are -
- Any live cell with fewer than 2 live neighbours dies, as if by underpopulation.
- Any live cell with 2 or 3 live neighbours lives on to the next generation BUT may randomly die if net-growth < 0, as if by accidents/natural disasters.
- Any live cell with more than 4, as if by overpopulation.
- Any dead/unborn cell with 3 live neighbours becomes a live cell, as if by reproduction.
- Any dead/unborn cell with 2 live neighbours and netgrowth > 0 may randomly become alive, as if by reproduction.
The count of the number of cells follow the growth equation. 'net-growth' is referred to as 'boost' in the program. It is the "drop in no. of cells based on Conway's Orignal rules added with the expected growth from the growth equation".
To setup, first make sure you have yarn (or npm, npx..) installed!
- Download the zip or clone the repo,
git clone https://github.com/cheese-cracker/logistic-game-of-life.git && cd logistic-game-of-life
- Run
yarn start
in the root directory. - Game should be opened on your browser!
- Input any github user's contribution matrix into the game to play with!
- Simulate logistic growth to the carrying capacity K. The number of cells will grow towards K with the growth rate r.
- The 'generation' and 'count' at the bottom of the grid denote the number of iterations and the count of the active cells.
- There are play, pause and clear buttons, along with the seed button which generates a random pattern.
- Custom patterns can also be made by clicking the cells.
Cheers, CH