def update(self):
     results = fitness.calc_fitness_candidates(self.queue, self.fitness_args)
     with open(self.outfile, "a") as file:
         for i in range(len(results)):
             s = repr(results[i]) + ", " + repr(self.queue[i])
             logger.info(s)
             file.write(s + "\n")
             if results[i] > self.best[1]:
                 self.best = (self.queue[i], results[i])
     self.queue = []
 def calculate_energies(self, state_list):
     return fitness.calc_fitness_candidates(state_list, self.fitness_args)