PettingZoo Atari Missing ROM in Colab

Viewed 172

I 've been trying to set up PettingZoos MultiAgent Atari Environment in Colab, but I cannot get the atari multi-agent environments to work, even though I have already ran the command from AutoROM:

pip install --find-links dist/ --no-cache-dir AutoROM[accept-rom-license]

I can see all the Atari .bin files installed in my colab's /content file, suggesting that the above command worked, and I also tried to modify the base_atari_env.py to figure out where the path is but it changes nothing in the output (always on colab), nor can I see where the rom_path argument is (I instead see a auto_rom_install_path which I already tried to change but to no avail). What should I do?

!pip install pettingzoo
!pip install pettingzoo[all]
!pip install supersuit

        import supersuit
        from pettingzoo.atari import space_invaders_v1
        
        env = space_invaders_v1.env()
    
    ---------------------------------------------------------------------------
    OSError                                   Traceback (most recent call last)
    <ipython-input-17-9277684546c5> in <module>()
          2 from pettingzoo.atari import space_invaders_v1
          3 
    ----> 4 env = space_invaders_v1.env()
          5 
          6 
    
    3 frames
    /usr/local/lib/python3.7/dist-packages/pettingzoo/atari/base_atari_env.py in __init__(self, game, num_players, mode_num, seed, obs_type, full_action_space, env_name, max_cycles, auto_rom_install_path)
         83 
         84         if not final.exists():
    ---> 85             raise OSError(f"rom {game} is not installed. Please install roms using AutoROM tool (https://github.com/Farama-Foundation/AutoROM) "
         86                           "or specify and double-check the path to your Atari rom using the `rom_path` argument.")
         87 
    
    OSError: rom space_invaders is not installed. Please install roms using AutoROM tool (https://github.com/Farama-Foundation/AutoROM) or specify and double-check the path to your Atari rom using the `rom_path` argument.

In addition, installing it from multi-agent.ale directly seems to work if I do the following:

!pip install multi-agent-ale-py
from ale_py import ALEInterface
ale = ALEInterface()
ale.loadROM("space_invaders.bin")

After which I am able to normally access the environment and e.g print out a screenshot.

0 Answers
Related