Skip to content

Commit

Permalink
Update pypop7/optimizers/nes/test_enes.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Evolutionary-Intelligence committed Jul 4, 2024
1 parent 167c214 commit 3a63243
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pypop7/optimizers/nes/test_enes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ def test_optimize():
'upper_boundary': 5.0 * numpy.ones((2,))}
options = {'max_function_evaluations': 5000, # to set optimizer options
'seed_rng': 2022,
'mean': 3.0 * numpy.ones((2,)),
'sigma': 3.0} # global step-size may need to be tuned for optimality
enes = ENES(problem, options) # to initialize the optimizer class
'mean': 3.0 * numpy.ones((2,))}
enes = ENES(problem, options) # to initialize the black-box optimizer class
results = enes.optimize() # to run the optimization process
assert results['n_function_evaluations'] == 5000
assert results['best_so_far_y'] < 1.0

0 comments on commit 3a63243

Please sign in to comment.