+/GENN
genetically evolving neural networks
git clone https://git.julia.blue/+/GENN
cc48e92
master
1#ifndef GENN_NETWORK_H 2#define GENN_NETWORK_H 3 4#include "Genome.h" 5#include <cmath> 6 7struct Neuron { 8Neuron (int a ) { 9id = a ; 10 } 11 12int id = -1 ; 13double value = 0 ,sum = 0 ; 14}; 15 16struct Connection { 17Connection (double a ) { 18weight = a ; 19 } 20 21Neuron * in ; 22Neuron * out ; 23double weight ; 24}; 25 26class Network { 27private : 28double sigmoid (double ); 29 30std ::vector < Neuron *> inputs ; 31std ::vector < Neuron *> hiddenNodes ; 32std ::vector < Neuron *> outputs ; 33std ::vector < Connection > structure ; 34public : 35Network (Genome & ); 36 37~ Network (); 38 39void propagate ( double * , double * ); 40 41void reset (); 42}; 43 44 45#endif //GENN_NETWORK_H