Ejemplo n.º 1
0
 /// <summary>
 /// Add a specific connection between from Gene  and to Gene with a given weight
 /// </summary>
 /// <param name="from"></param>
 /// <param name="to"></param>
 /// <param name="weight"></param>
 public void AddConnection(Gene from, Gene to, float weight)
 {
     ConnectionGene c = population.GetConnection(from, to, weight);
     //if (!from.HasConnection(c))
     {
         from.AddConnection(c);
         to.AddInput();
         connections.Add(c.GetID(), c);
     }
 }