I am trying to implement AlphaStar based on supplementary material of DeepMind.
- Download replay file(4.8.2 version file is needed): https://github.com/Blizzard/s2client-proto/tree/master/samples/replay-api
- Extracting observation, action from replay file: https://github.com/narhen/pysc2-replay
- Transfomer network of Tensorflow 2.0: https://www.tensorflow.org/tutorials/text/transformer
- Resblock of Tensorflow 2.0: https://zhuanlan.zhihu.com/p/87047648
- Python3
- PySC2 3.0.0
- Tensorflow 2.2.0
To check you setting all your computer environment correctly. Run env_test.py file in your terminal.
Then, screen of PySC2 will start and you can see some activation of rule-based agent of Terran.
I am writing explanation for code at Medium as series.
- Tutorial about replay file: https://medium.com/@dohyeongkim/alphastar-implementation-serie-part1-606572ddba99
- Tutorial about agent class: https://medium.com/@dohyeongkim/alphastar-implementation-serie-part2-3edced5df00b
- Tutorial about encoder network: https://medium.com/@dohyeongkim/alphastar-implementation-series-part3-d315d2ad5a3
- Tutorial about head network: https://dohyeongkim.medium.com/alphastar-implementation-series-part4-ee64bb93fe59
- Tutorial about training network: https://dohyeongkim.medium.com/alphastar-implementation-series-part5-fd275bea68b5
I am adding the necessary code for running AlphaStar based on psuedocode of DeepMind paper
- Extract information from Replay file: trajectory.py file
- Encoder, Core, Head network: network.py file
- Preprocessing function : utils.py file
- Edited unit inforamtion of PySC2: units_new.py file
- Edited upgrade inforamtion of PySC2: upgrades_new.py file
You can run AlphaStar application by running alphastar.py file after putting all additional file in same folder.
$ python alphastar.py