madrona  by shacklettbp

GPU-accelerated game engine for high-throughput batch simulation

created 3 years ago
411 stars

Top 72.2% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Madrona is a GPU-accelerated game engine designed for high-throughput batch simulation, enabling thousands of virtual environment instances and millions of simulation steps per second on a single GPU. It is targeted at AI researchers and developers needing efficient, in-the-loop simulation for tasks like reinforcement learning or pixel-based agent training.

How It Works

Madrona employs a GPU-driven batch Entity Component System (ECS) architecture for high-throughput execution, with a CPU backend for debugging. This data-oriented approach allows simulators to run on either GPU or CPU without code changes. It exports simulation state as PyTorch tensors for seamless integration with machine learning frameworks and features a high-throughput batch renderer for pixel-based agent training.

Quick Start & Requirements

  • Installation: Recommended to start with example simulators (e.g., madrona_escape_room). Clone example, cd into it, pip install -e .. For Windows, open the root in Visual Studio and build with CMake support, adjusting the pip install command with -Cpackages.madrona_escape_room.ext-out-dir=<path>.
  • Prerequisites: Linux (Ubuntu 18.04+), macOS 13.x+ (Xcode 14+), Windows 11 (Visual Studio 16.4+). CMake 3.24+. Python 3.9+.
  • GPU Backend: Volta or newer NVIDIA GPU, CUDA Toolkit 12.4 or 12.8+ (CUDA 12.5/12.6 not supported). Linux required for specific unified memory features.
  • Resources: Building the engine and examples requires compilation. GPU backend requires specific NVIDIA hardware and CUDA versions.
  • Links: Madrona Engine Project Page, FAQ, Madrona Escape Room, Madrona RL Environments.

Highlighted Details

  • GPU-driven batch ECS for millions of aggregate simulation steps/sec.
  • High-throughput batch renderer for pixel-based agent training.
  • Exports ECS state as PyTorch tensors for ML integration.
  • Includes XPBD rigid body physics.

Maintenance & Community

This is a research codebase with ongoing development, potential for missing features, bugs, and breaking API changes. Users are encouraged to report issues on the GitHub repository.

Licensing & Compatibility

The repository does not explicitly state a license. The SIGGRAPH 2023 paper is cited, suggesting academic use is intended. Commercial use or linking with closed-source projects would require clarification on licensing terms.

Limitations & Caveats

The engine is a research codebase and may contain bugs, missing documentation, and breaking API changes. Dynamic addition/removal of components to entities is not currently supported; all archetypes must be declared upfront. The README notes that CUDA 12.5 and 12.6 have known bugs affecting Madrona.

Health Check
Last commit

1 week ago

Responsiveness

1 day

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

Explore Similar Projects

Feedback? Help us improve.