コード例 #1
0
        public void AddNeuron(CPPNNetworkNeuron neuron)
        {
            Neurons.Add(neuron);

            if (neuron is CPPNInputNeuron)
            {
                inputNeurons.Add((CPPNInputNeuron)neuron);
            }
            else if (neuron.GetType() == typeof(CPPNOutputNeuron))
            {
                outputNeuron = (CPPNOutputNeuron)neuron;
            }
            else if (neuron.GetType() == typeof(CPPNHiddenNeuron))
            {
                hiddenNeurons.Add((CPPNHiddenNeuron)neuron);
            }
        }
コード例 #2
0
        public void Update()
        {
            switch (Type)
            {
            case CPPNNeuronType.Input:
                Phene = new CPPNInputNeuron();
                break;

            case CPPNNeuronType.Output:
                Phene = new CPPNOutputNeuron(ActivationFunction.Function);
                break;

            case CPPNNeuronType.Hidden:
                Phene = new CPPNHiddenNeuron(ActivationFunction.Function);
                break;

            case CPPNNeuronType.Bias:
                Phene = new CPPNBiasNeuron();
                break;
            }
        }
コード例 #3
0
        public void Update()
        {
            switch (Type)
            {
                case CPPNNeuronType.Input:
                    Phene = new CPPNInputNeuron();
                    break;

                case CPPNNeuronType.Output:
                    Phene = new CPPNOutputNeuron(ActivationFunction.Function);
                    break;

                case CPPNNeuronType.Hidden:
                    Phene = new CPPNHiddenNeuron(ActivationFunction.Function);
                    break;

                case CPPNNeuronType.Bias:
                    Phene = new CPPNBiasNeuron();
                    break;
            }
        }
コード例 #4
0
        public void AddNeuron(CPPNNetworkNeuron neuron)
        {
            Neurons.Add(neuron);

            if (neuron is CPPNInputNeuron)
            {
                inputNeurons.Add((CPPNInputNeuron)neuron);
            }
            else if (neuron.GetType() == typeof(CPPNOutputNeuron))
            {
                outputNeuron = (CPPNOutputNeuron)neuron;
            }
            else if (neuron.GetType() == typeof(CPPNHiddenNeuron))
            {
                hiddenNeurons.Add((CPPNHiddenNeuron)neuron);
            }
        }