/
Types.js
50 lines (47 loc) · 1.06 KB
/
Types.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
a node can be either a NEURON or a SENSOR
a NEURON is a node with incomming connections
for activation (an output or hidden neuron)
a SENSOR is a node that is given a value to output,
(an input or bias neuron)
*/
let nodeTypes = {
NEURON: 0,
SENSOR: 1
};
/*
different types of places a node can be in
in a network. Bias is used as a seprate input
node. Its input value will always be the same, 1.
The computation is the same, but this method allows for
evolution to take care of either or not to add bias to a
node, as it may not be necessary. It allows for a minimal
search space
*/
let nodePlaces = {
INPUT: 0,
BIAS: 1,
HIDDEN: 2,
OUTPUT: 3
};
/*
possible innovation types in a genome,
this helps with checking if a mutation
already has occurred in the population
*/
let innovTypes = {
NEWCONNECTION: 0,
NEWNODE: 1
};
/*
all the activations the node can choose from,
user can put more here if desired
*/
let activationTypes = [
Activation.sigmoid,
Activation.linearActivation,
Activation.binaryStep,
Activation.TanH,
Activation.ReLU,
Activation.leakyReLU
];