What title says. I can't figure out how to pick the genome with best fitness in NEAT-Python and save it to a file, only when one hits the fitness goal in the config.
For the goal winner, I'm using a common tutorial code :
if __name__ == "__main__":
pe = neat.ParallelEvaluator(20, eval_genomes)
winner = p.run(pe.evaluate, 20)
with open('winner.pk1', 'wb') as output:
pickle.dump(winner, output, 1)