slimevolleygym  by hardmaru

Gym environment for single/multi-agent RL research

created 5 years ago
759 stars

Top 46.7% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides a simple, lightweight OpenAI Gym environment for Slime Volleyball, targeting reinforcement learning researchers and practitioners. It facilitates testing single-agent, multi-agent, and self-play RL algorithms with both state-space and pixel-based observations, offering a fast iteration loop for developing and evaluating agents.

How It Works

The environment simulates a 2D physics-based volleyball game where agents aim to score by grounding the ball on the opponent's side. It offers state-space observations (12-dimensional vector) and pixel observations (84x168x3 RGB frames), mimicking Atari environments. The core advantage lies in its minimal dependencies (Gym, NumPy) and efficient implementation, allowing rapid experimentation and straightforward integration with standard RL algorithms and multi-agent setups.

Quick Start & Requirements

  • Install via pip: pip install slimevolleygym
  • Install from repo for examples: git clone https://github.com/hardmaru/slimevolleygym.git && cd slimevolleygym && pip install -e .
  • Run a state-based demo: python test_state.py
  • Run a pixel-based demo: python test_pixel.py
  • Dependencies: gym, numpy. Pixel version may require pyglet (tested with <0.15.7).
  • Official docs/tutorials: TRAINING.md

Highlighted Details

  • Supports state-space (12-dim) and pixel (84x168x3) observations.
  • Offers MultiBinary(3) and Discrete(6) action spaces for different RL frameworks.
  • Includes example scripts for single-agent, self-play, and multi-agent training.
  • Benchmarks show competitive performance against various RL algorithms like PPO and CMA-ES.

Maintenance & Community

  • Developed by David Ha.
  • Active community contributions are encouraged via PRs for publications and new methods.
  • Citation details provided via BibTeX.

Licensing & Compatibility

  • MIT License.
  • Permissive license allows for commercial use and integration into closed-source projects.

Limitations & Caveats

The environment's API was developed for older Gym versions (0.19.0 or earlier), and compatibility with newer versions is not guaranteed due to potential API-breaking changes. The pyglet dependency for pixel rendering was tested with versions prior to 0.15.7.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.