
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
SMARTS(Scalable Multi-Agent RL Training School)是一个用于强化学习(RL)和多智能体自动驾驶研究的仿真平台,专注于真实和多样化的交互。它是华为诺亚方舟实验室https://github.com/huawei-noah/xingtian/ RL平台套件的一部分。
相关论文:SMARTS: Scalable Multi-Agent Reinforcement Learning Training School for Autonomous Driving,其中介绍了该项目的部分目标背景。
pythonimport gym from smarts.core.agent_interface import AgentInterface, AgentType from smarts.core.agent import Agent from smarts.zoo.agent_spec import AgentSpec class SimpleAgent(Agent): def act(self, obs): return "keep_lane" agent_spec = AgentSpec( interface=AgentInterface.from_type(AgentType.Laner, max_episode_steps=None), agent_builder=SimpleAgent, ) agent_specs = { "Agent-007": agent_spec, "Agent-008": agent_spec, } env = gym.make( "smarts.env:hiway-v0", scenarios=["scenarios/sumo/loop"], agent_specs=agent_specs, ) agents = { agent_id: agent_spec.build_agent() for agent_id, agent_spec in agent_specs.items() } observations = env.reset() for _ in range(1000): agent_actions = { agent_id: agents[agent_id].act(agent_obs) for agent_id, agent_obs in observations.items() } observations, _, _, _ = env.step(agent_actions)
bashdocker pull huaweinoah/smarts:<version>
其中<version>为具体版本号,例如v0.5.1。
bashdocker run --rm -it -v /path/to/local/scenarios:/app/scenarios -p 8081:8082 huaweinoah/smarts:<version>
--rm:容器退出后自动删除-it:交互式终端-v:将本地的场景目录挂载到容器内-p:将容器内的8082端口映射到主机的8081端口(用于访问Envision)bashscl envision start -s /app/scenarios -p 8082
bashscl scenario build /app/scenarios/sumo/loop --clean
bashpython3 -m examples.single_agent --env-config=env.json
--headless:以无头模式运行,不启动图形界面--num_workers:指定并行运行的智能体数量--max_episode_steps:设置每局游戏的最大步数--render:启用渲染功能bashpython3 -m examples/multi_agent.py --scenario scenarios/sumo/loop
bashpython3 -m examples/parallel_environment.py --num_workers 4
bashpip install visdom visdom
pythonenv = gym.make( "smarts.env:hiway-v0", scenarios=["scenarios/sumo/loop"], agent_specs=agent_specs, visdom=True, )
http://localhost:8080查看可视化结果,包括传感器数据、路径规划结果等。bashgit clone https://github.com/oxwhirl/pymarl.git cd pymarl pip install -r requirements.txt python src/main.py --config=qmix --env-config=smarts
bashgit clone https://github.com/microsoft/malib.git cd malib pip install -r requirements.txt python examples/run_smarts.py --algo SAC --scenario ./scenarios/sumo/loop --n_agents 5
ps aux | grep "smarts.env"。scl scenario build <path/to/scenario>。--headless模式。如果您在研究中使用了SMARTS,请引用以下论文:
bibtex@misc{zhou2020smarts, title={SMARTS: Scalable Multi-Agent Reinforcement Learning Training School for Autonomous Driving}, author={Ming Zhou and Jun Luo and Julian Villella and Yaodong Yang and David Rusu and Jiayu Miao and Weinan Zhang and Montgomery Alban and Iman Fadakar and Zheng Chen and Aurora Chongxi Huang and Ying Wen and Kimia Hassanzadeh and Daniel Graves and Dong Chen and Zhengbang Zhu and Nhat Nguyen and Mohamed Elsayed and Kun Shao and Sanjeevan Ahilan and Baokuan Zhang and Jiannan Wu and Zhengang Fu and Kasra Rezaee and Peyman Yadollahpour and Mohsen Rohani and Nicolas Perez Nieves and Yihan Ni and Seyedershad Banijamali and Alexander Cowen Rivers and Zheng Tian and Daniel Palenicek and Haitham Bou Ammar and Hongbo Zhang and Wulong Liu and Jianye Hao and Jun Wang}, year={2020}, eprint={2010.09776}, archivePrefix={arXiv}, primaryClass={cs.MA} }
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。



来自真实用户的反馈,见证轩辕镜像的优质服务