dacbench.wrappers.action_tracking_wrapper¶
Module Contents¶
Classes¶
Wrapper to action frequency. |
- dacbench.wrappers.action_tracking_wrapper.current_palette¶
- class dacbench.wrappers.action_tracking_wrapper.ActionFrequencyWrapper(env, action_interval=None, logger=None)¶
Bases:
gym.WrapperWrapper to action frequency. Includes interval mode that returns frequencies in lists of len(interval) instead of one long list.
- __setattr__(self, name, value)¶
Set attribute in wrapper if available and in env if not
- Parameters
name (str) – Attribute to set
value – Value to set attribute to
- __getattribute__(self, name)¶
Get attribute value of wrapper if available and of env if not
- Parameters
name (str) – Attribute to get
- Returns
Value of given name
- Return type
value
- step(self, action)¶
Execute environment step and record state
- Parameters
action (int) – action to execute
- Returns
state, reward, done, metainfo
- Return type
np.array, float, bool, dict
- get_actions(self)¶
Get state progression
- Returns
all states or all states and interval sorted states
- Return type
np.array or np.array, np.array
- render_action_tracking(self)¶
Render action progression
- Returns
RBG data of action tracking
- Return type
np.array