Unexpected Change in Population Diversity of Genetic Algorithm

We have been having unexpected results in our optimization processes, using the genetic algorithm. We have found that the diversity of the population seems to increase back to the original population diversity at the beginning of the optimization process.
This appears to happen in mostly periodic steps in the generation every n generations. What seems odd is that the population immediately then collapses back to the diversity it had before the diversification.
We have had more than one script, by different users, produce the same result. We understand that the GA should change the diversity overtime, but it does not seem that the diversity should ‘explode’ for a single iteration, followed by an ‘implosion’ the next iteration.
This is demonstrated in the figure below showing the generation at a specific generation.
We are trying to optimize three integer variables with only upper and lower bounds on the variables, there is no constraints. The optimization is finding the a near optimal solution, but we want to understand why this population is diversifying periodically as a function of generation.
The same behavior is seen for different max generation counts also. Yet the period seems to change given the max generation count.
We observe the same behavior regardless of our fitness function, as can be seen below.
We have tried to change the crossover, scale and other settings, we can minimize this, but it still appears to happen. Again, it’s not so much that the population is becoming diverse, it’s the change of the magnitude of diversity over time that is our concern.
Thank you!

Answers (1)

Hi David,
The behavior is strange. It would be great to have a reproduction script if you can share since this behavior is on any function.
Please note that if you are specifying integer constraints to GA many options including crossover, mutation, etc. cannot be changed. See this note:
Can you reproduce this behavior with different bounds and dimension?
Thanks,
Rakesh

4 Comments

Hi Rakesh,
Thank you very much for your response!
I am not sure, but I think this user has also been experiencing a similar issue, though they are using a constraint.
Our compute cluster has been down the past several days. It is back up today. I can get an update to you by tonight to see if this happens with different bounds and dimensions!
I will also check to see if it may be possible to provide some sort of sample code.
Thank you again for your time Rakesh and very prompt response!
David
Hi Rakesh,
Also I just wanted to note,I would not say we have tested this to be true for ANY function, but deffintatly multiple functions.
The target functions in our calcuations are sort of related as, for example they all have been 3 parameters, both with integer and non integer numbers, but never mixed integer and non integer. Both target functions have been logistic functions (non integer search) and gaussian (integer search) functions.
Hope this helps!
Thanks!
David
Hi Rakesh,
Here is a few different plots with different bounds, generations and population.
I tried to use a different script to plot the data today, the two did not match up. But the error is the same.
I don't know I just tried this, and it appears to seem to fit. I'm at a loss as to why the order seems to be out of sync.
Any sugestions would be greatly appreaciated. One difference in the plotting functions is one (the original) saves the data to disk, while the plot from today plots in real time.
Thanks!
David
Hi David,
I agree with Rakesh - this behavior is strange.
If you could attach a reproduction script, I can run it here and take a look for you.
Cheers,
Paul

Sign in to comment.

Asked:

on 28 Jul 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!