ALRhub / fancy_gym

Fancy Gym: Unifying interface for various RL benchmarks with support for Black Box approaches.
https://alrhub.github.io/fancy_gym/
MIT License
33 stars 15 forks source link
bechmarks control deep-learning gymnasium machine-learning reinforcement-learning robotics




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:

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.