I am trying to learn how to build an AI model with a ROM game. The issue is that the environment doesn't start. I get no errors with the code below but also I get no game-playing :-)
Here is what I have done
- I have imported the rom using the instructions provided here (no errors)
- I am running the code with the latest python and Jupyter Lab
- I wanted to use this, but since the article was written, so I started from scratch with the code below
- I am not clear if I should use Gym or Gymnasium package, which seems to have replaced Gym
- I managed to make it run (with a different code snippet) but then I couldn't control the game like done here.
import gym
from ale_py import ALEInterface
ale = ALEInterface()
from ale_py.roms import KungFuMaster
ale.loadROM(KungFuMaster)
env = gym.make('ALE/KungFuMaster-v5',
obs_type='rgb', # ram | rgb | grayscale
frameskip=4, # frame skip
mode=None, # game mode
difficulty=None, # game difficulty
repeat_action_probability=0.25, # Sticky action probability
full_action_space=False, # Use all actions
render_mode="human" # None | human | rgb_array
)
env.close()