facebook ELF

2017 年 8 月 3 日 CreateAMind

An End-To-End, Lightweight and Flexible Platform for Game Research





ELF: An Extensive, Lightweight and Flexible Platform for Game Research

Overview

ELF is an Extensive, Lightweight and Flexible platform for game research, in particular for real-time strategy (RTS) games. On the C++-side, ELF hosts multiple games in parallel with C++ threading. On the Python side, ELF returns one batch of game state at a time, making it very friendly for modern RL. In comparison, other platforms (e.g., OpenAI Gym) wraps one single game instance with one Python interface. This makes concurrent game execution a bit complicated, which is a requirement of many modern reinforcement learning algorithms.

Besides, ELF now also provides a Python version for running concurrent game environments, by Python multiprocessing with ZeroMQ inter-process communication. See ./ex_elfpy.py for a simple example.

For research on RTS games, ELF comes with an fast RTS engine, and three concrete environments: MiniRTS, Capture the Flag and Tower Defense. MiniRTS has all the key dynamics of a real-time strategy game, including gathering resources, building facilities and troops, scouting the unknown territories outside the perceivable regions, and defend/attack the enemy. User can access its internal representation and can freely change the game setting.




ELF has the following characteristics:

  • End-to-End: ELF offers an end-to-end solution to game research. It provides miniature real-time strategy game environments, concurrent simulation, intuitive APIs, web-based visualzation, and also comes with a reinforcement learning backend empowered by Pytorch with minimal resource requirement.

  • Extensive: Any game with C/C++ interface can be plugged into this framework by writing a simple wrapper. As an example, we already incorporate Atari games into our framework and show that the simulation speed per core is comparable with single-core version, and is thus much faster than implementation using either multiprocessing or Python multithreading. In the future, we plan to incorporate more environments, e.g., DarkForest Go engine.

  • Lightweight: ELF runs very fast with minimal overhead. ELF with a simple game (MiniRTS) built on RTS engine runs 40K frame per second per core on a MacBook Pro. Training a model from scratch to play MiniRTS takes a day on 6 CPU + 1 GPU.

  • Flexible: Pairing between environments and actors is very flexible, e.g., one environment with one agent (e.g., Vanilla A3C), one environment with multiple agents (e.g., Self-play/MCTS), or multiple environment with one actor (e.g., BatchA3C, GA3C). Also, any game built on top of the RTS engine offers full access to its internal representation and dynamics. Besides efficient simulators, we also provide a lightweight yet powerful Reinforcement Learning framework. This framework can host most existing RL algorithms. In this open source release, we have provided state-of-the-art actor-critic algorithms, written in PyTorch.

Documentation

Check here for detailed documentation. You can also compile your version in ./doc using sphinx.





登录查看更多
0

相关内容

RTS:Real-Time Systems。 Explanation:实时系统。 Publisher:Springer。 SIT:http://dblp.uni-trier.de/db/journals/rts/
抢鲜看!13篇CVPR2020论文链接/开源代码/解读
专知会员服务
50+阅读 · 2020年2月26日
开源书:PyTorch深度学习起步
专知会员服务
51+阅读 · 2019年10月11日
强化学习最新教程,17页pdf
专知会员服务
182+阅读 · 2019年10月11日
MIT新书《强化学习与最优控制》
专知会员服务
282+阅读 · 2019年10月9日
谷歌足球游戏环境使用介绍
CreateAMind
33+阅读 · 2019年6月27日
2018机器学习开源资源盘点
专知
6+阅读 · 2019年2月2日
Facebook PyText 在 Github 上开源了
AINLP
7+阅读 · 2018年12月14日
Arxiv
3+阅读 · 2012年11月20日
VIP会员
相关VIP内容
抢鲜看!13篇CVPR2020论文链接/开源代码/解读
专知会员服务
50+阅读 · 2020年2月26日
开源书:PyTorch深度学习起步
专知会员服务
51+阅读 · 2019年10月11日
强化学习最新教程,17页pdf
专知会员服务
182+阅读 · 2019年10月11日
MIT新书《强化学习与最优控制》
专知会员服务
282+阅读 · 2019年10月9日
相关资讯
谷歌足球游戏环境使用介绍
CreateAMind
33+阅读 · 2019年6月27日
2018机器学习开源资源盘点
专知
6+阅读 · 2019年2月2日
Facebook PyText 在 Github 上开源了
AINLP
7+阅读 · 2018年12月14日
Top
微信扫码咨询专知VIP会员