(self)
return ret
Returns the string representation of the population
Returns the string representation of the population
Returns the string representation of the population
def __repr__(self):
      """ Returns the string representation of the population """
      ret = "- GPopulation\n"
      ret += "\tPopulation Size:\t %d\n" % (self.popSize,)
      ret += "\tSort Type:\t\t %s\n" % (Consts.sortType.keys()[Consts.sortType.values().index(self.sortType)].capitalize(),)
      ret += "\tMinimax Type:\t\t %s\n" % (Consts.minimaxType.keys()[Consts.minimaxType.values().index(self.minimax)].capitalize(),)
      for slot in self.allSlots:
         ret += "\t" + slot.__repr__()
      ret += "\n"
      ret += self.stats.__repr__()
      return ret
def __repr__ ( self ) : ret = "- GPopulation\n" ret += "\tPopulation Size:\t %d\n" % ( self . popSize , ) ret += "\tSort Type:\t\t %s\n" % ( Consts . sortType . keys ( ) [ Consts . sortType . values ( ) . index ( self . sortType ) ] . capitalize ( ) , ) ret += "\tMinimax Type:\t\t %s\n" % ( Consts . minimaxType . keys ( ) [ Consts . minimaxType . values ( ) . index ( self . minimax ) ] . capitalize ( ) , ) for slot in self . allSlots : ret += "\t" + slot . __repr__ ( ) ret += "\n" ret += self . stats . __repr__ ( ) return ret