Skip to main content

POPGym: Partially Observable Process Gym

tests PyPI version Python versions License: MIT Documentation

🚨 Try our new GPU-accelerated, Atari-style POPGym Arcade 🚨

POPGym is designed to benchmark memory in deep reinforcement learning. It contains a set of environments and a collection of memory model baselines. The full paper is available on OpenReview.

Please see the documentation for advanced installation instructions and examples. The environment quickstart will get you up and running in a few minutes.

Quickstart Install

# Install base environments, only requires numpy and gymnasium
pip install popgym
# Also include navigation environments, which require mazelib
pip install "popgym[navigation]"

Quickstart Usage

import popgym
from popgym.wrappers import PreviousAction, Antialias, Flatten, DiscreteAction
env = popgym.envs.PositionOnlyCartPoleEasy()
print(env.reset(seed=0))
wrapped = DiscreteAction(Flatten(PreviousAction(env))) # Append prev action to obs, flatten obs/action spaces, then map the multidiscrete action space to a single discrete action for Q learning
print(wrapped.reset(seed=0))

POPGym Environments

POPGym contains Partially Observable Markov Decision Process (POMDP) environments following the Gymnasium interface. POPGym environments have minimal dependencies and are fast enough to solve on a laptop CPU in less than a day. We provide the following environments:

Environment Tags Temporal Ordering Colab FPS Macbook Air (2020) FPS
Battleship Game None 117,158 235,402
Concentration Game Weak 47,515 157,217
Higher Lower Game, Noisy None 24,312 76,903
Labyrinth Escape Navigation Strong 1,399 41,122
Labyrinth Explore Navigation Strong 1,374 30,611
Minesweeper Game None 8,434 32,003
Multiarmed Bandit Noisy None 48,751 469,325
Autoencode Diagnostic Strong 121,756 251,997
Count Recall Diagnostic, Noisy None 16,799 50,311
Repeat First Diagnostic None 23,895 155,201
Repeat Previous Diagnostic Strong 50,349 136,392
Position Only Cartpole Control Strong 73,622 218,446
Velocity Only Cartpole Control Strong 69,476 214,352
Noisy Position Only Cartpole Control, Noisy Strong 6,269 66,891
Position Only Pendulum Control Strong 8,168 26,358
Noisy Position Only Pendulum Control, Noisy Strong 6,808 20,090

Feel free to rerun this benchmark using this colab notebook.

POPGym Baselines

[!WARNING] The baselines rely on difficult-to-maintain dependencies that are no longer supported. You will need to install an old version of python and downgrade some packages if you intend to use them.

POPGym baselines implements recurrent and memory model in an efficient manner. POPGym baselines is implemented on top of rllib using their custom model API. We provide the following baselines:

  1. MLP
  2. Positional MLP
  3. Framestacking (Paper)
  4. Temporal Convolution Networks (Paper)
  5. Elman Networks (Paper)
  6. Long Short-Term Memory (Paper)
  7. Gated Recurrent Units (Paper)
  8. Independently Recurrent Neural Networks (Paper)
  9. Fast Autoregressive Transformers (Paper)
  10. Fast Weight Programmers (Paper)
  11. Legendre Memory Units (Paper)
  12. Diagonal State Space Models (Paper)
  13. Differentiable Neural Computers (Paper)

Contributing

Follow style and ensure tests pass

# Using uv, you can also use pip instead
uv sync --extra navigation
uv run pre-commit install
uv run pytest tests/

Citing

@inproceedings{
morad2023popgym,
title={{POPG}ym: Benchmarking Partially Observable Reinforcement Learning},
author={Steven Morad and Ryan Kortvelesy and Matteo Bettini and Stephan Liwicki and Amanda Prorok},
booktitle={The Eleventh International Conference on Learning Representations},
year={2023},
url={https://openreview.net/forum?id=chDrutUTs0K}
}

Metadata

Release files for popgym 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for popgym 1.0.7
File Size Uploaded
popgym-1.0.7.tar.gz 72.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for popgym 1.0.7
File Interpreter ABI Platform
popgym-1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 164.7 kB

Release files / popgym-1.0.7.tar.gz

Download URL popgym-1.0.7.tar.gz
Size 72.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6c6e19318d7b8f0c62886ce35dab39a82333cd88014e9f2f6c79fbd2c5c47b4f
BLAKE2b-256 checksum
How to use checksums
84b186b771e21a26e36c2d9acd9ae08466d6665340900c67de62688e2ed92309
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 11, 2026.

Transparency log

Release files / popgym-1.0.7-py3-none-any.whl

Download URL popgym-1.0.7-py3-none-any.whl
Size 92.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23be7f754f3167f58c4ac844426f3e0f7230035bedfcd5d85b004524eef21bb6
BLAKE2b-256 checksum
How to use checksums
055474df482ff611f2cfae67d846849db581fa0e20ed4c180d6bdf1057d001f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.2

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page