oxwhirl / smac

SMAC: The StarCraft Multi-Agent Challenge
MIT License
1.08k stars 228 forks source link

Package has a version of pygame as dependency which does not support rendering #79

Closed douglasrizzo closed 2 years ago

douglasrizzo commented 3 years ago

I got this issue on Linux. The package has pygame>=2.0.0 as a dependency:

https://github.com/oxwhirl/smac/blob/4b6c19c14a9ccef405a12d5e922d062b8a07536e/setup.py#L58

but according to https://github.com/deepmind/pysc2/issues/308#issuecomment-656610689, games can only be rendered using pygame up until version 1.9.6.

samvelyan commented 3 years ago

Hi. Are you using the same conda environment for both SMAC and PySC2? SMAC's environment rendering code is completely decoupled from that of PySC2 (it's a completely different piece of code). So if you're not using PySC2's rendering with SMAC (which isn't used anywhere in SMAC), you could just have pygame>2.0.0 in smac conda environment? The thing is that pygame>2.0.0 is much faster compared to previous versions.

douglasrizzo commented 3 years ago

The specific problem I had was that I was unable to watch replays, as taught in the SMAC README (https://github.com/oxwhirl/smac#watching-a-replay) right after installing SMAC. I had to downgrade pygame first. So, that specific step in the README does not work out of the box, given SMAC's installation requirements.

Is pygame necessary for running SMAC at training time? If it is, then I understand using a faster version of it. Otherwise, it seems like having pygame<=1.9.6 as a dependency is a safer bet, as it allows users to watch games and replays. Unless this is a platform-specific problem and others aren't facing it.

douglasrizzo commented 3 years ago

I saw that #71 is a great PR but it depends on pygame 2. So I guess the "Watching a replay" section of the README needs to warn people that watching replays needs pygame 1.9.6, while watching live games (the default) needs 2.0.0?

samvelyan commented 3 years ago

The python -m pysc2.bin.play --norender --replay <path-to-replay> command works for me (with pygame 2.0.1). Arre you sure you're passing the --norender flag? What does the error say?

samvelyan commented 2 years ago

Closing this given no update was provided. Feel free to reopen.