neat-python icon indicating copy to clipboard operation
neat-python copied to clipboard

Statistics

Open LucasColas opened this issue 4 years ago • 0 comments

Hello when I run my code here is what I get in my console : [-1.0, 1.0, 1.0, 1.0, -1.0] [-1.0, 1.0, 1.0, -1.0, -1.0] [-1.0, -1.0, -1.0, 1.0, -1.0] [-1.0, -1.0, 1.0, 1.0, -1.0] [1.0, -1.0, 1.0, -1.0, -1.0] [-0.9999999999999994, -1.0, 1.0, 1.0, -1.0] [1.0, 1.0, 1.0, -1.0, 1.0] [1.0, 1.0, -1.0, 1.0, -1.0] [1.0, 1.0, -1.0, 1.0, -1.0] [-1.0, 1.0, -1.0, 0.0, 1.0] [-1.0, 1.0, 1.0, 1.0, -1.0] [-1.0, 1.0, 1.0, -1.0, -1.0] [1.0, -1.0, -1.0, 1.0, 1.0] [-1.0, -1.0, 1.0, 0.0, -1.0] [1.0, -1.0, -1.0, 1.0, 1.0] [-1.0, -1.0, -1.0, -1.0, -1.0] [1.0, -1.0, -1.0, -1.0, 1.0]

My code :

def run(config_path):
    max_gen = 150
    config = neat.config.Config(neat.DefaultGenome, neat.DefaultReproduction, neat.DefaultSpeciesSet,
    neat.DefaultStagnation, config_path)

    p = neat.Population(config)

    #Stats
    stats = neat.StatisticsReporter()
    p.add_reporter(neat.StdOutReporter(True))
    p.add_reporter(stats)

    winner = p.run(main, max_gen)
if __name__ == "__main__":
    local_dir = os.path.dirname(__file__)
    config_path = os.path.join(local_dir, "NeatConfig.txt")
    run(config_path) 

LucasColas avatar May 05 '20 15:05 LucasColas