When perform engine = GAEngine(..., fitness=fitness), the fitness function will be overwritten None at GAEngine.init line 135:
self.ori_fitness, self.fitness = None, None
I think maybe you can use
self.ori_fitness = None if self.fitness is None else self.fitness
instead of origin code.
When perform engine = GAEngine(..., fitness=fitness), the fitness function will be overwritten None at GAEngine.init line 135:
self.ori_fitness, self.fitness = None, None
I think maybe you can use
self.ori_fitness = None if self.fitness is None else self.fitness
instead of origin code.