예제 #1
0
        public override INeuralNet GetNeuralNet()
        {
            var neuralNet = new RMP_Net();

            neuralNet.ImprintGenome(this);

            return(neuralNet);
        }
예제 #2
0
        public override void Load(BinaryReader r, uint id)
        {
            base.Load(r, id);

            Net    = BinarySerializable.GetObject <RMP_Net>(r);
            GeneID = r.ReadUInt32();

            Bias = r.ReadDouble();

            SigmoidFunction = BinarySerializable.GetObject <SigmoidFunction>(r);

            Activation = r.ReadDouble();
            Output     = r.ReadDouble();

            LoadListInfo(Connections, r);
        }
예제 #3
0
        public void ImprintGene(RMP_ConnectionGene gene, RMP_Neuron source, RMP_Net net)
        {
            RMP_Neuron target;

            if (gene.IsOutputConnection)
            {
                target = net.OutputNeurons[gene.Target];
            }
            else
            {
                target = net.HiddenNeurons[gene.Target];
            }

            Source = source;
            Target = target;

            Weight = gene.Weight.Value;
        }
예제 #4
0
        public static RMP_Connection GetConnectionFromGene(RMP_ConnectionGene gene, RMP_Neuron source, RMP_Net net)
        {
            var connection = new RMP_Connection();

            connection.ImprintGene(gene, source, net);

            return(connection);
        }
예제 #5
0
 public RMP_OutputNeuron(RMP_Net net)
     : base(net)
 {
 }
예제 #6
0
 public RMP_InputNeuron(RMP_Net net)
     : base(net)
 {
     iConnections = new CastingList <IConnection>(Connections);
 }
예제 #7
0
 public RMP_Neuron(RMP_Net net)
     : base("RMP_Neuron")
 {
     Net         = net;
     Connections = new List <RMP_Connection>();
 }