Coder Social home page Coder Social logo

unreal-hmp's Introduction

Unreal-HMAP

基于UnrealEngine开发,文档正在完善中。Developed with Unreal Engine, documenting is in process.

此项目处于活跃开发阶段,请打星关注哦。 Please star the Github project. Your encouragement is extremely important to us as researchers: https://github.com/binary-husky/unreal-hmp

Contact us:

简介

Unreal-Based Hybrid Multiagent Playground (Unreal-HMAP) 是基于虚幻引擎的新一代多智能体环境仿真环境。 该平台支持多队伍对抗,为第一个(也是目前为止唯一一个)基于虚幻引擎的多智能体+多队伍强化学习环境。 UHMAP面向对抗性异构多智能体强化学习场景。 接口部分采用Python编写, 虚幻引擎部分采用C++处理与Python的通讯接口,其他部分采用蓝图。 项目引入xtensor用于加速C++部分的数学运算。 在科研实验方面:

  • 可编译为Headless的纯计算模式(即dedicated server,用于训练)
  • 可实现任意倍率的仿真加速,直到跑满CPU
  • 可重复性强。排除了UnrealEngine中各种会造成实验不可重复的蝴蝶效应因素
  • 支持大规模。与Python端的通讯协议高度优化,避免了随智能体数量增多导致的IO卡顿
  • 非常高效,极其节省CPU。Unreal引擎本身的效率远超预想。
  • 跨平台。不管是Windows、Linux还是MacOs都能编译Headless模式和渲染模式的客户端
  • 可跨OS连接训练中的Headless进程,甚至可以观看训练中的环境.

安装方法

  • 第1步,必须从源代码安装虚幻引擎,具体方法见虚幻引擎的官方文档:https://docs.unrealengine.com/4.27/zh-CN/ProductionPipelines/DevelopmentSetup/BuildingUnrealEngine/

  • 第2步,克隆本仓库。git clone https://github.com/binary-husky/unreal-hmp.git

  • 第3步,下载github不能管理的大文件。运行python Please_Run_This_First_To_Fetch_Big_Files.py

  • 第4步,击上一步下载的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

环境设计方法

文档正在完善,简单demo的视频教程见EnvDesignTutorial.pptx(需要完成安装步骤3以下载此pptx文件)

设计方法目录:

  • 第一章 虚幻引擎部分
    • 建立地图(Level)
    • 建立智能体蓝图(Agent Actor)
    • 设计智能体蓝图程序逻辑
    • Episode关键事件通知机制
    • 定义动作(虚幻引擎侧)(未完待续)
    • 由Python端控制Agent的自定义参数
  • 第二章 Python接口部分
    • 建立任务文件(SubTask)
    • 修改智能体初始化代码
    • 修改智能体奖励代码
    • 选择各队伍的控制算法
    • 全闭环调试方法
  • 第三章 附录
    • 无渲染加速与Linux交叉编译
    • 自定义动作(未完待续)

项目打包方法

运行一下脚本即可。

  • 其中Render/Server代表包含图形渲染/无界面仅计算,后者一般用于RL训练。
  • 其中Win/linux代表目标操作系统,注意在windows上编译linux程序需要安装虚幻引擎交叉编译工具
python BuildlinuxRender.py
python BuildLinuxServer.py
python BuildWinRender.py
python BuildWinServer.py

unreal-hmp's People

Contributors

binary-sky avatar binary-husky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.