How to count the sum of all eight neighbors for this table?:
At first I thought about something like that:
table = np.random.choice(stan, 100*100, p=[0.2, 0.8]).reshape(100, 100)I started to create a Game of Life and I have problem with it.
At first I thought about something like that:
for i in range(N): for j in range(N): S = table[i-1][j-1]+table[i][j-1]+table[i+1][j-1] +table[i-1][j]\ +table[i+1][j]+table[i-1][j+1]+table[i][j+1]+table[i+1][j+1]