ELF  by facebookresearch

Game research platform for real-time strategy (RTS) games

created 8 years ago
2,093 stars

Top 21.9% on sourcepulse

GitHubView on GitHub
Project Summary

ELF is a C++/Python platform designed for extensive, lightweight, and flexible game research, particularly for real-time strategy (RTS) games. It enables researchers to run multiple game instances concurrently, which is crucial for modern reinforcement learning (RL) algorithms, and offers built-in RL backends powered by PyTorch.

How It Works

ELF's core innovation lies in its ability to host multiple game instances in parallel using C++ threading, returning batches of game states to Python. This contrasts with single-instance wrappers like OpenAI Gym, simplifying concurrent execution for RL. A Python version with ZeroMQ inter-process communication is also available. The platform includes a fast RTS engine with environments like MiniRTS, Capture the Flag, and Tower Defense, providing full access to internal game representations for flexible agent-environment pairing.

Quick Start & Requirements

  • Install: Clone the repository, install Miniconda, create a elf conda environment, install PyTorch (with CUDA if applicable), msgpack_numpy, tqdm, libgcc, and ensure cmake >= 3.8, gcc >= 4.9, and tbb (Linux libtbb-dev) are installed. Compile the C++ components using cmake and make.
  • Dependencies: Python 3.x, C++11 compiler, tbb, cmake >= 3.8, PyTorch (0.2.0+), tqdm, zmq, msgpack, msgpack_numpy. CUDA is recommended for GPU acceleration.
  • Training: Run sh ./train_minirts.sh --gpu 0.
  • Documentation: here

Highlighted Details

  • Achieves 40K FPS per core on a MacBook Pro with MiniRTS.
  • Supports flexible agent-environment pairings (one-to-one, one-to-many, many-to-one).
  • Includes Atari games and a DarkForest Go engine integration.
  • Offers a web-based visualization tool for game replays.

Maintenance & Community

The project is from Facebook AI Research. Links to tutorials and documentation are provided.

Licensing & Compatibility

The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project was last updated in 2017, and some dependencies like PyTorch 0.2.0 are significantly outdated, potentially requiring substantial effort to update for modern systems. The installation instructions are Linux-centric.

Health Check
Last commit

3 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
6 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.