Closed leeuack closed 3 years ago
There are no hooks currently to customise this sort of behaviour in the algorithms.
What you can do is to add some sort of logging to the objective function of your problem. For instance, you can keep a list/dictionary in your problem state that tracks the fitnesses of the decision vectors that are being evaluated.
You can recover your original problem instance from the general pygmo.problem
interface using the extract
methods:
https://esa.github.io/pygmo2/problem.html#pygmo.problem.extract
Thank you for your swift reply. I understand to add logging and extract it! It was very helpful!
Is your feature request related to a problem? Please describe. While using SGA or other evolutionary algorithms, users may not access each generation's champion_x now. So now it is hard to visualize the process of evolution. Even users set verbosity and extract some logs, they only store the best fitness values of each generation.
Describe the solution you'd like Can users have an optional function to record each gen's champion_x? Is there any way to extract each generation's champion_x?
Best,