[Solved]Game Life 1 Game Life Cellular Automaton Devised John Horton Conway 1970 Basically Zero Pl Q37061010

Game of Life #1 The “Game of Life” is a cellular automaton devised by John Horton Conway in 1970 Basically it is a zero-player game, which takes an initial state and simply evolves by itself. No further input is required. It starts with an infinite tv orthogonal grid of square cells, each of which is in one of two possible states, alive or dead. Every cell interacts with its 8 neighbours. At each step in time, its state depends on the number of its alive neighbours. sional The Game of Life rules: Any live cell with fewer than 2 live neighbours dies, as if caused by underpopulation. Any live cell with 2 or 3 live neighbours lives on to the next generation. Any live cell with more than 3 live neighbours dies, as if by overpopulation. Any dead cell with exactly 3 live neighbours becomes a live cell, as if by reproduction. Implement a function which takes a NumPy array p of shape 3×3. Each element is in the format of int, 1 indicates a live cell, and o means a dead cell. Please output if the central cell is a live cell or not at the next iteration For example, if the input is the following array: array(t 1, e, e e, 1 e 11, dtype-‘int’) Your output should be True since there are exactly 3 live neighbours, as if by reproduction. Your solution: XLI ESET 1 import numpy as np 3 def central_cell_is_alive(p): 5 ### START YOUR C00E HERE “”” 7 #### END YOUR CODE HERE #### decisionTrue return decision Show transcribed image text Game of Life #1 The “Game of Life” is a cellular automaton devised by John Horton Conway in 1970 Basically it is a zero-player game, which takes an initial state and simply evolves by itself. No further input is required. It starts with an infinite tv orthogonal grid of square cells, each of which is in one of two possible states, alive or dead. Every cell interacts with its 8 neighbours. At each step in time, its state depends on the number of its alive neighbours. sional The Game of Life rules: Any live cell with fewer than 2 live neighbours dies, as if caused by underpopulation. Any live cell with 2 or 3 live neighbours lives on to the next generation. Any live cell with more than 3 live neighbours dies, as if by overpopulation. Any dead cell with exactly 3 live neighbours becomes a live cell, as if by reproduction. Implement a function which takes a NumPy array p of shape 3×3. Each element is in the format of int, 1 indicates a live cell, and o means a dead cell. Please output if the central cell is a live cell or not at the next iteration For example, if the input is the following array: array(t 1, e, e e, 1 e 11, dtype-‘int’) Your output should be True since there are exactly 3 live neighbours, as if by reproduction. Your solution: XLI ESET 1 import numpy as np 3 def central_cell_is_alive(p): 5 ### START YOUR C00E HERE “”” 7 #### END YOUR CODE HERE #### decisionTrue return decision
Expert Answer
Answer to Game of Life #1 The “Game of Life” is a cellular automaton devised by John Horton Conway in 1970 Basically it is a zero-… . . .
OR

