Closed douglasrizzo closed 4 years ago
@douglasrizzo Is it important? For SC2, is using GPU slower?
@douglasrizzo Is is really important? For SC2, is using GPU slower?
Each sc2 process eating GPU memory, the number of parallel environments running is limited by your GPU VRAM.
I wonder how to tell sc2 that no rendering will be done
I wonder how to tell sc2 that no rendering will be done
I got it, go to /your/path/to/python/site-packages/pysc2/run_configs/platforms.py Change the code in line 186
def start(self, want_rgb=True, **kwargs):
extra_args = kwargs.pop("extra_args", [])
to
def start(self, want_rgb=False, **kwargs):
extra_args = kwargs.pop("extra_args", [])
@Leo-xh I think you can actually instantiate a run_config
object in your code with want_rgb=True
instead of changing pysc2 directly.
@douglasrizzo
Hi, actually, I am quite confused by the mechanism of SC2, if I run 8 parallel envs, will the SC2 spawn an SC2 daemon and 8 child process?
@douglasrizzo Is is really important? For SC2, is using GPU slower?
Each sc2 process eating GPU memory, the number of parallel environments running is limited by your GPU VRAM.
I see. That is a quite large overhead of GPU memory.
Thanks @douglasrizzo !
@douglasrizzo Great improvement for SMAC. May I ask you a question, for beginners, how to read the PySC2 code to grasp a deeper understanding of SC2? For me, PySC2 is really a black-box.
Steven Brown's tutorials on how to create StarCraft II agents from scratch, without using reinforcement learning.
Chris Hoyean Song's tutorials include RL and DRL algorithms, but are a little outdated in regards to the PySC2 API.
Reaver: Modular Deep Reinforcement Learning Framework. Focused on StarCraft II. Supports Gym, Atari, and MuJoCo. Matches reference results. python-sc2: A StarCraft II API Client for Python 3
@GoingMyWay
Tutorials and examples
Steven Brown's tutorials on how to create StarCraft II agents from scratch, without using reinforcement learning.
- Zerg bot in PySC2 2.0: blog post and code
- Protoss bot with raw observations: blog post and code
- Repo with all examples
Chris Hoyean Song's tutorials include RL and DRL algorithms, but are a little outdated in regards to the PySC2 API.
- Initial tutorial (2017)
- Tutorial on observations (2017)
- Tutorial on the action space (2019)
- Repo with code
Third-party libraries
Reaver: Modular Deep Reinforcement Learning Framework. Focused on StarCraft II. Supports Gym, Atari, and MuJoCo. Matches reference results. python-sc2: A StarCraft II API Client for Python 3
Online communities
@GoingMyWay
Really, really great! Thanks, hope I can contribute more to this community.
Basically, it solves this problem https://github.com/deepmind/pysc2/issues/235 by telling SC2 that no rendering will be done, and so the SC2 process will not consume GPU memory.
This is a screenshot of
nvidia-smi
in a computer before I applied this patch:Notice all the SC2_x64 processes. The image below is after I applied the patch: