-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature(rjy): add smac env #171
base: main
Are you sure you want to change the base?
Conversation
zoo/smac/utils/eval.py
Outdated
path = '../exp/MMM/qmix/1/ckpt_BaseLearner_Wed_Jul_14_22_16_56_2021/iteration_9900.pth.tar' | ||
cfg = '../config/smac_MMM_qmix_config.py' | ||
state_dict = torch.load(path, map_location='cpu') | ||
eval(cfg, seed=0, state_dict=state_dict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在安装好SMAC后,需要保证这里给出的eval是可运行的,并且可以存储replay的gif或者MP4文件
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里是之前diengine的,我先删掉,后续lz pipeline可以收敛有ckpt后再增加这个eval文件
@@ -0,0 +1,7 @@ | |||
import warnings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
增加一下SMAC 在 SEZ/EZ independent learning 上的可运行config
@@ -0,0 +1,58 @@ | |||
## PYSC2 Env | |||
SMAC (StarCraft Multi-Agent Challenge) is an environment used for multi-agent reinforcement learning research based on the popular real-time strategy game StarCraft II. It provides a suite of tasks where agents need to cooperate to achieve specific objectives. This environment is widely used to benchmark the performance of multi-agent learning algorithms. LightZero use modified pysc2 env (for more maps and agent vs agent training). | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SMAC 和 pysc2 加上超链接
1. **Install StarCraft II:** | ||
```bash | ||
# Create a conda environment | ||
conda create -n ace python=3.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ace 换成 lightzero-smac ?
2. **Install dependencies:** | ||
```bash | ||
# Install PySC2 and Protobuf | ||
pip install pysc2 protobuf==3.19.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我的mac本地protobuf==3.20.0测试的报错少一些,你保证按照这里的方式能成功通过测试就好哈
|
||
2. **Run the tests using pytest:** | ||
```bash | ||
pytest test_smac_env.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
smac
@@ -0,0 +1,15 @@ | |||
# Notes on Two Player Maps | |||
|
|||
Before starting, you need to do the following things: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two Player Maps具体相对SMAC_Maps的区别是什么?这个文档更新一下吧
zoo/smac/envs/test_smac_env.py
Outdated
@pytest.mark.envtest | ||
class TestSmacEnv: | ||
|
||
def test_samc(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
smac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你本地测试通过了吗?
import os | ||
|
||
|
||
class SMACMap(lib.Map): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个和DI-engine里面的一样吗?如果一样import就可以哈
PR Description
This PR introduces the SMAC (StarCraft Multi-Agent Challenge) environment to the LightZero repository. The included environment is fully operational and has been tested for functionality. However, please note that there are currently no matching pipelines available for this environment within the repository. Future updates will include the necessary pipelines to fully integrate SMAC with LightZero.
Key Points:
Next Steps:
Thank you for reviewing this PR. Please feel free to provide any feedback or suggestions for improvements.