Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve default value for mutation rate in BinaryGenAlgSolver #3

Open
mikeliux opened this issue Aug 16, 2020 · 1 comment
Open

Improve default value for mutation rate in BinaryGenAlgSolver #3

mikeliux opened this issue Aug 16, 2020 · 1 comment

Comments

@mikeliux
Copy link

In BinaryGenAlgSolver, the current default value for mutation rate might be too large for some problems (i.e., where a chromosome has hundreds of genes), to the point that the algorithm degenerates into a random search and cannot find optimum values within 1000 generations.

If a fixed mutation rate is going to be used and the user defines no value for this parameter, then the simplest and best initial guess would be:

self.mutation_rate= 1/self.n_genes

More info available here by MIT press

I actually produced a heatmap with different mutation_rate and selection_rate values for a couple of test functions, by computing the average minimum value reached after a fixed number of iterations. The best value for mutation_rate in this experiment was almost exactly 1/n_genes, which agrees with the recommendation given in the literature. I found no best value for 'selection_rate', most values yielded similar results.

@diogomatoschaves
Copy link
Owner

Hi @mikeliux,

Yeah that sounds like a good default value for mutation_rate! Do you want to submit a PR for that change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants