-
Notifications
You must be signed in to change notification settings - Fork 35
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
[BUG or Rather Improvement?] #392
Comments
Hi @lunjohnzhang, thank you for the suggestions! I can confirm that I am able to reproduce the behavior. This seems somewhere between a bug report and a feature request. The new behavior seems reasonable, but I'm not sure what the API should be for it. Perhaps there could be a Would you be willing to write a PR for this? No worries if not; I can always circle back to it later. |
Thanks for the reply! The solution with |
Yes, that would be great. Thanks! |
## Description <!-- Provide a brief description of the PR's purpose here. --> A common error when using bounds is that CMA-ES or another ES can hang due to resampling, as solutions that fall outside of the bounds need to be resampled until they are within bounds. This PR adds a warning so that users will at least know that this behavior is occurring. We are still unclear how to deal with bounds properly, as it is also an open research question. #392 has proposed clipping the solutions after a set number of iterations of resampling but it is unclear if this is the best solution. ## TODO <!-- Notable points that this PR has either accomplished or will accomplish. --> - [x] Fix slight issue with how OpenAI-ES handles resampling - [x] Add tests -> since this behavior is supposed to make the tests hang, we just put this as a script in one of the tests that can be manually run - [x] Modify ESs ## Status - [x] I have read the guidelines in [CONTRIBUTING.md](https://github.com/icaros-usc/pyribs/blob/master/CONTRIBUTING.md) - [x] I have formatted my code using `yapf` - [x] I have tested my code by running `pytest` - [x] I have linted my code with `pylint` - [x] I have added a one-line description of my change to the changelog in `HISTORY.md` - [x] This PR is ready to go
## Description <!-- Provide a brief description of the PR's purpose here. --> A common error when using bounds is that CMA-ES or another ES can hang due to resampling, as solutions that fall outside of the bounds need to be resampled until they are within bounds. This PR adds a warning so that users will at least know that this behavior is occurring. We are still unclear how to deal with bounds properly, as it is also an open research question. #392 has proposed clipping the solutions after a set number of iterations of resampling but it is unclear if this is the best solution. ## TODO <!-- Notable points that this PR has either accomplished or will accomplish. --> - [x] Fix slight issue with how OpenAI-ES handles resampling - [x] Add tests -> since this behavior is supposed to make the tests hang, we just put this as a script in one of the tests that can be manually run - [x] Modify ESs ## Status - [x] I have read the guidelines in [CONTRIBUTING.md](https://github.com/icaros-usc/pyribs/blob/master/CONTRIBUTING.md) - [x] I have formatted my code using `yapf` - [x] I have tested my code by running `pytest` - [x] I have linted my code with `pylint` - [x] I have added a one-line description of my change to the changelog in `HISTORY.md` - [x] This PR is ready to go
Description
I am trying to use
EvolutionStrategyEmitter
withCMAEvolutionStrategy
to generate high dimensional solutions (i.e. > 3000) where all dimensions are within the bounds[1e-3, None]
(i.e. larger than a small positive number). However, since the current implementation ofCMAEvolutionStrategy
simply keeps resampling until all solutions are within the bounds, it ends up iterating forever with high dimensional solutions (in theory it'll eventually sample solutions within the bounds but it's taking too long).Would it be possible to change the implementation such that it only resamples for a fixed number of iterations and clip the solution within the bounds after that?
Steps to Reproduce
The following code reproduce the above issue:
To reproduce the issue, run with
python <script_name> 3000 42
.The text was updated successfully, but these errors were encountered: