Skip to content

TrajectoryData ​

python
TrajectoryData(blocks: tuple[_Block, ...]) -> None

One episode trajectory parsed from OakEmu's pointer-based interop buffer.

Mirrors the TrajectoryFile wrapper API but is parsed entirely from raw bytes, without any pythonnet object access. The wire format is exactly the bytes of the trajectory's .oet file: an 18-byte file header (identifier plus version) followed by self-framing blocks of {byte Type, fixed-size header starting with a uint size field, body bytes}.

Initialize the trajectory from parsed blocks.

Parameters:

  • blocks (tuple[_Block, ...]) – The parsed blocks in episode order.

Source

Properties ​

action_map ​

python
action_map: tuple[str, ...]

The action names stored in the trajectory map.

Source

actions ​

python
actions: bytes

The action indices up to the last interesting marker.

Source

captured_expression_labels ​

python
captured_expression_labels: tuple[str, ...]

The captured value labels, in marker value order.

Source

emulator_type ​

python
emulator_type: int

The OakEmu emulator type.

Source

end_state ​

python
end_state: bytes | None

The snapshot at the last interesting marker, if present.

Source

end_values ​

python
end_values: dict[str, int]

The values captured at the last interesting marker.

Source

episode ​

python
episode: TrajectoryEpisode

The episode block.

Source

episode_actions ​

python
episode_actions: bytes

The full episode action indices.

Source

episode_end_state ​

python
episode_end_state: bytes

The snapshot at the end marker.

Source

episode_end_values ​

python
episode_end_values: dict[str, int]

The values captured at the end marker.

Source

frame_skip ​

python
frame_skip: int

The frame-skip value stored in the trajectory.

Source

has_end_state ​

python
has_end_state: bool

Whether the episode contains at least one interesting marker.

Source

initial_state ​

python
initial_state: bytes

The serialised emulator state at the start of the episode.

Source

interesting_markers ​

python
interesting_markers: tuple[TrajectoryMarker, ...]

Only the interesting-point markers.

Source

markers ​

python
markers: tuple[TrajectoryMarker, ...]

The ordered markers emitted for the episode.

Source

screen_type ​

python
screen_type: int

The OakEmu screen type.

Source

start_values ​

python
start_values: dict[str, int]

The values captured at the start marker.

Source

trigger_definitions ​

python
trigger_definitions: tuple[TrajectoryTriggerDefinition, ...]

The trigger definitions stored in the episode block.

Source

Methods ​

from_buffer ​

python
from_buffer(buffer: bytes, offset: int = 0) -> TrajectoryData

Parse a trajectory from its interop wire format (the bytes of its .oet file).

Parameters:

  • buffer (bytes) – The buffer containing the trajectory, which extends to the end of the buffer.
  • offset (int) – The offset of the trajectory within the buffer.

Returns:

  • TrajectoryData – The parsed trajectory.

Source

interesting_segments ​

python
interesting_segments() -> tuple[TrajectorySegment, ...]

Split the full episode into boundary-to-boundary segments ending at interesting or final markers.

Adjacent interesting markers with no intervening action block are treated as the same boundary and do not create zero-length segments.

Returns:

  • tuple[TrajectorySegment, ...] – The derived interesting segments in episode order.

Source