Skip to content

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

@soricinae

Description

@soricinae

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.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions