jMetalPy icon indicating copy to clipboard operation
jMetalPy copied to clipboard

Fix bug in genetic_algorithm.py in line#82 about 'mating_pool_size'.

Open zhangjc714 opened this issue 3 years ago • 0 comments

In GeneticAlgorithm.reproduction(), the upper bound of the 'for' loop should be euqal to 'self.mating_pool_size', instead of 'self.offspring_population_size'. The code works well by far because the parents number and the children number are equal in the crossover operator, but once they are not equal, the size of the corresponding offspring population will be wrong.

zhangjc714 avatar Mar 05 '22 14:03 zhangjc714