From 185c6fe968e12764c7efc0e4feb1980593f80b6f Mon Sep 17 00:00:00 2001 From: Miguel Date: Tue, 7 Jan 2025 08:46:10 -0500 Subject: [PATCH] Add sound option to initial config --- config/gym.py | 2 +- main.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/gym.py b/config/gym.py index 72829cf..a1bd2f1 100644 --- a/config/gym.py +++ b/config/gym.py @@ -15,7 +15,7 @@ def __init__(self, config: dict, debug=False): assert self.rom_path is not None, "ROM path is required" - self.pyboy = PyBoy(self.rom_path) + self.pyboy = PyBoy(self.rom_path, sound=config["game_with_sound"]) self._fitness = 0 self._previous_fitness = 0 diff --git a/main.py b/main.py index 4d85f6b..2128ac5 100644 --- a/main.py +++ b/main.py @@ -12,6 +12,7 @@ "rom_path": "roms/ZeldaLinksAwakening.gb", "checkpoint_dir": "checkpoints/", "log_dir": "logs/", + "game_with_sound": True, } callback = CheckpointAndLoggingCallback(