public ConnectionGene(ConnectionGene copy) { inNode = copy.GetInNode(); outNode = copy.GetOutNode(); weight = copy.GetWeight(); expressed = copy.IsExpressed(); innovation = copy.GetInnovation(); }
public ConnectionGene(ConnectionGene Connection) { if (Connection != null) { this.InputNode = Connection.GetInputNode(); this.OutputNode = Connection.GetOutputNode(); this.Weight = Connection.GetWeight(); this.IsEnabled = Connection.GetEnabled(); this.Innovation = Connection.GetInnovation(); } }
public override bool Equals(object obj) { if ((obj == null) || !GetType().Equals(obj.GetType())) { return(false); } else { ConnectionGene con = (ConnectionGene)obj; return(innovation == con.GetInnovation()); } }
public void AddConnection(ConnectionGene con) //Adds a connection in the genome { connectionList.Add(con.GetInnovation(), new ConnectionGene(con)); connectionKeys.Add(con.GetInnovation()); }