Replies: 1 comment 2 replies
-
That is another good feature from your side. Thanks Rainer! Such feature will be supported in the next release. For
I think it would be the first option but just to get your idea clearly. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I read about the on_generation parameter, which allows to write a user defined function. This is a very useful method and underlines conceptual aspects of pygad. Stopping based on a rule, skipping remaining generations, is possible through this.
But I would think of two ways to implement exit criteria. A) Some examples in the documentation or B) maybe beyond some presented logic some internal criteria.
exit_criteria=None
All generations are executed (default), the user might want to exit on his own desire using on_generation (function)
exit_criteria="seen_20"
The execution would stop after 20% of all combinatorical (precision) gene variations have been seen/tested
exit_criteria="stale_10"
The execution would stop after 10 generations with no new best solution found
exit_criteria="flatmox_1_5"
The execution would stop if the increase in fitness is below 1% for the last 5 generations (flattening approximation max)
Just some thoughts. But I think that some criteria better describe where one is aiming for. Sometimes it is very hard to estimate needed generations. Would be neat to have. Otherwise it might direct others on their search for something like this.
Beta Was this translation helpful? Give feedback.
All reactions