Skip to content

Commit

Permalink
Make CMAES fail if problem is bounded
Browse files Browse the repository at this point in the history
  • Loading branch information
flukeskywalker authored Feb 13, 2024
1 parent 5c58566 commit 77c398b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/evotorch/algorithms/cmaes.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ def __init__(
# Ensure that the problem is numeric
problem.ensure_numeric()

# CMAES can't handle problem bounds. Ensure that it is unbounded
problem.ensure_unbounded()

# Store the objective index
self._obj_index = problem.normalize_obj_index(obj_index)

Expand Down

0 comments on commit 77c398b

Please sign in to comment.