Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Huge duplicated code in function unique_genes_by_space in pygad.py #125

Open
Labels
enhancementNew feature or request
@ChiHangChen

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /