Esempio n. 1
0
        public void AddConnection(int source, int destination, double weight)
        {
            var lg = new LinkGene(source, destination, weight);

            LinkGenotype.Add(lg);
            NodeGenotype[source].Outputs.Add(lg);
            NodeGenotype[destination].Inputs.Add(lg);
        }
Esempio n. 2
0
        private void AddConnection(int source, int destination, double weight, int innovation)
        {
            var lg = new LinkGene(source, destination, weight)
            {
                Innovation = innovation
            };

            LinkGenotype.Add(lg);
            NodeGenotype[source].Outputs.Add(lg);
            NodeGenotype[destination].Inputs.Add(lg);
        }