Problem 45270. Game of life - 02
refer to https://en.wikipedia.org/wiki/Conway's_Game_of_Life
refer to https://www.mathworks.com/matlabcentral/cody/problems/45269-game-of-life-01
given a set of cells (the initial state) represented by 1(live) and 0(dead) , u need to find the nth state of conway's game of life.
- Compared to the previous problem, now generation of new cells outside the initial set is possible. So the set might expand after each iteration.
- toroidal board is no longer applicable.
i implemented the following assertion process (though its not a gd one) -
- place the initial set in a 100 by 100 board from the starting location (50,50).
- so if initial state is =[1,0;1,1] , its initial loc = [{50,50},{50,51};{51,50};{51,51}]
u need to find the state after nth stage.
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers4
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
47133 Solvers
-
Maintain shape of logical-index mask
68 Solvers
-
Number of 1s in a binary string
8037 Solvers
-
Given a window, how many subsets of a vector sum positive
846 Solvers
-
Justify the character string in center with proportional fonts
64 Solvers
More from this Author165
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!