Hi,
I’m not sure if this has already been reported and fixed in the repository version (20.x), but the following bug report was submitted for the CSharp Fork that I maintain:
In the code below (from GeneVectorIndividual), you are attempting to fill “genome” instead of “newGenome” when the new length is greater than the existing length…
public void setGenomeLength(int len)
{
GeneVectorSpecies s = (GeneVectorSpecies) species;
VectorGene[] newGenome = new VectorGene[len];
System.arraycopy(genome, 0, newGenome, 0,
genome.length < newGenome.length ? genome.length : newGenome.length);
for(int x=genome.length; x< newGenome.length; x++)
if (genome[x]==null) genome[x] = (VectorGene)(s.genePrototype.clone()); // not reset
genome = newGenome;
}
Regards,
Ben
http://branecloud.codeplex.com