UnitOptimizer: Switched from vector to deque for storing the population because of the more efficient reallocation