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

Calling some function before fitness_func in adaptive mutation #299

Open
hmcezar opened this issue Aug 12, 2024 · 0 comments
Open

Calling some function before fitness_func in adaptive mutation #299

hmcezar opened this issue Aug 12, 2024 · 0 comments

Comments

@hmcezar
Copy link

hmcezar commented Aug 12, 2024

During the adaptive mutation, the fitness function is called in

def adaptive_mutation_population_fitness(self, offspring):

In my application, this is a problem because I have to normalize some optimized probabilities before computing the fitness.
So if I have g1, g2, g3, g4 as genes that are optimized with the GA, and I need sum(g1, g2, g3, g4) = 1 for my fitness function, I most likely get an error.

The way I'm doing things with random mutation is that I normalize this in my on_mutation method.
Is there a way of using adaptive mutation with such restrictions?

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

1 participant