Skip to content

OakEmuEnvFactory ​

python
OakEmuEnvFactory(game_configuration: str | PathLike | GameConfiguration, model_configuration: str | PathLike | ModelConfiguration, training_configuration: str | PathLike | TrainingConfiguration | None, observation_shape_order: Literal['hwf', 'fhw'], training_mode: TrainingMode = TrainingMode.TRAINING, dump_directory: str | PathLike | None = None) -> None

Factory for creating OakEmu environment instances.

Initialize the OakEmuEnvFactory.

Parameters:

  • game_configuration (str | PathLike | GameConfiguration) – Path to or instance of GameConfiguration.
  • model_configuration (str | PathLike | ModelConfiguration) – Path to or instance of ModelConfiguration.
  • observation_shape_order (Literal['hwf', 'fhw']) – Dimension order for observations.
  • training_mode (TrainingMode) – The training mode to use.
  • dump_directory (str | PathLike | None) – Optional directory for environment dumps.

Source

Properties ​

action_shape ​

python
action_shape: int

Get the action shape.

Returns:

  • int – The number of discrete actions.

Source

action_space ​

python
action_space: Discrete

Get the action space.

Returns:

  • Discrete – The Discrete action space.

Source

game_configuration ​

python
game_configuration: GameConfiguration

Get the game configuration.

Returns:

  • GameConfiguration – The GameConfiguration instance.

Source

model_configuration ​

python
model_configuration: ModelConfiguration

Get the model configuration.

Returns:

  • ModelConfiguration – The ModelConfiguration instance.

Source

name ​

python
name: str

Get the name of the game.

Returns:

  • str – The game name.

Source

observation_shape ​

python
observation_shape: tuple[int, int, int]

Get the observation shape.

Returns:

  • tuple[int, int, int] – The observation shape.

Source

observation_space ​

python
observation_space: Box

Get the observation space.

Returns:

  • Box – The Box observation space.

Source

training_mode ​

python
training_mode: TrainingMode

Get the training mode.

Returns:

  • TrainingMode – The training mode.

Source

Methods ​

create ​

python
create() -> OakEmuEnv

Create a new OakEmuEnv instance with the specified mode.

Returns:

  • OakEmuEnv – A new OakEmuEnv instance.

Source