GeneticAlgorithmPython
GeneticAlgorithmPython copied to clipboard
Huge duplicated code in function `unique_genes_by_space` in `pygad.py`
Hi, I am refactoring pygad.py
I wonder why there are lots of duplicate code in function unique_genes_by_space, which the function unique_int_gene_from_range are mostly use same arguments in the function unique_genes_by_space.
I saw some comment such as # self.mutation_by_replacement after argument mutation_by_replacement, not sure if this should replace the argument value if build_initial_pop==True
Also, the argument build_initial_pop seems useless in this function, may I know the logic inside of it to prevent any logical changed when I am refactoring?
Thanks!
The refactor progress is here: https://github.com/ChiHangChen/GeneticAlgorithmPython Hope it can be merged when I am done to help this library much more easier to develop and improve.
@ChiHangChen,
This is a major objective to meet over time.