class NeuralNetwork { constructor(numInputs, numOutputs, numHiddenLayers, numNeuronsPerHiddenLayer) { this.numInputs = numInputs; this.numOutputs = numOutputs; this.numHiddenLayers = numHiddenLayers; this.numNeuronsPerHiddenLayer = numNeuronsPerHiddenLayer; this.bias = 0.0; this.activationResponse = 1.0; this.neuronLayers = []; this.createNetwork(); } createNetwork() { //create the layers of the network if (this.numHiddenLayers > 0) { //create first hidden layer var firstHiddenLayer = new NeuronLayer(this.numNeuronsPerHiddenLayer, this.numInputs); this.neuronLayers.push(firstHiddenLayer); for (var i=0; i