+/GENN
genetically evolving neural networks
git clone https://git.julia.blue/+/GENN
ba3e27e
v0.2
1#ifndef GENN_GENOME_H 2#define GENN_GENOME_H 3 4#include "math.h" 5#include <sstream> 6#include <stdlib.h> 7#include "Components.h" 8 9class Genome { 10public : 11std ::vector < Connection *> structure ; 12std ::vector < Neuron *> nodes ; 13int inputs ,outputs ,totalNodes ,totalConnections ; 14double mutationRates [7 ]; 15double fitness = 0 ,adjustedFitness = 0 ; 16 17double sigmoid (double ); 18 19Genome (std ::string ); 20 21Genome (int ,int ,double []); 22 23~ Genome (); 24 25void propagate ( double * , double * ); 26 27std :: string encode (); 28 29void decode ( std ::string); 30 31void recomputeInputs (); 32 33bool hasConnection ( int , int ); 34 35void reset (); 36 37static bool compare ( Genome * a, Genome * b) { return (a -> fitness > b -> fitness ); } 38 39//deletes disabled connections 40void clean (); 41}; 42 43 44#endif //GENN_NETWORK_H