Example #1
0
        public static void ConnectNodes(NeuronBase fromNode, NeuronBase toNode, double weight)
        {
            Synapse s = new Synapse(fromNode, toNode, weight);

            fromNode.ForwardConnections.Add(s);

            toNode.BackwardConnections.Add(s);
        }
Example #2
0
        public Synapse(NeuronBase fromNode, NeuronBase toNode, double weight)
        {
            FromNode = fromNode;
            ToNode = toNode;

            if ((int)weight == -1)
                RandomiseWeights();
            else
                Weight = weight;
        }