Griddly  by Bam4d

Develop and train AI agents in custom grid-world environments

Created 6 years ago
252 stars

Top 99.6% on SourcePulse

GitHubView on GitHub
Project Summary

Griddly is a highly optimized grid-world game engine designed for accelerating game AI research. It empowers researchers to rapidly prototype and test complex AI agents within diverse, customizable environments. Key benefits include extreme execution speed, flexible environment design via a declarative language, and seamless integration with popular reinforcement learning frameworks.

How It Works

The engine utilizes a declarative YAML-based language (GDY) for defining game mechanics, objects, and rules, enabling rapid iteration on environment design. Griddly achieves exceptional performance (up to 70k FPS on a single thread) through heavy optimization and GPU-accelerated rendering, abstracting away complex graphics code. It supports multiple agent interfaces (single, multi-agent, RTS) and configurable observation spaces, including vectorized, one-hot encoded, and rendered outputs, alongside custom shader support for unique visualizations.

Quick Start & Requirements

  • Install: pip install griddly
  • Prerequisites: Python environment, Conan package manager (pip install conan), CMake, and OS-specific build tools (Visual Studio Build Tools for Windows, Xcode CLI/Homebrew for macOS). Vulkan SDK (including validation layers) is required for debug builds.
  • Documentation: griddly.readthedocs.org
  • Community: Discord

Highlighted Details

  • Performance: Achieves up to 70,000 frames per second on a single thread.
  • Environment Design: GDY language for defining game mechanics, proximity triggers, projectiles, and level layouts.
  • Rendering: GPU-accelerated rendering with support for sprites, simple shapes, custom SPIR-V shaders, and lighting effects.
  • AI Features: Copyable forward game state models (ideal for MCTS), integration with RLLib and Wandb.
  • Observation Modes: Configurable partial observability, vectorized, one-hot encodings, and rendered views.

Maintenance & Community

The project maintains an active community via Discord for support and discussion. Full documentation is available online. No specific details on core maintainers, sponsorships, or roadmap were provided in the README.

Licensing & Compatibility

The provided README does not explicitly state the software license. This omission requires clarification for adoption decisions, especially concerning commercial use or integration into proprietary systems.

Limitations & Caveats

The build process for native or WebAssembly binaries involves complex dependencies like Conan and CMake, potentially posing a setup challenge. Debug builds require the Vulkan SDK, adding another prerequisite. The absence of a clear license is a significant adoption blocker.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.