public void AddResult(int point, double[] input) { gamesPlayedCount++; var sig = new SigmoidFunction(); var result = 0; if (point == -1) { gamesLostCount++; } else if (point == 0) { gamesTiedCount++; result = 1; } else { result = 2; gamesWonCount++; } for (int i = 0; i < weights.Length; i++) { Weights[i] += sig.Derivative(Weights[i]) * (result - Weights[i]); } biasWeight += sig.Derivative(biasWeight) * (biasWeight); }