Questions: How can I access the active population of current generation? / How can I ensure nonrepetitive individuals among the population?
See original GitHub issueHi!
I wrote my own diversity measure to be executed on every generation. I’m using the peek method to invoke my method so I can access the population via result.getPopulation() method. But by assessing the population i’ve noticed that population size increases during each evolution step. I tried to filter the population by generation and isValid method, but it didn’t seem to be correct because i’m getting a population greater than my population size parameter and there are duplicated individuals inside of it. So, here comes my questions:
How can I access the active population of current generation? How can I ensure nonrepetitive individuals among the population?
Accessing population
final Population<IntegerGene, Double> population = result.getPopulation();
This is my genotype:
Factory<Genotype<IntegerGene>> gtf = Genotype.of(IntegerChromosome.of(1, 5, (int) chromosomeSize));
=== Thank you for the library, by the way!
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (6 by maintainers)

Top Related StackOverflow Question
Good, I think #234 caused the problem.
Was using 3.8! Thought it was 3.9, sorry. Running on 3.9 everything went fine! Thanks!