• Stars
    star
    118
  • Rank 290,182 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 1 year ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An API conversion tool for popular external reinforcement learning environments

pre-commit Code style: black DOI

Shimmy is an API conversion tool providing Gymnasium and PettingZoo bindings for popular external reinforcement learning environments.

The documentation website is at shimmy.farama.org and we have a public discord server (which we also use to coordinate development work) that you can join here: https://discord.gg/nhvKkYa6qX

Supported APIs

OpenAI Gym

Atari Environments for OpenAI Gym

DeepMind Control

DeepMind Control: Multi-Agent

DMLab

OpenSpiel

Behavior Suite

Melting Pot

Installation and Usage

To install Shimmy from PyPI:

pip install shimmy

To install required dependencies for environments, specify them as follows:

pip install shimmy[bsuite, atari]

Choices: gym-v21, gym-v26, atari, bsuite, dm-control, dm-control-multi-agent, openspiel, meltingpot

For development and testing:

pip install shimmy[all, testing]

At a glance

This is an example of using Shimmy to convert DM Control environments into a Gymnasium compatible environment:

import gymnasium as gym
from shimmy.registration import DM_CONTROL_SUITE_ENVS

env_ids = [f"dm_control/{'-'.join(item)}-v0" for item in DM_CONTROL_SUITE_ENVS]
print(env_ids)

env = gym.make(env_ids[0])
env_flatten = gym.wrappers.FlattenObservation(env)
print(env_ids[0])
print("===🌎", env.observation_space)
print("===🕹ī¸", env.action_space)
print("---flattened 🌎", env_flatten.observation_space)
print("---flattened 🕹ī¸", env_flatten.action_space)
['dm_control/acrobot-swingup-v0', 'dm_control/acrobot-swingup_sparse-v0', 'dm_control/ball_in_cup-catch-v0', 'dm_control/cartpole-balance-v0', 'dm_control/cartpole-balance_sparse-v0', 'dm_control/cartpole-swingup-v0', 'dm_control/cartpole-swingup_sparse-v0', 'dm_control/cartpole-two_poles-v0', 'dm_control/cartpole-three_poles-v0', 'dm_control/cheetah-run-v0', 'dm_control/dog-stand-v0', 'dm_control/dog-walk-v0', 'dm_control/dog-trot-v0', 'dm_control/dog-run-v0', 'dm_control/dog-fetch-v0', 'dm_control/finger-spin-v0', 'dm_control/finger-turn_easy-v0', 'dm_control/finger-turn_hard-v0', 'dm_control/fish-upright-v0', 'dm_control/fish-swim-v0', 'dm_control/hopper-stand-v0', 'dm_control/hopper-hop-v0', 'dm_control/humanoid-stand-v0', 'dm_control/humanoid-walk-v0', 'dm_control/humanoid-run-v0', 'dm_control/humanoid-run_pure_state-v0', 'dm_control/humanoid_CMU-stand-v0', 'dm_control/humanoid_CMU-run-v0', 'dm_control/lqr-lqr_2_1-v0', 'dm_control/lqr-lqr_6_2-v0', 'dm_control/manipulator-bring_ball-v0', 'dm_control/manipulator-bring_peg-v0', 'dm_control/manipulator-insert_ball-v0', 'dm_control/manipulator-insert_peg-v0', 'dm_control/pendulum-swingup-v0', 'dm_control/point_mass-easy-v0', 'dm_control/point_mass-hard-v0', 'dm_control/quadruped-walk-v0', 'dm_control/quadruped-run-v0', 'dm_control/quadruped-escape-v0', 'dm_control/quadruped-fetch-v0', 'dm_control/reacher-easy-v0', 'dm_control/reacher-hard-v0', 'dm_control/stacker-stack_2-v0', 'dm_control/stacker-stack_4-v0', 'dm_control/swimmer-swimmer6-v0', 'dm_control/swimmer-swimmer15-v0', 'dm_control/walker-stand-v0', 'dm_control/walker-walk-v0', 'dm_control/walker-run-v0']
dm_control/acrobot-swingup-v0
===🌎 Dict('orientations': Box(-inf, inf, (4,), float64), 'velocity': Box(-inf, inf, (2,), float64))
===🕹ī¸ Box(-1.0, 1.0, (1,), float64)
---flattened 🌎 Box(-inf, inf, (6,), float64)
---flattened 🕹ī¸ Box(-1.0, 1.0, (1,), float64)

See Basic Usage for more information.

Project Maintainers

Project Manager: Elliot Tower

Core Contributors: Jet Tai, Mark Towers

Maintenance for this project is also contributed by the broader Farama team: farama.org/team.

