The FastDownward Benchmark
This benchmark is an interface to the Fast Downward AI planner, controlling its heuristic hyperparameter. In each step until the algorithm finishes or is terminated via the cutoff, the DAC controller selects one of either two (toy case) or four heuristiccs for the planner to use. The goal is to reduce the runtime of the planner, so every step that is taken in the benchmark incurs a cost of 1.
Out of our real-world benchmarks, FastDownward is likely the fastest running and it has been shown to be suitable to dynamic configuration. Though the noise level is fairly high, most DAC controllers should be able to learn functional policies in a comparatively short time frame.
The FastDownward benchmark was constructed by Speck et al. for the paper `”Learning Heuristic Selection with Dynamic Algorithm Configuration” <https://arxiv.org/pdf/2006.08246.pdf>`_ at ICAPS 2021
- class dacbench.benchmarks.fast_downward_benchmark.FastDownwardBenchmark(config_path=None, config=None)
Bases:
AbstractBenchmark
Benchmark with default configuration & relevant functions for Sigmoid
- get_benchmark(seed=0)
Get published benchmark
- Parameters
seed (int) – Environment seed
- Returns
env – FD environment
- Return type
- get_environment()
Return Luby env with current configuration
- Returns
Luby environment
- Return type
- read_instance_set(test=False)
Read paths of instances from config into list
Planning environment from “Learning Heuristic Selection with Dynamic Algorithm Configuration” by David Speck, André Biedenkapp, Frank Hutter, Robert Mattmüller und Marius Lindauer. Original environment authors: David Speck, André Biedenkapp
- class dacbench.envs.fast_downward.FastDownwardEnv(config)
Bases:
AbstractEnv
Environment to control Solver Heuristics of FastDownward
- close()
Close Env
- Returns
Closing confirmation
- Return type
bool
- kill_connection()
Kill the connection
- recv_msg()
Recieve a whole message. The message has to be prepended with its total size Based on comment from SO see [1]
- Returns
The message as byte
- Return type
bytes
- recvall(n: int)
Given we know the size we want to recieve, we can recieve that amount of bytes. Based on comment from SO see [1]
- Parameters
n (int) – Number of bytes to expect in the data
- Returns
The message as byte
- Return type
bytes
- render(mode: str = 'human') None
Required by gym.Env but not implemented
- Parameters
mode (str) – Rendering mode
- reset()
Reset environment
- Returns
State after reset
- Return type
np.array
- send_msg(msg: bytes)
Send message and prepend the message size
Based on comment from SO see [1] [1] https://stackoverflow.com/a/17668009
- Parameters
msg (bytes) – The message as byte
- step(action: Union[int, List[int]])
Environment step
- Parameters
action (Union[int, List[int]]) – Parameter(s) to apply
- Returns
state, reward, done, info
- Return type
np.array, float, bool, dict
- class dacbench.envs.fast_downward.StateType(value)
Bases:
Enum
Class to define numbers for state types