Exemple #1
0
    // 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);
    }
Exemple #2
0
 // On Start up create the network.
 void Start()
 {
     Network     = new NeuralNetworkAttempt(layers);
     layers [0] += 3;
     Network.Mutate();
 }