// This is used to create a copy of a neural network from an existing network. public NeuralNetworkAttempt(NeuralNetworkAttempt copyNetwork) { this.layers = new int[copyNetwork.layers.Length]; for (int i = 0; i < copyNetwork.layers.Length; i++) { this.layers [i] = copyNetwork.layers [i]; } InitNeurons(); InitWeights(); CopyWeights(copyNetwork.weights); }
// On Start up create the network. void Start() { Network = new NeuralNetworkAttempt(layers); layers [0] += 3; Network.Mutate(); }