Multiagent research environment toolbox based on Unreal Engine
The present study aims to identify potential collaboration partners. If interested in this research project, please feel free to contact our office at CASIA: [email protected].
我们(中科院自动化研究所,群体智能团队)欢迎来自各院所的合作伙伴,可分享拓展资源(地图,智能体建模等),请通过以下邮箱联系我们:
[email protected]
,[email protected]
This is Unreal-based Multi-Agent Playground (U-Map, previous project name is UHMP for Hybrid Unreal-based Multi-agent Playground)
Here you can use all the capabilities of Unreal Engine (Blueprints, Behavior tree, Physics engine, AI navigation, 3D models/animations and Plugin resources, etc) to build elegant (but also computational efficient) and magnificent (but also experimentally reproducible) multi-agent environments.
Developed with Unreal Engine, documenting is in process. 基于UnrealEngine开发,文档正在完善中。
Please star
the Github project. Your encouragement is extremely important to us as researchers: https://github.com/binary-husky/unreal-hmp
此项目处于活跃开发阶段,请打星关注哦。
Unreal-based Multi-Agent Playground (U-Map, previously called UHMP) is a new generation of multi-agent environment simulation environment based on the Unreal Engine. This platform supports adversial training between swarms & algorithms, and it is the first (and currently the only) Extensible RL environment based on the Unreal Engine to support multi-team training. U-Map is oriented to adversarial heterogeneous multi-agent reinforcement learning scenarios. The interface is written in Python, The Unreal Engine part uses C++ to handle the communication interface with Python, and other parts use blueprints. The project introduces libs such as xtensor to accelerate the mathematical operations of C++. In terms of scientific research and experiment:
Unreal-based Multi-Agent Playground (U-Map, 之前的名称是UHMP) 是基于虚幻引擎的新一代多智能体环境仿真环境。 该平台支持多队伍对抗,为第一个(也是目前为止唯一一个)基于虚幻引擎的多智能体+多队伍强化学习环境。 U-Map面向对抗性异构多智能体强化学习场景。 接口部分采用Python编写, 虚幻引擎部分采用C++处理与Python的通讯接口,其他部分采用蓝图。 项目引入xtensor用于加速C++部分的数学运算。 在科研实验方面:
https://docs.unrealengine.com/4.27/zh-CN/ProductionPipelines/DevelopmentSetup/BuildingUnrealEngine/
git clone https://github.com/binary-husky/unreal-hmp.git
python Please_ Run_ This_ First_ To_ Fetch_ Big_ Files.py
UHMP.upproject
downloaded in step 3, select switch unreal engine version
, and then select source build at xxxxx
to confirm. Then open the generated UHMP. sln
and compile itUHMP. upproject
to enter the Unreal Engine Editor.Note that steps 1 and 4 are difficult. It is recommended to refer to the following video (the 0:00->1:46 in the video is the steps 1, and 1:46->end is steps 4): https://ageasga-my.sharepoint.com/:v:/g/personal/fuqingxu_yiteam_tech/EawfqsV2jF5Nsv3KF7X1-woBH-VTvELL6FSRX4cIgUboLg?e=Vmp67E
源代码
安装虚幻引擎,具体方法见虚幻引擎的官方文档:https://docs.unrealengine.com/4.27/zh-CN/ProductionPipelines/DevelopmentSetup/BuildingUnrealEngine/
git clone https://github.com/binary-husky/unreal-hmp.git
python Please_Run_This_First_To_Fetch_Big_Files.py
。右
击第3步下载得到的UHMP.uproject
,选择switch unreal engine version
,再选择source build at xxxxx
确认。然后打开生成的UHMP.sln
,编译即可。UHMP.uproject
进入虚幻引擎编辑器。注意,第1步和第4步较难,建议参考以下视频(视频中前1分46秒为第1步流程,后面为第4步流程): https://ageasga-my.sharepoint.com/:v:/g/personal/fuqingxu_yiteam_tech/EawfqsV2jF5Nsv3KF7X1-woBH-VTvELL6FSRX4cIgUboLg?e=Vmp67E
https://github.com/binary-husky/hmp2g/blob/master/ZDOCS/use_unreal_hmap.md
The document is being improved. For the video tutorial of simple demo, see EnvDesignTutorial.pptx
(you need to complete step 3 of installation to download this pptx file)
Directory:
https://www.bilibili.com/video/BV1U24y1D7i4/?spm_id_from=333.999.0.0&vd_source=e3bc3eddd1d2414cb64ae72b6a64df55
文档正在完善,简单demo的视频教程见EnvDesignTutorial.pptx
(需要完成安装步骤3以下载此pptx文件)
设计方法目录:
第一章 虚幻引擎部分
https://www.bilibili.com/video/BV1U24y1D7i4/?spm_id_from=333.999.0.0&vd_source=e3bc3eddd1d2414cb64ae72b6a64df55
第二章 Python接口部分
第三章 附录
Run following scripts.
Render/Server
represents including graphic rendering / only computing
, the later is generally used for RL training.Windows/linux
represents the target operating system. Note that you need to install Unreal Engine Cross Compilation Tool
to compile Linux programs on Windows.运行一下脚本即可。
Render/Server
代表包含图形渲染/无界面仅计算
,后者一般用于RL训练。Win/linux
代表目标操作系统,注意在windows上编译linux程序需要安装虚幻引擎交叉编译工具
。python BuildlinuxRender.py
python BuildLinuxServer.py
python BuildWinRender.py
python BuildWinServer.py
After adding new ActionSets in Content/Assets/DefAction/ParseAction.uasset
. You may encounter Ensure condition failed: !FindPin(FFunctionEntryHelper::GetWorldContextPinName())
error during packaging, if so, find and remove an extra blueprint function parameter named __WorldContext
that you created by accident in ParseAction.uasset
. 如果在添加新的自定义动作之后遇到上述错误,说明你无意间添加了一个叫__WorldContext
的蓝图函数参数,找到并删除它即可。 https://forums.unrealengine.com/t/ensure-condition-failed-on-project-start/469587
.
如果在迁移项目后发生BuildCMakeLib.Automation.cs(45,54): error CS1002,请在VS中重新生成 (Rebuild, not Build!) AutomationTool即可。https://forums.unrealengine.com/t/unreal-engine-version-4-27-2-i-get-an-error-when-trying-to-package-any-project/270627
@misc{fu2023unrealmap,
author = {Qingxu Fu and Tianyi Hu},
title = {U-Map: Developing Complex Multi-Agent Reinforcement Learning Benchmarks with Unreal Engine.},
howpublished = {\url{https://github.com/binary-husky/unreal-map/}},
year = {2023}
}
EnvDesignTutorial.pptx
中更新了自定义动作的文档