Difference between revisions of "Conway's game of life"
(Created page with "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, typi...") |
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. |
+ | == 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 alive and has 2 or 3 neighbors |
||
Is dead and has exactly 3 neigbors |
Is dead and has exactly 3 neigbors |
||
− | An example implementation in BASIC can be found |
+ | An example implementation in BASIC can be found [https://wiki.segger.com/BASIC_programming_language#Conway.27s_game_of_life here]. |
Revision as of 14:55, 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.
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 neigbors
An example implementation in BASIC can be found here.