Often, when running an experiment, you don't necessarily want to see every simulation's outcomes, you want to find the best ones, the parameters that optimize a desired metric. With HASH's optimization engine, you can automatically generate simulations and find the set of parameters that will maximize or minimize a metric.
To create an optimization experiment, first create the metric that represents the value you want to optimize.
For example, in Sugarscape, you might be interested in what parameters will optimize the average sugar of cells. In that case you can use the existing metric:
Now use the experiment wizard to create a new experiment and fill in the options:
optimization as the type.
Use the metric name you previously defined as the metric.
Decide whether to
minimize the objective.
Select the fields (globals) that will be varied and define their constraints.
For each field being varied, you must specify the valid values (constraints) for the optimization experiment. You can specify discrete values with a comma separated list, with or without spaces:
You can also specify ranges of values using
- for fields which accept
-10 - -3
You can choose to run your experiment in hCloud directly upon creating it, or save your experiment to be run later from the Experiments dropdown in the menubar.
While the optimization experiment is running, individual runs will populate the experiment queue in the activity sidebar. Hover over a run to see the metrics value and the parameters for that particular run.
When the optimization run completes, the best run - the run where the parameters maximized or minimized the metric - will be highlighted.