Optimiziations for game of life