Exemple #1
0
 public int Init(int numInputsPerNeuron, int numNeurons, NeuronLayer parent, double mutationRate)
 {
     for (int iNeurom = 0; iNeurom < numNeurons; iNeurom++)
     {
         AddNeuron().Init(numInputsPerNeuron, parent.GetNeuron(iNeurom), mutationRate);
     }
     return numNeurons;
 }
Exemple #2
0
 public int Init(int numInputsPerNeuron, int numNeurons, NeuronLayer parent, double mutationRate)
 {
     for (int iNeurom = 0; iNeurom < numNeurons; iNeurom++)
     {
         AddNeuron().Init(numInputsPerNeuron, parent.GetNeuron(iNeurom), mutationRate);
     }
     return(numNeurons);
 }
Exemple #3
0
        public int Init(int numInputsPerNeuron, int numNeurons, NeuronLayer mum, NeuronLayer dad, double mutationRate)
        {
            int iSplit = Util.Random(numNeurons);

            for (int iNeurom = 0; iNeurom < numNeurons; iNeurom++)
            {
                if (iNeurom < iSplit)
                {
                    AddNeuron().Init(numInputsPerNeuron, mum.GetNeuron(iNeurom), mutationRate);
                }
                else
                {
                    AddNeuron().Init(numInputsPerNeuron, dad.GetNeuron(iNeurom), mutationRate);
                }
            }
            return(numNeurons);
        }
Exemple #4
0
        public int Init(int numInputsPerNeuron, int numNeurons, NeuronLayer mum, NeuronLayer dad, double mutationRate)
        {
            int iSplit = Util.Random(numNeurons);

            for (int iNeurom = 0; iNeurom < numNeurons; iNeurom++)
            {
                if (iNeurom < iSplit)
                    AddNeuron().Init(numInputsPerNeuron, mum.GetNeuron(iNeurom), mutationRate);
                else
                    AddNeuron().Init(numInputsPerNeuron, dad.GetNeuron(iNeurom), mutationRate);
            }
            return numNeurons;
        }