def __init__(self, *args, **kwargs): """ x0 is assumed to be an array, but then converted to a tuple. The algorithm returns all individuals in the Pareto-front (and their fitnesses). """ GA.__init__(self, *args, **kwargs) self.bestEvaluation = [] self.bestEvaluable = [tuple(self.x0)] self.fitnesses = {}
def __init__(self, *args, **kwargs): """ x0 is assumed to be an array, but then converted to a tuple. The algorithm returns all individuals in the Pareto-front (and their fitnesses). """ GA.__init__(self, *args, **kwargs) self.bestEvaluation = [] self.bestEvaluable = [tuple(self.x0)] self.fitnesses = {}
def mutated(self, indiv): return tuple(GA.mutated(self,array(indiv)))
def initPopulation(self): if self.startPop == None: GA.initPopulation(self) self.currentpop = map(tuple, self.currentpop) else: self.currentpop = self.startPop
def mutated(self, indiv): return tuple(GA.mutated(self, array(indiv)))
def initPopulation(self): if self.startPop == None: GA.initPopulation(self) self.currentpop = map(tuple, self.currentpop) else: self.currentpop = self.startPop