Improves algorithm to compute the next generation