Calling some function before fitness_func in adaptive mutation
During the adaptive mutation, the fitness function is called in https://github.com/ahmedfgad/GeneticAlgorithmPython/blob/0e8be9d61070df832ab89cae993e8827567d1184/pygad/utils/mutation.py#L473
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?
Unfortunately adding restrictions over all the genes is not possible at the moment. Restrictions are set at the gene level.