Skip to content

Commit

Permalink
Update example_experiment2.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nikohansen authored Mar 17, 2022
1 parent ffd4fae commit 3c3261c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions code-experiments/build/python/example_experiment2.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,13 @@ def random_search(f, lbounds, ubounds, evals):

suite_name = "bbob" # see cocoex.known_suite_names
budget_multiplier = 2 # times dimension, increase to 10, 100, ...
suite_filter_options = ("" # without filtering a suite has instance_indices 1-15
suite_filter_options = ("" # without filtering, a suite has instance_indices 1-15
# "dimensions: 2,3,5,10,20 " # skip dimension 40
# "instance_indices: 1-5 " # relative to suite instances
# "year:2019 " # select instances by year
)
# for more suite filter options see http://numbbo.github.io/coco-doc/C/#suite-parameters
suite_year_option = "" # "year: 2022" # determine instances by year, not all years work for all suites :-(

batches = 1 # number of batches, batch=3/32 works to set both, current_batch and batches
current_batch = 1 # only current_batch modulo batches is relevant
output_folder = ''
Expand All @@ -113,7 +114,7 @@ def random_search(f, lbounds, ubounds, evals):
output_folder += "_batch%03dof%d" % (current_batch, batches)

### prepare
suite = cocoex.Suite(suite_name, "", suite_filter_options)
suite = cocoex.Suite(suite_name, suite_year_option, suite_filter_options)
observer = cocoex.Observer(suite_name, "result_folder: " + output_folder)
minimal_print = cocoex.utilities.MiniPrint()
stoppings = defaultdict(list) # dict of lists, key is the problem index
Expand Down

0 comments on commit 3c3261c

Please sign in to comment.