예제 #1
0
	def writePopulation(self, population, popCount, popDec, ofValues, ffValues):
		'''Deprecated'''
		self.log.write('|' + str(popCount) + '|Chromesome|Decimal|Objetive|Fitness|\n')
		self.log.write('|---|---|---|---|---|\n')
		for x in xrange(0, len(population)):
			self.log.write('|' + str(x))
			self.log.write('|' + str(chrToString(population[x])))
			self.log.write('|' + str(popDec[x]))
			self.log.write('|' + str(ofValues[x]))
			self.log.write('|' + str(ffValues[x]) + '|\n')
		self.log.write('---\n')
예제 #2
0
	def reportChampion(self, champion, championObj, championPop ):
		self.log.write('Best Chromosome:\t' + chrToString(champion) + 
			'\nDecimal Value:\t' + str(int(chrToString(champion), 2)) + 
			'\nObjetive:\t' + str(championObj) +
			'\nPopulation:\t' + str(championPop))
예제 #3
0
	def reportChampion(self, champion, championObj, championPop ):
		'''Writes the information of the best Chromosome of the running'''
		self.log.write('Best Chromosome:\t' + chrToString(champion) + 
			'\nDecimal Value:\t' + str(int(chrToString(champion), 2)) + 
			'\nObjetive:\t' + str(championObj) +
			'\nPopulation:\t' + str(championPop))