-
Notifications
You must be signed in to change notification settings - Fork 119
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
CMA stop conditions #401
base: master
Are you sure you want to change the base?
CMA stop conditions #401
Conversation
Thanks for opening your first pull request in this repository! Someone will review it when they have a chance. In the mean time, please be sure that you've handled the following things, to make the review process quicker and easier:
Thank you again for your contributions! 👍 |
@@ -274,6 +291,17 @@ typename MatType::elem_type CMAES<SelectionPolicyType, | |||
return overallObjective; | |||
} | |||
|
|||
// Terminate if sigma/sigma0 is above 10^4 * max(D) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Terminate if sigma/sigma0 is above 10^4 * max(D) | |
// Terminate if sigma/sigma0 is above 10^4 * max(D). |
To be consistent with the style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this ready to be merged?
I think perhaps some review would be fine, but I believe its okay. It should be ready to be merged |
Since this is so close, we should keep it open to get it merged. I marked it keep-open |
Hi,
I am currently enhancing the implementation of the CMA-ES algorithm by introducing additional stopping conditions. These modifications are intended to improve numerical stability and are advocated in A Restart CMA Evolution Strategy With Increasing Population Size and The CMA Evolution Strategy: A Tutorial. The changes are also in line with implementations found in Python libraries maintained by the same author.
These are basically:
maxiter
): Stop if the number of iterations reaches a predefined limit.ftarget
): Stop if the best objective value is less than or equal to a target value.maxfevals
): Stop if the number of function evaluations reaches a predefined limit.tolfun
): Stop if the range of function values of the best solutions falls below a threshold over a certain number of iterations.tolflatfitness
): Stop if the best objective value does not change significantly over a number of generations.tolconditioncov
): Stop if the condition number of the covariance matrix exceeds a certain threshold.noeffectaxis
): Stop if adding 0.1 times the standard deviation in the search space in a principal axis direction does not change the solution.noeffectcoord
): Stop if adding 0.2 times the standard deviation in the search space along one coordinate does not change the solution.tolx
): Stop if the change in the variables between generations falls below a threshold.tolfacupx
): Stop if any scaled step sizes exceed the product of the initial step sizes and a specified tolerance factor.tolfunhist
): Stop if the range of fitness values in the historical best fitness list remains below a specified threshold.tolupsigma
): Stop if the ratio of the current step size to the maximum eigenvalue of the covariance matrix exceeds a specified multiple of the initial step size.tolstagnation
): Stop if there is no significant improvement over a large number of generations.tolfunrel
): Stop based on a relative condition involving the historical and current best function values.These conditions are the ones currently present in the Python repository I mentioned and align with the papers while adding a few other stopping criteria. These are what I plan to implement, but I'm open suggestions.
Additionally, I have made modifications in lines 94 and 112 to align with the initialization presented in The CMA Evolution Strategy: A Comparing Review (page 26, equations 35 and 37). These initialization parameters are also supported by other papers I have reviewed.