dacbench.envs.fast_downward
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
Module Contents
Classes
Class to define numbers for state types |
|
Environment to control Solver Heuristics of FastDownward |
- class dacbench.envs.fast_downward.StateType
Bases:
enum.EnumClass to define numbers for state types
- RAW = 1
- DIFF = 2
- ABSDIFF = 3
- NORMAL = 4
- NORMDIFF = 5
- NORMABSDIFF = 6
- class dacbench.envs.fast_downward.FastDownwardEnv(config)
Bases:
dacbench.AbstractEnvEnvironment to control Solver Heuristics of FastDownward
- property port(self)
- property argstring(self)
- static _save_div(a, b)
Helper method for safe division
- Parameters
a (list or np.array) – values to be divided
b (list or np.array) – values to divide by
- Returns
Division result
- Return type
np.array
- send_msg(self, 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
- recv_msg(self)
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(self, 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
- _process_data(self)
Split received json into state reward and done
- Returns
state, reward, done
- Return type
np.array, float, bool
- step(self, 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
- reset(self)
Reset environment
- Returns
State after reset
- Return type
np.array
- kill_connection(self)
Kill the connection
- close(self)
Close Env
- Returns
Closing confirmation
- Return type
bool
- render(self, mode: str = 'human') None
Required by gym.Env but not implemented
- Parameters
mode (str) – Rendering mode