snakelimb
snakelimb
PPyBoy
Created by snakelimb on 12/19/2024 in #support
Issue asserting Cartridge title SML
Thank you both for your help. I got mario jumping around again. Now to improve these rewards, and get multiple envs going.
25 replies
PPyBoy
Created by snakelimb on 12/19/2024 in #support
Issue asserting Cartridge title SML
ok I see
25 replies
PPyBoy
Created by snakelimb on 12/19/2024 in #support
Issue asserting Cartridge title SML
So I decided to just try Kirby instead because I know I had used the environment on my laptop before. I copied the code to my pc and it ran into the same assertion issue with kirby. I went ahead and updated pyboy in the container and that fixed the assertion issue. so I'm thinking it is something to do with the Version: 1.6.14 Pyboy
25 replies
PPyBoy
Created by snakelimb on 12/19/2024 in #support
Issue asserting Cartridge title SML
this code based on the SML example also got the AssertionError
25 replies
PPyBoy
Created by snakelimb on 12/19/2024 in #support
Issue asserting Cartridge title SML
from pyboy import PyBoy
from pyboy.utils import WindowEvent

# Initialize PyBoy with the Super Mario Land ROM
pyboy = PyBoy("supermarioland.gb")
pyboy.set_emulation_speed(0)

assert pyboy.cartridge_title == "SUPER MARIOLAN"

# Access the game wrapper
mario = pyboy.game_wrapper
mario.game_area_mapping(mario.mapping_compressed, 0)
mario.start_game()

# Verify initial game state
assert mario.score == 0
assert mario.lives_left == 2
assert mario.time_left == 400
assert mario.world == (1, 1)

# Render the screen after starting the game
pyboy.tick()
pyboy.screen.image.save("SuperMarioLand1.png")
print(mario)
from pyboy import PyBoy
from pyboy.utils import WindowEvent

# Initialize PyBoy with the Super Mario Land ROM
pyboy = PyBoy("supermarioland.gb")
pyboy.set_emulation_speed(0)

assert pyboy.cartridge_title == "SUPER MARIOLAN"

# Access the game wrapper
mario = pyboy.game_wrapper
mario.game_area_mapping(mario.mapping_compressed, 0)
mario.start_game()

# Verify initial game state
assert mario.score == 0
assert mario.lives_left == 2
assert mario.time_left == 400
assert mario.world == (1, 1)

# Render the screen after starting the game
pyboy.tick()
pyboy.screen.image.save("SuperMarioLand1.png")
print(mario)
25 replies
PPyBoy
Created by snakelimb on 12/19/2024 in #support
Issue asserting Cartridge title SML
py class SuperMarioLandEnv(gym.Env):
def __init__(self, rom_path, debug=False):
super().__init__()
self.pyboy = PyBoy(rom_path)
assert self.pyboy.cartridge_title == "SUPER MARIOLAN"

if not debug:
self.pyboy.set_emulation_speed(0)
self.mario = self.pyboy.game_wrapper
self.mario.game_area_mapping(self.mario.mapping_compressed, 0)
self.mario.start_game()

# Verify initial game state
assert self.mario.score == 0
assert self.mario.lives_left == 2
assert self.mario.time_left == 400

self.pyboy.tick() # To render screen after .start_game

self.action_space = spaces.Discrete(len(actions))
self.observation_space = spaces.Box(
low=0, high=255, shape=(4, 84, 84), dtype=np.uint8
)

self._fitness = 0
self._previous_fitness = 0
self._last_progress = 0
py class SuperMarioLandEnv(gym.Env):
def __init__(self, rom_path, debug=False):
super().__init__()
self.pyboy = PyBoy(rom_path)
assert self.pyboy.cartridge_title == "SUPER MARIOLAN"

if not debug:
self.pyboy.set_emulation_speed(0)
self.mario = self.pyboy.game_wrapper
self.mario.game_area_mapping(self.mario.mapping_compressed, 0)
self.mario.start_game()

# Verify initial game state
assert self.mario.score == 0
assert self.mario.lives_left == 2
assert self.mario.time_left == 400

self.pyboy.tick() # To render screen after .start_game

self.action_space = spaces.Discrete(len(actions))
self.observation_space = spaces.Box(
low=0, high=255, shape=(4, 84, 84), dtype=np.uint8
)

self._fitness = 0
self._previous_fitness = 0
self._last_progress = 0
25 replies
PPyBoy
Created by snakelimb on 12/19/2024 in #support
Issue asserting Cartridge title SML
I restarted vs studio code, and am reconnecting to the docker container for puffertank. I was thinking maybe it was trying to reference one of the previous files.
25 replies
PPyBoy
Created by snakelimb on 12/19/2024 in #support
Issue asserting Cartridge title SML
Thank you for the checksum. One does match that checksum, but strangly it still run into the assertion issue.
25 replies
PPyBoy
Created by snakelimb on 12/19/2024 in #support
Issue asserting Cartridge title SML
ok my bad
25 replies
PPyBoy
Created by snakelimb on 12/19/2024 in #support
Issue asserting Cartridge title SML
I just downloaded 3 additional roms from different sites and tried them all to the same result. I need run a checksum comparison which I have not yet.
25 replies