dacbench.benchmarks

Submodules

Package Contents

Classes

LubyBenchmark

Benchmark with default configuration & relevant functions for Sigmoid

SigmoidBenchmark

Benchmark with default configuration & relevant functions for Sigmoid

FastDownwardBenchmark

Benchmark with default configuration & relevant functions for Sigmoid

CMAESBenchmark

Benchmark with default configuration & relevant functions for CMA-ES

ModeaBenchmark

Benchmark with default configuration & relevant functions for Modea

ModCMABenchmark

Abstract template for benchmark classes

SGDBenchmark

Benchmark with default configuration & relevant functions for SGD

ToySGDBenchmark

Abstract template for benchmark classes

OneLLBenchmark

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

class dacbench.benchmarks.LubyBenchmark(config_path=None, config=None)

Bases: dacbench.abstract_benchmark.AbstractBenchmark

Benchmark with default configuration & relevant functions for Sigmoid

get_environment(self)

Return Luby env with current configuration

Returns

Luby environment

Return type

LubyEnv

set_cutoff(self, steps)

Set cutoff and adapt dependencies

Parameters

int – Maximum number of steps

set_history_length(self, length)

Set history length and adapt dependencies

Parameters

int – History length

read_instance_set(self, test=False)

Read instance set from file

get_benchmark(self, L=8, fuzziness=1.5, seed=0)

Get Benchmark from DAC paper

Parameters
  • L (int) – Minimum sequence lenght, was 8, 16 or 32 in the paper

  • fuzziness (float) – Amount of noise applied. Was 1.5 for most of the experiments

  • seed (int) – Environment seed

Returns

env – Luby environment

Return type

LubyEnv

class dacbench.benchmarks.SigmoidBenchmark(config_path=None, config=None)

Bases: dacbench.abstract_benchmark.AbstractBenchmark

Benchmark with default configuration & relevant functions for Sigmoid

get_environment(self)

Return Sigmoid env with current configuration

Returns

Sigmoid environment

Return type

SigmoidEnv

set_action_values(self, values)

Adapt action values and update dependencies

Parameters

values (list) – A list of possible actions per dimension

read_instance_set(self, test=False)

Read instance set from file

get_benchmark(self, dimension=None, seed=0)

Get Benchmark from DAC paper

Parameters
  • dimension (int) – Sigmoid dimension, was 1, 2, 3 or 5 in the paper

  • seed (int) – Environment seed

Returns

env – Sigmoid environment

Return type

SigmoidEnv

class dacbench.benchmarks.FastDownwardBenchmark(config_path=None, config=None)

Bases: dacbench.abstract_benchmark.AbstractBenchmark

Benchmark with default configuration & relevant functions for Sigmoid

get_environment(self)

Return Luby env with current configuration

Returns

Luby environment

Return type

LubyEnv

read_instance_set(self, test=False)

Read paths of instances from config into list

set_heuristics(self, heuristics)
get_benchmark(self, seed=0)

Get published benchmark

Parameters

seed (int) – Environment seed

Returns

env – FD environment

Return type

FastDownwardEnv

class dacbench.benchmarks.CMAESBenchmark(config_path=None, config=None)

Bases: dacbench.abstract_benchmark.AbstractBenchmark

Benchmark with default configuration & relevant functions for CMA-ES

get_environment(self)

Return CMAESEnv env with current configuration

Returns

CMAES environment

Return type

CMAESEnv

read_instance_set(self, test=False)

Read path of instances from config into list

get_benchmark(self, seed=0)

Get benchmark from the LTO paper

Parameters

seed (int) – Environment seed

Returns

env – CMAES environment

Return type

CMAESEnv

class dacbench.benchmarks.ModeaBenchmark(config_path=None, config=None)

Bases: dacbench.abstract_benchmark.AbstractBenchmark

Benchmark with default configuration & relevant functions for Modea

get_environment(self)

Return ModeaEnv env with current configuration

Returns

Modea environment

Return type

ModeaEnv

read_instance_set(self, test=False)

Read path of instances from config into list

class dacbench.benchmarks.ModCMABenchmark(config_path: str = None, step_size=False, config=None)

Bases: dacbench.abstract_benchmark.AbstractBenchmark

Abstract template for benchmark classes

get_environment(self)

Make benchmark environment

Returns

env – Benchmark environment

Return type

gym.Env

read_instance_set(self, test=False)
get_benchmark(self, seed: int = 0)
class dacbench.benchmarks.SGDBenchmark(config_path=None, **kwargs)

Bases: dacbench.abstract_benchmark.AbstractBenchmark

Benchmark with default configuration & relevant functions for SGD

get_environment(self)

Return SGDEnv env with current configuration

Returns

SGD environment

Return type

SGDEnv

read_instance_set(self, test=False)

Read path of instances from config into list

get_benchmark(self, instance_set_path=None, seed=0)

Get benchmark from the LTO paper

Parameters

seed (int) – Environment seed

Returns

env – SGD environment

Return type

SGDEnv

class dacbench.benchmarks.ToySGDBenchmark(config_path=None, config=None)

Bases: dacbench.abstract_benchmark.AbstractBenchmark

Abstract template for benchmark classes

get_environment(self)

Return SGDEnv env with current configuration

Returns

SGD environment

Return type

SGDEnv

read_instance_set(self, test=False)

Read path of instances from config into list

class dacbench.benchmarks.OneLLBenchmark(config_path=os.path.dirname(os.path.abspath(__file__)) + '/../additional_configs/onell/lbd_theory.json', config=None)

Bases: dacbench.abstract_benchmark.AbstractBenchmark

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

get_environment(self)

Return an environment with current configuration

read_instance_set(self)

Read instance set from file