Citation

If you use Shimmy in your research, please cite:

@software{jun_jet_tai_2023_8140744,
  author       = {Jun Jet Tai and
                  Mark Towers and
                  Elliot Tower},
  title        = {{Shimmy: Gymnasium and PettingZoo Wrappers for
                   Commonly Used Environments}},
  month        = jun,
  year         = 2023,
  publisher    = {Zenodo},
  version      = {v1.1.0},
  doi          = {10.5281/zenodo.8140744},
  url          = {https://doi.org/10.5281/zenodo.8140744}
}

More Repositories

1

Gymnasium

An API standard for single-agent reinforcement learning environments, with popular reference environments and related utilities (formerly Gym)
Python
5,815
star
2

PettingZoo

An API standard for multi-agent reinforcement learning environments, with popular reference environments and related utilities
Python
2,392
star
3

HighwayEnv

A minimalist environment for decision-making in autonomous driving
Python
2,382
star
4

Arcade-Learning-Environment

The Arcade Learning Environment (ALE) -- a platform for AI research.
C++
2,078
star
5

Minigrid

Simple and easily configurable grid world environments for reinforcement learning
Python
2,016
star
6

ViZDoom

Reinforcement Learning environments based on the 1993 game Doom :godmode:
C++
1,673
star
7

chatarena

ChatArena (or Chat Arena) is a Multi-Agent Language Game Environments for LLMs. The goal is to develop communication and collaboration capabilities of AIs.
Python
1,227
star
8

D4RL

A collection of reference environments for offline reinforcement learning
Python
1,201
star
9

Metaworld

Collections of robotics environments geared towards benchmarking multi-task and meta reinforcement learning
Python
1,116
star
10

Miniworld

Simple and easily configurable 3D FPS-game-like environments for reinforcement learning
Python
672
star
11

Gymnasium-Robotics

A collection of robotics simulation environments for reinforcement learning
Python
437
star
12

SuperSuit

A collection of wrappers for Gymnasium and PettingZoo environments (being merged into gymnasium.wrappers and pettingzoo.wrappers
Python
432
star
13

MicroRTS

A simple and highly efficient RTS-game-inspired environment for reinforcement learning
Java
267
star
14

miniwob-plusplus

MiniWoB++: a web interaction benchmark for reinforcement learning
HTML
260
star
15

MO-Gymnasium

Multi-objective Gymnasium environments for reinforcement learning
Python
241
star
16

Minari

A standard format for offline reinforcement learning datasets, with popular reference datasets and related utilities
Python
219
star
17

MicroRTS-Py

A simple and highly efficient RTS-game-inspired environment for reinforcement learning (formerly Gym-MicroRTS)
Python
210
star
18

D4RL-Evaluations

Python
184
star
19

MAgent2

An engine for high performance multi-agent environments with very large numbers of agents, along with a set of reference environments
C++
183
star
20

stable-retro

Retro games for Reinforcement Learning
C
124
star
21

AutoROM

A tool to automate installing Atari ROMs for the Arcade Learning Environment
Python
75
star
22

gym-examples

Example code for the Gym documentation
Python
66
star
23

Jumpy

On-the-fly conversions between Jax and NumPy tensors
Python
43
star
24

gym-docs

Code for Gym documentation website
39
star
25

CrowdPlay

A web based platform for collecting human actions in reinforcement learning environments
Jupyter Notebook
26
star
26

Procgen2

Fast and procedurally generated side-scroller-game-like graphical environments (formerly Procgen)
C++
24
star
27

momaland

Benchmarks for Multi-Objective Multi-Agent Decision Making
Python
22
star
28

TinyScaler

A small and fast image rescaling library with SIMD support
C
19
star
29

rlay

A relay between Gymnasium and any software
Rust
7
star
30

gymnasium-env-template

A template gymnasium environment for users to build upon
Jinja
6
star
31

farama.org

HTML
2
star
32

A2Perf

A2Perf is a benchmark for evaluating agents on sequential decision problems that are relevant to the real world. This repository contains code for running and evaluating participant's submissions on the benchmark platform.
Python
2
star
33

gym-notices

Python
1
star
34

Celshast

Sass
1
star
35

MPE2

1
star
36

Farama-Notifications

Allows for providing notifications on import to all Farama Packages
Python
1
star
37

a2perf-benchmark-submission

Python
1
star
38

a2perf-web-nav

HTML
1
star
39

a2perf-quadruped-locomotion

Python
1
star
40

a2perf-reliability-metrics

Python
1
star
41

a2perf-code-carbon

Jupyter Notebook
1
star