gameboy_worlds.interface.runes_of_virtue.environments
1from gameboy_worlds.emulation.runes_of_virtue.emulators import RunesOfVirtueEmulator 2from gameboy_worlds.emulation.runes_of_virtue.trackers import ( 3 CoreRunesOfVirtueTracker, 4 RunesOfVirtueOCRTracker, 5) 6from gameboy_worlds.interface.environment import ( 7 DummyEnvironment, 8 Environment, 9 TestEnvironmentMixin, 10 TrainEnvironmentMixin, 11) 12 13 14class RunesOfVirtueEnvironment(DummyEnvironment): 15 """ 16 A basic Runes of Virtue Environment. 17 """ 18 19 REQUIRED_EMULATOR = RunesOfVirtueEmulator 20 REQUIRED_STATE_TRACKER = CoreRunesOfVirtueTracker 21 22 23class RunesOfVirtueOCREnvironment(RunesOfVirtueEnvironment): 24 """ 25 A Runes of Virtue Environment that includes OCR region captures and agent state. 26 """ 27 28 REQUIRED_STATE_TRACKER = RunesOfVirtueOCRTracker 29 REQUIRED_EMULATOR = RunesOfVirtueEmulator 30 31 @staticmethod 32 def override_emulator_kwargs(emulator_kwargs: dict) -> dict: 33 Environment.override_state_tracker_class( 34 emulator_kwargs, RunesOfVirtueOCREnvironment.REQUIRED_STATE_TRACKER 35 ) 36 return emulator_kwargs 37 38 39class RunesOfVirtueTestEnvironment(TestEnvironmentMixin, RunesOfVirtueOCREnvironment): 40 pass 41 42 43class RunesOfVirtueTrainEnvironment(TrainEnvironmentMixin, RunesOfVirtueOCREnvironment): 44 pass
15class RunesOfVirtueEnvironment(DummyEnvironment): 16 """ 17 A basic Runes of Virtue Environment. 18 """ 19 20 REQUIRED_EMULATOR = RunesOfVirtueEmulator 21 REQUIRED_STATE_TRACKER = CoreRunesOfVirtueTracker
A basic Runes of Virtue Environment.
The highest level emulator that the environment can interface with.
The state tracker that tracks the minimal state information required for the environment to function.
Inherited Members
- gameboy_worlds.interface.environment.DummyEnvironment
- DummyEnvironment
- observation_space
- get_observation
- determine_reward
- determine_terminated
- render_obs
- render_info
- gameboy_worlds.interface.environment.Environment
- override_emulator_kwargs
- override_state_tracker_class
- action_space
- actions
- render_mode
- save_custom_state
- delete_custom_state
- load_custom_state
- get_info
- get_final_info
- reset
- determine_truncated
- before_step
- after_step
- step
- step_high_level_action
- step_str
- string_to_high_level_action
- sim
- sim_str
- sim_high_level_action
- close
- render
- seed
- get_action_strings
- human_step_play
24class RunesOfVirtueOCREnvironment(RunesOfVirtueEnvironment): 25 """ 26 A Runes of Virtue Environment that includes OCR region captures and agent state. 27 """ 28 29 REQUIRED_STATE_TRACKER = RunesOfVirtueOCRTracker 30 REQUIRED_EMULATOR = RunesOfVirtueEmulator 31 32 @staticmethod 33 def override_emulator_kwargs(emulator_kwargs: dict) -> dict: 34 Environment.override_state_tracker_class( 35 emulator_kwargs, RunesOfVirtueOCREnvironment.REQUIRED_STATE_TRACKER 36 ) 37 return emulator_kwargs
A Runes of Virtue Environment that includes OCR region captures and agent state.
The state tracker that tracks the minimal state information required for the environment to function.
The highest level emulator that the environment can interface with.
32 @staticmethod 33 def override_emulator_kwargs(emulator_kwargs: dict) -> dict: 34 Environment.override_state_tracker_class( 35 emulator_kwargs, RunesOfVirtueOCREnvironment.REQUIRED_STATE_TRACKER 36 ) 37 return emulator_kwargs
Override default emulator keyword arguments for this environment.
Override this method in subclasses to modify the default emulator keyword arguments.
You may want to use override_state_tracker_class or that style to ensure compatibility of state tracker classes.
Arguments:
- emulator_kwargs (dict): Incoming emulator keyword arguments.
Returns:
dict: The overridden emulator keyword arguments.
Inherited Members
- gameboy_worlds.interface.environment.DummyEnvironment
- DummyEnvironment
- observation_space
- get_observation
- determine_reward
- determine_terminated
- render_obs
- render_info
- gameboy_worlds.interface.environment.Environment
- override_state_tracker_class
- action_space
- actions
- render_mode
- save_custom_state
- delete_custom_state
- load_custom_state
- get_info
- get_final_info
- reset
- determine_truncated
- before_step
- after_step
- step
- step_high_level_action
- step_str
- string_to_high_level_action
- sim
- sim_str
- sim_high_level_action
- close
- render
- seed
- get_action_strings
- human_step_play
Mixin class for testing environments. Ensures the State Tracker used is a TestTrackerMixin and checks these for termination / truncation.
Inherited Members
- gameboy_worlds.interface.environment.DummyEnvironment
- DummyEnvironment
- observation_space
- get_observation
- determine_reward
- render_obs
- render_info
- gameboy_worlds.interface.environment.TestEnvironmentMixin
- REQUIRED_STATE_TRACKER
- determine_truncated
- determine_terminated
- gameboy_worlds.interface.environment.Environment
- override_state_tracker_class
- action_space
- actions
- render_mode
- save_custom_state
- delete_custom_state
- load_custom_state
- get_info
- get_final_info
- reset
- before_step
- after_step
- step
- step_high_level_action
- step_str
- string_to_high_level_action
- sim
- sim_str
- sim_high_level_action
- close
- render
- seed
- get_action_strings
- human_step_play
Mixin class for training environments. Records the allowed initial states for training and random shuffles between them when resetting.
Inherited Members
- gameboy_worlds.interface.environment.DummyEnvironment
- DummyEnvironment
- observation_space
- get_observation
- determine_reward
- determine_terminated
- render_obs
- render_info
- gameboy_worlds.interface.environment.Environment
- override_state_tracker_class
- action_space
- actions
- render_mode
- save_custom_state
- delete_custom_state
- load_custom_state
- get_info
- get_final_info
- determine_truncated
- before_step
- after_step
- step
- step_high_level_action
- step_str
- string_to_high_level_action
- sim
- sim_str
- sim_high_level_action
- close
- render
- seed
- get_action_strings
- human_step_play