def main(score): # make a new population suitable to evolve this particular score population = Population(score) fitness = -100000000000 # some rediculous arbitrarily low fitness count = 0 generation = 0 while fitness < terminationFitness: population.develop() population.evaluate() population.nextGen() fitness = population.fittest.fitness generation += 1 print('generation #', generation) print('highest fitness', fitness) population.fittest.phenotype.write( "musicxml", "output/threevoice/generation" + str(generation) + ".xml")
def debug(score): # score.show() p = Population(score) p.develop() p.evaluate() p.nextGen()