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

Corner case of integer variables with boundaries #260

Closed
nikohansen opened this issue Aug 31, 2024 · 2 comments
Closed

Corner case of integer variables with boundaries #260

nikohansen opened this issue Aug 31, 2024 · 2 comments
Labels

Comments

@nikohansen
Copy link
Contributor

nikohansen commented Aug 31, 2024

Related to #259.

For an upper variable bound at 1.5, an infeasible value of 1.6 is repaired to 1.5 which is then rounded to 2.0 (which is not an issue with BoundTransform.repair). If 1 is the optimum, this means that the optimum is not evaluated anymore (for unjustifiable reasons) unless the mean gets feasible again.

This is also a potential issue on the bbob-mixint test suite (with BoundPenalty handling).

A possible fix is to amend the bounds for integer variables (phenotype indices) by amending the bounds option.

@nikohansen nikohansen added the bug label Aug 31, 2024
@nikohansen
Copy link
Contributor Author

nikohansen commented Aug 31, 2024

In the integer_centering module the corner case is addressed like

        idx = np.mod(bounds, 1) == 0.5
        bounds[idx] += (1 if which == 'lower' else
            -1) * self.params['bounds_offset'] * np.maximum(1, np.abs(bounds[idx]))

@nikohansen
Copy link
Contributor Author

Fixed with commit 8b11737.

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

1 participant