StarCraft II Install on Windows

StarCraft II Install on Windows

스타크래프트 II 윈도우에서 환경 설정하기

Windows에서 from scratch로 스타크래프트 AI 연구하는 튜토리얼입니다. Tensorflow 버전에 따라서 많은 에러와 버그가 날 수 있으니 유의해주세요.

같이 연구하고 있는 Chris Song님의 튜토리얼를 참고했습니다.

오늘 설명할 부분은 다음과 같습니다

  • NVIDIA CUDA 8.0 설치
  • Cudnn 6.0 설치
  • TensorFlow 1.3.0 설치
  • pysc2 설치

NVIDIA CUDA 8.0 설치

Cudnn 6.0 설치

[https://developer.nvidia.com/rdp/cudnn-download] 이 링크에서 받습니다. cuDNN v6.0 Library for Windows를 받으면 됩니다.

TensorFlow 1.3.0 설치

pip install tensorflow-gpu
python -m pip install pysc2

이 에러 가 떠버려서 setuptools를 업그레이드 해 줍니다.

python -m pip install --upgrade pip setuptools

리눅스에서는

pip install pysc2

로 충분합니다

python -m pip install

chris님의 code를 가지고 튜토리얼을 진행하면

일단 python으로 실행하면 baseline 패키지가 없는 것을 알 수 있습니다.

필요한 package dependency는 확인하면

  • pysc2 (Deepmind) [https://github.com/deepmind/pysc2]
  • baselines (OpenAI) [https://github.com/openai/baselines]
  • s2client-proto (Blizzard) [https://github.com/Blizzard/s2client-proto]
  • Tensorflow 1.3 (Google) [https://github.com/tensorflow/tensorflow]

여기에 [C:\Program Files (x86)\StarCraft II\Maps\mini_games]에 map을 설치해줍니다.

https://github.com/deepmind/pysc2/issues/53 위와 같은 에러가 뜬다.

I am able to reproduce this. I can look into it on Tuesday.

There is a way to downgrade back to 3.16.1 but it is a bit annoying since PySC2 hasn’t added support for it.

A hacky way of doing it:

  • Make sure you have the 3.16.1 binary still installed:
    • You should see this folder: C:\Program Files (x86)\StarCraft II\Versions\Base55958
    • If missing, launch the game normally and play an old 3.16.1 replay which should download it.
  • Rename the other BaseXXXXX folders to something else to force PySC2 to only find the 55958 one.
  • In “pysc2/lib/sc_process.py”, add this to the list of command line arguments:
  • “-dataversion”, “5BD7C31B44525DAB46E64C4602A81DC2”
  • (The magic string comes from here: (https://github.com/Blizzard/s2client-proto/blob/master/buildinfo/versions.json))

pysc2/lib의 sc_process 71번째 line에 추가하면 된다.

starcraft_research 완성된 환경

실제 학습은 리눅스 환경에서 하는 것이 더 효과적일 것 같긴 한데 이 부분은 더 알아봐야겠다.

Author face

B-Boy Seiok

Pianist, B-Boy, street artist

Recent post