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); }
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); }