Shimmy

Latest version: v2.0.0

Safety actively analyzes 634667 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 2

1.0.0

We are excited to announce the mature release of [Shimmy](https://shimmy.farama.org/), an API compatibility tool for converting external RL environments to the [Gymnasium](https://gymnasium.farama.org/) and [PettingZoo](https://pettingzoo.farama.org/) APIs. This allows users to access a wide range of single and multi-agent environments, all under a single standard API.

Within Reinforcement learning (RL), a number of API's are used to implement environments, with limited ability to convert between them. This makes training agents across different APIs highly difficult. Shimmy addresses this issue by integrating a range of APIs into the Farama ecosystem. This is part of the [Farama Foundation](https://farama.org/)'s greater goal of creating a unified and user-friendly ecosystem for open-source reinforcement learning software, for both research and industry.

We plan to maintain Shimmy for the long term, and are welcome to new contributions or suggestions. Future plans include general [DM Env](https://github.com/deepmind/dm_env) and [DM lab2d](https://github.com/deepmind/lab2d) support, and additional environments such as [ai-safety-gridworlds](https://github.com/deepmind/ai-safety-gridworlds).

Shimmy's documentation can be found at [shimmy.farama.org](https://shimmy.farama.org/). This includes an overview of each environment with screenshots, installation instructions, full usage scripts, and API information.

Environments

Single-agent (Gymnasium wrappers):

* [Arcade Learning Environments](https://github.com/mgbellemare/Arcade-Learning-Environment)
* [DeepMind Behavior Suite](https://shimmy.farama.org/contents/bsuite/)
* [DeepMind Control](https://github.com/deepmind/dm_control/)
* [DeepMind Lab](https://github.com/deepmind/lab)
* [OpenAI Gym](https://github.com/openai/gym) - [V21](https://github.com/openai/gym/releases/tag/v0.21.0)
* [OpenAI Gym](https://github.com/openai/gym) - [V26](https://github.com/openai/gym/releases/tag/0.26.0) (breaking API change)

Multi-agent (PettingZoo wrappers):

* [DeepMind OpenSpiel](https://github.com/deepmind/open_spiel)
* [DeepMind Control: Soccer](https://github.com/deepmind/dm_control/blob/main/dm_control/locomotion/soccer/README.md)
* [DeepMind Melting Pot](https://github.com/deepmind/meltingpot)


Single-agent environments can be easily loaded using Gymnasium’s [registry ](https://gymnasium.farama.org/api/registry/)and `make()` function as follows:

python
import gymnasium as gym
env = gym.make("dm_control/acrobot-swingup_sparse-v0", render_mode="human")


Multi-agent environments can be loaded with PettingZoo as follows:
python
from shimmy import MeltingPotCompatibilityV0
env = MeltingPotCompatibilityV0(substrate_name="prisoners_dilemma_in_the_matrix__arena", render_mode="human")


Breaking Changes

`OpenspielCompatibilityV0` has been renamed to `OpenSpielCompatibilityV0` (correct spelling of [OpenSpiel](https://github.com/deepmind/open_spiel))

Since the v0.21.0 release, the `setup.py` has been updated to include separate install options for gym V21 and V26:

* Instead of `pip install shimmy[gym]`, you must select either: `pip install shimmy[gym-v21]` or `pip install shimmy[gym-v26]`

New Features and Improvements

This release adds support for three additional environments:

* [DeepMind Lab](https://github.com/deepmind/lab) (single-agent)
* [DeepMind Behavior Suite](https://shimmy.farama.org/contents/bsuite/) (single-agent)
* [DeepMind Melting Pot](https://github.com/deepmind/meltingpot) (multi-agent)

This release also expands automated testing to cover each environment ([51](https://github.com/Farama-Foundation/Shimmy/pull/51)) and adds pickling tests ([#53](https://github.com/Farama-Foundation/Shimmy/pull/53)), ensuring that each environment can be serialized/deserialized via [pickle](https://docs.python.org/3/library/pickle.html).

[Dockerfiles](https://docs.docker.com/engine/reference/builder/) have been expanded to cover each environment ([#52](https://github.com/Farama-Foundation/Shimmy/pull/52)), located in [/bin/](https://github.com/Farama-Foundation/Shimmy/tree/main/bin). These are primarily used for automated testing, but can also be used locally ([#65](https://github.com/Farama-Foundation/Shimmy/pull/65)), allowing environments to be used on any platform (see [Getting Started: Docker](https://shimmy.farama.org/content/getting_started/#docker) for more information).

The [DeepMind Lab](https://github.com/deepmind/lab) and [Melting Pot](https://github.com/deepmind/meltingpot) environments are not available in distributed releases (via [PyPi](https://pypi.org/) or elsewhere), and thus cannot be easily installed via `pip install`. For these environments, we provide full [installation scripts](https://github.com/Farama-Foundation/Shimmy/tree/main/scripts) for both MacOS and Linux.

* [/scripts/install_dm_lab.sh](https://github.com/Farama-Foundation/Shimmy/blob/main/scripts/install_dm_lab.sh)
* [/scripts/install_melting_pot.sh](https://github.com/Farama-Foundation/Shimmy/blob/main/scripts/install_melting_pot.sh)

Bug Fixes and Documentation Updates

This release includes a major documentation overhaul, updating the project to comply with Farama [Project Standards](https://farama.org/project_standards) ([#66](https://github.com/Farama-Foundation/Shimmy/pull/66)). This includes a [Getting Started](https://shimmy.farama.org/content/getting_started/) page, with installation information, and a [Basic Usage](https://shimmy.farama.org/content/basic_usage/) page, with reference information on using both single- and multi-agent environments.

Documentation has also been standardized to include descriptions of each environment, with links to documentation and related libraries, and images of the environment for reference ([43](https://github.com/Farama-Foundation/Shimmy/pull/43), [#47](https://github.com/Farama-Foundation/Shimmy/pull/47) [#49](https://github.com/Farama-Foundation/Shimmy/pull/49)).

Full example usage scripts are now provided for each environment, allowing users to easily load and interact with an environment without prior knowledge.

Example: run a `dm-control` environment:

python
observation, info = env.reset(seed=42)
for _ in range(1000):
action = env.action_space.sample() this is where you would insert your policy
observation, reward, terminated, truncated, info = env.step(action)

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

**Full Changelog**: https://github.com/Farama-Foundation/Shimmy/compare/v0.2.1...v1.0.0

0.2.1

Release

This is a minor release that fixes several bugs in dm-control, compatibility with gym `v0.21` along with bumping dm-control to `1.0.10` and ale-py to `0.8.1`.
Additionally, this changes `GymV22Environment` to `GymV21Environment` as the environment always implemented gym's `v0.21` API rather than `v0.22`. Furthermore, removes a warning previously introduced in gymnasium `v0.27.1`.

Bug Fixes

* Fixed dm-control step termination and truncation, previously this was the opposite of the specification by pseudo-rnd-thoughts and ottofabianin in https://github.com/Farama-Foundation/Shimmy/pull/30
* Check if the default wrappers exist before stripping for compatibility with Gym `v0.21` by nuance1979 in https://github.com/Farama-Foundation/Shimmy/pull/34
* Update the list of dm-control environments for 1.0.10 to include humanoid-cmu talk by pseudo-rnd-thoughts in https://github.com/Farama-Foundation/Shimmy/pull/36
* Remove warning that `GymV22Environment` and `GymV26Environment` are overwritten and change `V22` to `V21` in the `GymV22Environment` by pseudo-rnd-thoughts in https://github.com/Farama-Foundation/Shimmy/pull/29
* Bump ale-py to `v0.8.1` which includes a number of bug fixes by pseudo-rnd-thoughts in https://github.com/Farama-Foundation/Shimmy/pull/37/. For all the changes, read the [release notes](https://github.com/mgbellemare/Arcade-Learning-Environment/releases/tag/v0.8.1).

Finally, jjshoots and SiddarGu updated the documentation in https://github.com/Farama-Foundation/Shimmy/pull/28 and https://github.com/Farama-Foundation/Shimmy/pull/25 respectively.

**Full Changelog**: https://github.com/Farama-Foundation/Shimmy/compare/v0.2.0...v0.2.1

0.2.0

Release notes

We update Shimmy for Gymnasium v0.27 and this release is not compatible with v0.26 with dm-control due to the Gymnasium Mujoco rendering changing.

New environments supported: dm-lab and dm-control multiagent (soccer)

Changes
* Add some friendly docs on how to get started by vwxyzjn in https://github.com/Farama-Foundation/Shimmy/pull/20
* Update gym compatibility environment names by pseudo-rnd-thoughts in https://github.com/Farama-Foundation/Shimmy/pull/16
* Add dm-lab (no tests yet) and dm-control-multiagent by jjshoots in https://github.com/Farama-Foundation/Shimmy/pull/7
* Add `__getattr__` to Gym compatibility env to fix atari preprocessing issue, add registration of dm-lab compatibility environment. by pseudo-rnd-thoughts in https://github.com/Farama-Foundation/Shimmy/pull/22

New Contributors
* vwxyzjn made their first contribution in https://github.com/Farama-Foundation/Shimmy/pull/20

**Full Changelog**: https://github.com/Farama-Foundation/Shimmy/compare/v0.1.0...v0.2.0

0.1.0

Shimmy aims to provide compatibility for reinforcement learning environments to be compatible with Gymnasium or PettingZoo.

In this initial release, we provide compatibility for
* OpenAI Gym: We provide compatibility environments for V22 and V26 environments, `GymV22Environment-v0` and `GymV26Environment-v0`
* dm-control: suite, manipulation and locomotion (currently the soccer environments are not supported)
* atari: As ale-py had not added gymnasium support yet, shimmy adds the `AtariEnv` with a couple of very minor changes that are backward compatible with the gym environments.
* openspiel: We support a large number of the environments, however not all of them

We aim to have a website soon with install instructions for the different environments in the next few weeks

We are interested in supporting more environment APIs, please add a comment on https://github.com/Farama-Foundation/Shimmy/issues/2

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.