public static PerceptronInfo CreateClassicPerceptron(double minWeight, double maxWeight, params int[] net)
        {
            PerceptronInfo perceptron = new PerceptronInfo(minWeight, maxWeight);

            for (int l = 0; l < net.Length; l++)
            {
                LayerInfo layer = l < net.Length - 1 ?
                                  LayerInfo.CreateLayerWithBias :
                                  LayerInfo.CreateDefaultLayer;
                for (int n = 0; n < net[l]; n++)
                {
                    layer.AddNeuron(NeuronInfo.CreateDefaultNeuron);
                }
                perceptron.AddLayer(layer);
            }
            return(perceptron);
        }
        public Perceptron(PerceptronInfo info)
        {
            // Create perceptron
            layers = new Layer[info.layers.Count];

            layers[0] = new Layer(new InputLayer(info.layers[0]));

            for (int i = 1; i < layers.Length - 1; i++)
            {
                layers[i] = new Layer(new HiddenLayer(info.layers[i]));
            }

            layers[layers.Length - 1] = new Layer(new OutputLayer(info.layers[info.layers.Count - 1]));

            // Set connections
            for (int i = 0; i < layers.Length - 1; i++)
            {
                for (int j = 0; j < layers[i].neurons.Length; j++)
                {
                    layers[i].neurons[j].SetConnections(layers[i + 1].neurons, info.minWeight, info.maxWeight);
                }
            }
        }