dacbench.benchmarks.theory_benchmark

Module Contents

Classes

TheoryBenchmark

Benchmark with various settings for (1+(lbd, lbd))-GA and RLS

dacbench.benchmarks.theory_benchmark.INFO
dacbench.benchmarks.theory_benchmark.THEORY_DEFAULTS
class dacbench.benchmarks.theory_benchmark.TheoryBenchmark(config=None)

Bases: dacbench.abstract_benchmark.AbstractBenchmark

Benchmark with various settings for (1+(lbd, lbd))-GA and RLS

create_observation_space_from_description(self, obs_description, env_class=RLSEnvDiscrete)

Create a gym observation space (Box only) based on a string containing observation variable names, e.g. “n, f(x), k, k_{t-1}” Return:

A gym.spaces.Box observation space

get_environment(self, test_env=False)

Return an environment with current configuration

Parameters:
test_env: whether the enviroment is used for train an agent or for testing.
if test_env=False:

cutoff time for an episode is set to 0.8*n^2 (n: problem size) if an action is out of range, stop the episode immediately and return a large negative reward (see envs/theory.py for more details)

otherwise: benchmark’s original cutoff time is used, and out-of-range action will be clipped to nearest valid value and the episode will continue.

read_instance_set(self)

Read instance set from file we look at the current directory first, if the file doesn’t exist, we look in <DACBench>/dacbench/instance_sets/theory/