Difference between revisions of "Conway's game of life"
m |
m |
||
Line 1: | Line 1: | ||
Conways's game of life is simulation of the evolution of a population of simple organisms. Every pixel represents one cell and can have one of 2 states: Present or empty, typically represented by 1 and 0, and an illuminated or black pixel. |
Conways's game of life is simulation of the evolution of a population of simple organisms. Every pixel represents one cell and can have one of 2 states: Present or empty, typically represented by 1 and 0, and an illuminated or black pixel. |
||
+ | Conways's game of life is a simulation of the evolution of a population of simple organisms. Every pixel represents one cell and can be in one of 2 states: Present(alive) or empty(dead), typically represented by 1 and 0, and an illuminated or black pixel. The rules for each generation are quite simple. |
||
== Rules == |
== Rules == |
||
The rules for each generation are quite simple: The organism will be alive in the next generation if it either |
The rules for each generation are quite simple: The organism will be alive in the next generation if it either |
||
Is alive and has 2 or 3 neighbors |
Is alive and has 2 or 3 neighbors |
||
− | Is dead and has exactly 3 |
+ | Is dead and has exactly 3 neighbors |
An example implementation in BASIC can be found [https://wiki.segger.com/BASIC_programming_language#Conway.27s_game_of_life here]. |
An example implementation in BASIC can be found [https://wiki.segger.com/BASIC_programming_language#Conway.27s_game_of_life here]. |
Latest revision as of 14:57, 4 July 2019
Conways's game of life is simulation of the evolution of a population of simple organisms. Every pixel represents one cell and can have one of 2 states: Present or empty, typically represented by 1 and 0, and an illuminated or black pixel. Conways's game of life is a simulation of the evolution of a population of simple organisms. Every pixel represents one cell and can be in one of 2 states: Present(alive) or empty(dead), typically represented by 1 and 0, and an illuminated or black pixel. The rules for each generation are quite simple.
Rules
The rules for each generation are quite simple: The organism will be alive in the next generation if it either
Is alive and has 2 or 3 neighbors Is dead and has exactly 3 neighbors
An example implementation in BASIC can be found here.