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

When initializing DE with upper and lower bounds, do not evaluate the point twice #27

Open
soricinae opened this issue Nov 23, 2021 · 2 comments
Assignees
Labels

Comments

@soricinae
Copy link

Today, when initializing DE with upper and lower bounds, points are evaluated twice. This is inefficient and noticeable when evaluation is expensive.

Today's process:

  1. clsOptDE.Init(): generate a random point using initial value ranges
  2. Create and evaluate the clsPoint
  3. Limit the solution space to upper and lower bounds
  4. Reevaluate the point

You can see the point is evaluated twice, in steps #2 and #4

Ideal process:

  1. Generate a random point using the upper and lower bounds if they exist (don't use initial value ranges)
  2. Create the point

In this flow the point is only evaluated once.

There is a secondary bug with the limit function where the random point is not uniformly sampled from the upper and lower bounds. Instead it is uniformly sampled from the initial value ranges, so if the upper and lower bounds are wider, you miss parts of those bounds, and if the bounds are narrower, you are more likely to get "random" points from the edge of the bounds.

@tomitomi3
Copy link
Owner

tomitomi3 commented Nov 23, 2021

@soricinae
Thank you for your issue.

Generate a random point using the upper and lower bounds if they exist
You're right. I made a simple implementation.

If there is a bounds, you should make a point with a limited range using RNG.
I manage and fix this issue. Expand to other initialization processes.

@tomitomi3 tomitomi3 reopened this Nov 23, 2021
@tomitomi3
Copy link
Owner

sorry. re-open this issue.

@tomitomi3 tomitomi3 self-assigned this Nov 23, 2021
@tomitomi3 tomitomi3 added the bug label Nov 23, 2021
@tomitomi3 tomitomi3 pinned this issue Nov 23, 2021
@tomitomi3 tomitomi3 unpinned this issue Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants