To store the state of the CA, I use a NumPy array with one column for each cell and one row for each time step. I use the NumPy function zeros to create an array of zeros, then put a 1 in the middle o...To store the state of the CA, I use a NumPy array with one column for each cell and one row for each time step. I use the NumPy function zeros to create an array of zeros, then put a 1 in the middle of the first row. To compute the state of the CA during time step i, we have to add up consecutive elements of array and compute the parity of the sum. Each time through the loop, we select three elements from row, add them up, compute the parity, and store the result in row i.