Skip to main content

Wrappers for Gymnasium and PettingZoo

Project description

SuperSuit introduces a collection of small functions which can wrap reinforcement learning environments to do preprocessing ('microwrappers'). We support Gymnasium for single agent environments and PettingZoo for multi-agent environments (both AECEnv and ParallelEnv environments).

Using it with Gymnasium to convert space invaders to have a grey scale observation space and stack the last 4 frames looks like:

import gymnasium
from supersuit import color_reduction_v0, frame_stack_v1

env = gymnasium.make('SpaceInvaders-v0')

env = frame_stack_v1(color_reduction_v0(env, 'full'), 4)

Similarly, using SuperSuit with PettingZoo environments looks like

from pettingzoo.butterfly import pistonball_v0
env = pistonball_v0.env()

env = frame_stack_v1(color_reduction_v0(env, 'full'), 4)

Please note: Once the planned wrapper rewrite of Gymnasium is complete and the vector API is stabilized, this project will be deprecated and rewritten as part of a new wrappers package in PettingZoo and the vectorized API will be redone, taking inspiration from the functionality currently in Gymnasium.

Installing SuperSuit

To install SuperSuit from pypi:

python3 -m venv env
source env/bin/activate
pip install --upgrade pip
pip install supersuit

Alternatively, to install SuperSuit from source, clone this repo, cd to it, and then:

python3 -m venv env
source env/bin/activate
pip install --upgrade pip
pip install -e .

Citation

If you use this in your research, please cite:

@article{SuperSuit,
  Title = {SuperSuit: Simple Microwrappers for Reinforcement Learning Environments},
  Author = {Terry, J. K and Black, Benjamin and Hari, Ananth},
  journal={arXiv preprint arXiv:2008.08932},
  year={2020}
}

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

SuperSuit-3.9.1.tar.gz (34.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

SuperSuit-3.9.1-py3-none-any.whl (50.0 kB view details)

Uploaded Python 3

File details

Details for the file SuperSuit-3.9.1.tar.gz.

File metadata

  • Download URL: SuperSuit-3.9.1.tar.gz
  • Upload date:
  • Size: 34.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for SuperSuit-3.9.1.tar.gz
Algorithm Hash digest
SHA256 536732019e5f00420a17a7e3078a73824191515b6b0af37b06322d4846cda655
MD5 1666f341483ef41cfe80dc9984160bcb
BLAKE2b-256 ce4ee2992ce9a969a1c28bea95a37377219242bb4e6bcbd44157edfa76fa12f2

See more details on using hashes here.

File details

Details for the file SuperSuit-3.9.1-py3-none-any.whl.

File metadata

  • Download URL: SuperSuit-3.9.1-py3-none-any.whl
  • Upload date:
  • Size: 50.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for SuperSuit-3.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 24907f8edb9578c8b35eb374e53fdde96daf37c006d8e929c7bf485e5c52f356
MD5 4f3d6d0caeb97be5fb943940f2111dbd
BLAKE2b-256 edb5bc51985eb3a9cabc59969e009d9e8befc41e06477a42f6763ee81acd54da

See more details on using hashes here.

Supported by

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