+/GENN

genetically evolving neural networks

git clone https://git.julia.blue/+/GENN

Joseph RyanFix bugs There are so many I dont want to list them here. This build may be stable but I haven't tested it yet.9e6fe89

v0.2
607 B36 linesraw
1#ifndef GENN_COMPONENTS_H
2#define GENN_COMPONENTS_H
3
4#include <vector>
5
6class Connection;
7
8class Neuron {
9public:
10    Neuron(int a, int t = 2) {
11        id = a;
12        type = t; //0 input, 1 output, 2 hidden
13    }
14
15    double value=0, sum=0;
16    int id, type;
17    std::vector<Connection *> inputs;
18};
19
20class Connection {
21public:
22    Connection(){}
23    Connection(Neuron *a, Neuron *b, double w, bool e = true) {
24        input = a;
25        output = b;
26        weight = w;
27        enabled = e;
28    }
29
30    bool enabled;
31    Neuron *input;
32    Neuron *output;
33    double weight;
34};
35
36#endif //GENN_COMPONENTS_H