Skip to content
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

Make bouncing the default for constraints #691

Merged
merged 1 commit into from
May 25, 2020
Merged

Conversation

jrapin
Copy link
Contributor

@jrapin jrapin commented May 20, 2020

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Motivation and Context / Related issue

This is a follow-up of #684 making bouncing the default for bounding constraints. Hard clipping on the bounds can lead to very detrimental loss of diversity. Bouncing on the border can help avoid this in being closer to an actual constraint through resampling, while being much more efficient in large dimension
Closes #621

How Has This Been Tested (if it applies)

Checklist

  • The documentation is up-to-date with the changes I made.
  • I have read the CONTRIBUTING document and completed the CLA (see CLA).
  • All tests passed, and additional code has been covered with new tests.

@jrapin jrapin added Type: Enhancement New feature or request Priority: Medium Difficulty: Low Type: Breaking changes Breaking changes to the API, to be notified in changelogs labels May 20, 2020
@jrapin jrapin requested a review from teytaud May 20, 2020 13:49
@jrapin jrapin self-assigned this May 20, 2020
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label May 20, 2020
Copy link
Contributor

@teytaud teytaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I understand correctly that bouncing is tested once and then clipping is applied ?

@jrapin
Copy link
Contributor Author

jrapin commented May 25, 2020

Do I understand correctly that bouncing is tested once and then clipping is applied ?

What do you mean tested once?
It "bounces" once on the border, and if it reaches the other border then it clips:
Eg: starting point 1, and bounds in [0, 10]:

  • moving of -3 leads to 2
  • moving of 1 leads to 2
  • moving of 10 leads to 9 (bounces once on border)
  • moving of -11 or lower leads to 10 (bounces once at 0, then clips at 10)

@jrapin jrapin merged commit d7479d7 into master May 25, 2020
@jrapin jrapin deleted the constraint_default branch May 25, 2020 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. Difficulty: Low Priority: Medium Type: Breaking changes Breaking changes to the API, to be notified in changelogs Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bounded variable with clipping can lead to early converging for PSO and DE
3 participants