Use the 'popcorn' method to determine when to stop optimizing.