mrkwatkins.oakemu_rl.gymnasium.unsafe_actions
Encoding of OakEmu's pointer-based multi-environment action buffer.
Classes and functions
Constants
ACTION_TYPE_RANDOM
python
ACTION_TYPE_RANDOM = 2ACTION_TYPE_REPLAY
python
ACTION_TYPE_REPLAY = 3ACTION_TYPE_RESET
python
ACTION_TYPE_RESET = 0ACTION_TYPE_STEP
python
ACTION_TYPE_STEP = 1UnsafeAction
python
UnsafeAction = tuple[int, int, int, bytes | None, bytes | None, int, Sequence[int], bytes | None]One packed action record: (environment_id, action_type, replay_trajectory_recording_mode, initial_state, action_indices, reset_parameter_mask, reset_parameter_values, initial_frames).
initial_frames seeds the observation frame stack on a reset from a snapshot. A snapshot is an emulator state, not a rendered-frame history, so without it the environment fills the stack by repeating the restored frame -- correct at a true start, and at a midpoint restart a picture in which nothing on screen is moving.