This is the codebase for the SCII case study of NeurIPS2020 spotlight paper Incorporating Pragmatic Reasoning Communication into Emergent Language, authored by Yipeng Kang, Tonghan Wang and Gerard de Melo. It is based on NDQ, PyMARL and SMAC, which are open-sourced.
Tested Environment: AWS g4dn.xlarge GPU (NVIDIA T4 Tensor Core GPU) instance Ubuntu 16.04 (with CUDA cuDNN, NVIDIA-Docker)
To install necessary dependencies, build the Dockerfile using
cd docker
bash build.sh
Set up StarCraft II and SMAC:
bash install_sc2.sh
This will download SC2 into the 3rdparty folder and copy the required maps.
Config in sc2.yaml to use the default map.
map_name: "1o_2r_vs_4r"
For long-term training:
Config in defaulty.yaml
evaluate: "False"
Config in categorical_qmix.yaml, to use the pretrained model. Or comment out this item to train from scratch.
checkpoint_path: "results/models/cate_qmix_smac_parallel__2020-05-26_16-14-23__1o_2r_vs_4r/"
For short-term basseline and pragmatics testing: Config in defaulty.yaml
evaluate: "True"
Config "checkpoint_path" to your model path.
Run:
bash run_interactive.sh $GPU python3 src/main.py --config=categorical_qmix --env-config=sc2
The testing result metrics (took about 10-20 minutes to run):
drop rate | baseline | pragmatics |
---|---|---|
0% | 80.3% | 79.8% |
30% | 77.8% | 79.7% |
60% | 67.5% | 70.9% |
80% | 56.3% | 63.1% |
90% | 49.1% | 56.6% |
95% | 48.4% | 53.1% |
98% | 47.2% | 50.0% |
100% | 40.6% | 50.6% |