davidrmiller / biosim4

Biological evolution simulator
Other
3.1k stars 435 forks source link

Neural Network Graph? #55

Open nithchin opened 2 years ago

nithchin commented 2 years ago

How do I obtain the graph of the neural network connections?

davidrmiller commented 2 years ago

Hi @nithchin , sorry that it's not well documented.

The network diagrams are made with the program graph-nnet.py in the tools directory. It expects to find a text file named net.txt in the current directory that contains one neural net in mnemonic format. You can copy a net from the simulator's stdout stream and paste it into net.txt. It's the format that looks like this:

N0 MvW -24201 Osc MvW -2446 Blr MvY -21215 Bfd MvS 30249

The output will be a .svg file in the current directory. I believe (untested) you can change the output filename in graph-nnet.py to create .png, or .ps files if you prefer.

nithchin commented 2 years ago

Thank you! It is working perfectly now!