(self)
return ret
String representation of Genome
String representation of Genome
String representation of Genome
def __repr__(self):
      """String representation of Genome"""
      allSlots = [self.evaluator, self.initializator, self.mutator,
                  self.crossover]

      ret = "- GenomeBase\n"
      ret += "\tScore:\t\t\t %.6f\n" % (self.score,)
      ret += "\tFitness:\t\t %.6f\n\n" % (self.fitness,)
      ret += "\tParams:\t\t %s\n\n" % (self.internalParams,)

      for slot in allSlots:
         ret += "\t" + slot.__repr__()
      ret += "\n"

      return ret
def __repr__ ( self ) : allSlots = [ self . evaluator , self . initializator , self . mutator , self . crossover ] ret = "- GenomeBase\n" ret += "\tScore:\t\t\t %.6f\n" % ( self . score , ) ret += "\tFitness:\t\t %.6f\n\n" % ( self . fitness , ) ret += "\tParams:\t\t %s\n\n" % ( self . internalParams , ) for slot in allSlots : ret += "\t" + slot . __repr__ ( ) ret += "\n" return ret