I am using JGAP library for my GA..
I am creating the chromosome like this
Gene[] genes[i] = new IntegerGene(conf,someInteger, someInteger);
Chromosome mChromosome = new Chromosome(conf, genes);
conf.setSampleChromosome(mChromosome);
But when I try to retrieve the Gene Values of the chromosome. I get null
Gene[] genes = chromosome.getGenes();
int value = (Integer)genes[someIndex].getAllele();
I found the solution
IntegerGene
is created after evolving the populationIf I tried to access the chromosome after the evolution like this
It will work