Skip to main content

Fancy Gym: Unifying interface for various RL benchmarks with support for Black Box approaches.

Project description




Fancy Gym

Built upon the foundation of Gymnasium (a maintained fork of OpenAI’s renowned Gym library) fancy_gym offers a comprehensive collection of reinforcement learning environments.

Key Features:

  • New Challenging Environments: fancy_gym includes several new environments (Panda Box Pushing, Table Tennis, etc.) that present a higher degree of difficulty, pushing the boundaries of reinforcement learning research.
  • Support for Movement Primitives: fancy_gym supports a range of movement primitives (MPs), including Dynamic Movement Primitives (DMPs), Probabilistic Movement Primitives (ProMP), and Probabilistic Dynamic Movement Primitives (ProDMP).
  • Upgrade to Movement Primitives: With our framework, it’s straightforward to transform standard Gymnasium environments into environments that support movement primitives.
  • Benchmark Suite Compatibility: fancy_gym makes it easy to access renowned benchmark suites such as DeepMind Control and Metaworld, whether you want to use them in the regular step-based setting or using MPs.
  • Contribute Your Own Environments: If you’re inspired to create custom gym environments, both step-based and with movement primitives, this guide will assist you. We encourage and highly appreciate submissions via PRs to integrate these environments into fancy_gym.

Quickstart Guide

⚠ We recommend installing fancy_gym into a virtual environment as provided by venv, Poetry or Conda.

Install via pip or use an alternative installation method

    pip install 'fancy_gym[all]'

Try out one of our step-based environments or explore our other envs

   import gymnasium as gym
   import fancy_gym
   import time

   env = gym.make('fancy/BoxPushingDense-v0', render_mode='human')
   observation = env.reset()
   env.render()

   for i in range(1000):
      action = env.action_space.sample() # Randomly sample an action
      observation, reward, terminated, truncated, info = env.step(action)
      time.sleep(1/env.metadata['render_fps'])

      if terminated or truncated:
            observation, info = env.reset()

Explore the MP-based variant or learn more about Movement Primitives (MPs)

   import gymnasium as gym
   import fancy_gym

   env = gym.make('fancy_ProMP/BoxPushingDense-v0', render_mode='human')
   env.reset()
   env.render()

   for i in range(10):
      action = env.action_space.sample() # Randomly sample MP parameters
      observation, reward, terminated, truncated, info = env.step(action) # Will execute full trajectory, based on MP
      observation = env.reset()

Documentation

Documentation for fancy_gym can be found here; Usage Examples can be found here.

Citing the Project

To cite this repository in publications:

@software{fancy_gym,
	title = {Fancy Gym},
	author = {Otto, Fabian and Celik, Onur and Roth, Dominik and Zhou, Hongyi},
	abstract = {Fancy Gym: Unifying interface for various RL benchmarks with support for Black Box approaches.},
	url = {https://github.com/ALRhub/fancy_gym},
	organization = {Autonomous Learning Robots Lab (ALR) at KIT},
}

Icon Attribution

The icon is based on the Gymnasium icon as can be found here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fancy_gym-0.3.0.tar.gz (24.6 MB view details)

Uploaded Source

Built Distribution

fancy_gym-0.3.0-py3-none-any.whl (24.6 MB view details)

Uploaded Python 3

File details

Details for the file fancy_gym-0.3.0.tar.gz.

File metadata

  • Download URL: fancy_gym-0.3.0.tar.gz
  • Upload date:
  • Size: 24.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for fancy_gym-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c6ab9c54d2f135641af5d8622bc82863b5b22f65754deaf72d1c76399eb7f2c9
MD5 b9b40911135a3c7bc5e07fb1c058224e
BLAKE2b-256 1a830a3354c5b44ac89ffaedb31e1c273367bd7fb1fa415297569661c3493ba5

See more details on using hashes here.

File details

Details for the file fancy_gym-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: fancy_gym-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 24.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for fancy_gym-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 04813bfc806b3cb3542464b696c33b98d44d4ca9c2f0d6194b6e5950310ee03b
MD5 b0704d0ab3a2781dbd1b4c9be9cff85f
BLAKE2b-256 76a540838efda1218fb51bed6e6774749248d5e473d28e57aed4b6ae6f94e43c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page