def cell_list_to_set(cell_list):
  """
  Golly represents a cell list as [x1, y1, ..., xN, yN]. We
  convert this to a set of the form ((x1, y1), ..., (xN, yN)).
  Checking set membership is faster than checking list
  membership.
  """
  cell_set = set()
  for i in range(0, len(cell_list), 2):
    cell_set.add((cell_list[i], cell_list[i+1]))
  return cell_set