1

So, I have this piece of code that runs a simulation using NEAT, and it returns the best model that it found, where winner is the object

p=neat.Population(config)
p.add_reporter(neat.StdOutReporter(True))
stats=neat.StatisticsReporter()
p.add_reporter(stats)
winner=p.run(main,15)
print(winner)

and it outputs this in the console

Key: 6
Fitness: 3.5000000000000018
Nodes:
        0 DefaultNodeGene(key=0, bias=-0.02570084589664851, response=1.0, activation=tanh, aggregation=sum)
Connections:
        DefaultConnectionGene(key=(-3, 0), weight=3.2698030359194825, enabled=True)
        DefaultConnectionGene(key=(-2, 0), weight=0.6053192972758289, enabled=True)
        DefaultConnectionGene(key=(-1, 0), weight=0.8170132580862841, enabled=True)

and because Im new in this stuff, I would love to see the neural network and how it looks like. I already made up that it could be done by just drawing it on the screen. Is that a good approach? And if yes, how do I know which node connects to what node from the stuff that the console outputed. Also what I know is that I have 3 input, 1 output and PROBABLY one bias node. Please help!

Karafakeu
  • 23
  • 6

0 Answers0