Skip to main content

pytest status pre-commit License code style: black

Sorrel

Sorrel is a general-purpose reinforcement learning engine that enables researchers, developers, and students to develop and deploy reinforcement learning algorithms on new and pre-existing environments.

Sorrel can be regarded as an “operating system” for the RL process, in the sense that it unifies and abstracts foundational components from environment simulation all the way to policy search, exploration, and function approximation.

Our hope is that Sorrel will foster new research ideas, applications, and tools for a unified RL approach. We believe Sorrel will accelerate the rate of progress of the RL research space, as well as allow us to experiment with our own solutions to both novel and long-standing RL problems.

To get and use Sorrel as a user, install it from pip:

pip install sorrel

You can also install additional optional dependencies. For example, to install sorrel with llm integration support, do:

pip install sorrel[llm]

Development

To create a virtual environment, navigate to your project directory in the terminal and run:

python -m venv ./venv

To activate the virtual environment, run

./venv/Scripts/activate  # windows

source ./venv/bin/activate  # mac

to deactivate the virtual environment, simply run deactivate in the terminal.

Getting started

Sorrel uses the poetry package manager to manage its dependencies. Start by running poetry --version in your terminal to make sure you have poetry installed.

With poetry available, to install Sorrel as a developer, run the following command:

poetry install --with dev,llm

in the folder containing the pyproject.toml file.

Workflow Tools

We use a number of tools to simplify the development workflow for contributors. Among these tools include code formatters (such as black) to report style errors and (try to) automatically format your code wherever possible, along with testing frameworks (such as pytest) to automatically test the code.

We have included a pre-commit configuration to automatically run all CI tasks whenever you attempt to commit to the Sorrel repository.

To set up pre-commit, start by confirming that it's installed by running:

pre-commit --version

If this fails, you'll need to install pre-commit by running pip install pre-commit. Then, run

pre-commit install

in the folder containing .pre-commit-config.yaml file.

Afterward, the Git hooks will be run automatically at every new commit.

You may also run these hooks manually with pre-commit run --all-files. If needed, you can skip the hooks (not recommended) with git commit --no-verify -m <commit message>.

Writing documentation

To contribute to the documentation, you may add, delete, or edit files in the .\docs\source folder. This project uses Sphinx to auto-build files in .rst, .md, or .ipynb format into html.

Note that since Sorrel is private (for now), we cannot host the documentation online yet. To view your documentation changes locally, navigate to the .\docs folder and run the following command:

Windows:

.\make html

Other systems:

make html

Then, view the updated documentations by opening .\docs\build\html\index.html with the browser of your choice.

Citing the project

Gelpí, R. A., Ju, Y., Jackson, E. C., Tang, Y., Verch, S., Voelcker, C., & Cunningham, W. A. (2025). Sorrel: A simple and flexible framework for multi-agent reinforcement learning. arXiv:2506.00228 [cs.MA]

Maintainers

Sorrel is currently maintained by Yibing Ju (aka @bing-j) and Rebekah Gelpi (aka @rgelpi).

Acknowledgments

We would like to thank the other authors: Ethan Jackson, Yikai Tang, Shon Verch, Claas Voecker, and Wiliam Cunningham.

Metadata

Release files for sorrel 1.5.0

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

Source distribution (sdist)

Source distribution for sorrel 1.5.0
File Size Uploaded
sorrel-1.5.0.tar.gz 110.9 kB Details

Built distribution (wheel)

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

Total release size: 265.6 kB

Release files / sorrel-1.5.0.tar.gz

Download URL sorrel-1.5.0.tar.gz
Size 110.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e8ec176054bd082bbccc6f308e5720b7c17ab8ddf561478cf35a2d2f42df8274
BLAKE2b-256 checksum
How to use checksums
b87e08bb6f8ef70dbb7c7a2d1e2f8fbbc1217a222f2eadbaecfffd1a0b449f51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.14.6 Linux/6.17.0-1018-azure

Release files / sorrel-1.5.0-py3-none-any.whl

Download URL sorrel-1.5.0-py3-none-any.whl
Size 154.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e72b68fd4130f88d63fe2387f2cd2bf957d69b82c138199c469397839c2f745
BLAKE2b-256 checksum
How to use checksums
001475f5f34026adc5a05406a869197a37e8ee5e5096de33caf6bbfebb7f0841
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.14.6 Linux/6.17.0-1018-azure

Release history Release notifications | RSS feed

1.6.0

2 release files

This release

1.5.0 This release

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

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