代码:https://github.com/facebookresearch/CollaQ
讲解:https://zhuanlan.zhihu.com/p/271648948
视频:http://yuandong-tian.com/collaQ.mp4
1、下载
git clone git@github.com:facebookresearch/CollaQ.git
但是报错,所以指令换成
git clone https://github.com/facebookresearch/CollaQ.git
就没问题了。
2、配置
尽量采用以下方式来进行安装,要不就报错。
sudo pip3 install requirement.txt
我的报错no moudle named smac。这个星际争霸是要安装的,在requirement文件里面也可以自己安装
sudo pip3 install git+https://github.com/oxwhirl/smac.git
3、安装smac and sacred:
git submodule sync && git submodule update --init --recursive cd third_party/sacred git apply ../sacred.patch cd ../smac git apply ../smac.patch cd ../pymarl git apply ../pymarl.patch
4、创建src文件夹
cd ../.. cp -r third_party/pymarl/src . cp src_code/config/* src/config/algs/ cp src_code/controllers/* src/controllers/ cp src_code/learners/* src/learners/ cp src_code/modules/* src/modules/agents/
5、运行
QMIX
python src/main.py --config=qmix --env-config=sc2 with env_args.map_name=MMM2,
CollaQ
python src/main.py --config=qmix_interactive_reg --env-config=sc2 with env_args.map_name=MMM2,
CollaQ with Attn
python src/main.py --config=qmix_interactive_reg_attn --env-config=sc2 with env_args.map_name=MMM2,
CollaQ Removing Agents
python src/main.py --config=qmix_interactive_reg_attn --env-config=sc2 with env_args.map_name=29m_vs_30m,28m_vs_30m, obs_agent_id=False
CollaQ Removing Agents
python src/main.py --config=qmix_interactive_reg_attn --env-config=sc2 with env_args.map_name=27m_vs_30m,28m_vs_30m, obs_agent_id=False