Skip to main content

rl-envs-forge

GitHub PyPI version License: MIT Code style: black

Lightweight environments for reinforcement learning applications.

Table of Contents

Installation

pip install rl-envs-forge

Environments

Labyrinth

Labyrinth is a classic maze-solving environment, where the goal is to navigate from a start point to a target. The maze layout is randomly generated based on a set of parametrizable arguments.

📖 Detailed Documentation: Click here to read more about the Labyrinth environment

Labyrinth rendered example

Labyrinth render GIF

KArmedBandit

KArmedBandit is a bandit environment, which returns a reward from a distribution associated with the chosen arm at each timestep. This implementation includes multiple distributions, and the possibility to shift the distribution parameters during sampling.

📖 Detailed Documentation: Click here to read more about the KArmedBandit environment

KArmedBandit rendered example

KArmedBandit render

GridWorld

GridWorld is a customizable grid-based environment for reinforcement learning, featuring adjustable grid size, start and terminal states, walls, and special transitions. Each action taken by the agent results in a transition within the grid, adhering to the defined rules and probabilities.

📖 Detailed Documentation: Click here to read more about the GridWorld environment

GridWorld rendered example

GridWorld render

ACML

The Adaptive Computation and Machine Learning (ACML) environments are toy environments proposed in Reinforcement Learning: An Introduction* (2nd ed.).

📖 Detailed Documentation: Click here to read more about the ACML environments

Inverted pendulum environments

Inverted pendulum environments where the objective is to apply forces to maintain the pendulum upright despite disturbances and the natural tendency to fall.

📖 Detailed Documentation: Click here to read more about the inverted pendulum envs

Inverted pendulums rendered examples

CartPole PendulumDisk
CartPole PendulumDisk

NetworkGraph

NetworkGraph is an environment simulating the current opinion in a social network.

📖 Detailed Documentation: Click here to read more about the NetworkGraph environment

NetworkGraph rendered example

NetworkGraph render

Usage

Example code on setting up and testing the Labyrinth environment.

Note, this code snippet produced the render visible in section Labyrinth

from time import sleep
from rl_envs_forge.envs.labyrinth.labyrinth import Labyrinth

env = Labyrinth(20, 20, seed=0)

done = False
quit_event = False
while not done and not quit_event:
    action = env.action_space.sample()  
    observation, reward, done, truncated, info = env.step(action)
    quit_event, _ = env.render()
    sleep(0.1)

Tests

Requirements: pytest and pytest-cov

Run the tests in the root folder with:

pytest tests

License

This project is licensed under the MIT License.

Contact & Support

For any queries or support, or if you would like to contribute to this project, reach out at marius.dragomir.dgm@gmail.com or raise an issue on our GitHub repository.

Metadata

Release files for rl-envs-forge 5.22.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 rl-envs-forge 5.22.0
File Size Uploaded
rl_envs_forge-5.22.0.tar.gz 69.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rl-envs-forge 5.22.0
File Interpreter ABI Platform
rl_envs_forge-5.22.0-py3-none-any.whl Python 3 none any Details

Total release size: 157.8 kB

Release files / rl_envs_forge-5.22.0.tar.gz

Download URL rl_envs_forge-5.22.0.tar.gz
Size 69.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c562205c5dcf8b4c0a388fcacb245aa69ec4b8fa1d97689e367fc338d963201f
BLAKE2b-256 checksum
How to use checksums
953104e66b41d16df10c3aa3f9be6a7b2c713101ef39a8c72ac556f6e6232eb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.4 CPython/3.14.3 Linux/6.17.0-1010-azure

Release files / rl_envs_forge-5.22.0-py3-none-any.whl

Download URL rl_envs_forge-5.22.0-py3-none-any.whl
Size 88.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf19cff3421bb69deaf5a3458c3d4a53dfa43288f10fcac779b4b4252b90b096
BLAKE2b-256 checksum
How to use checksums
06d1b8b051759c3f573167d81ac0a00144782bde6f56dcd625ebf1c455863f76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.4 CPython/3.14.3 Linux/6.17.0-1010-azure

Release history Release notifications | RSS feed

This release

5.22.0 This release

2 release files

5.21.0

2 release files

5.20.0

2 release files

5.19.1

2 release files

5.19.0

2 release files

5.18.3

2 release files

5.18.2

2 release files

5.18.1

2 release files

5.17.0

2 release files

5.15.1

2 release files

5.13.0

2 release files

5.12.1

2 release files

5.12.0

2 release files

5.11.0

2 release files

5.10.1

2 release files

5.10.0

2 release files

5.9.0

2 release files

5.8.0

2 release files

5.7.5

2 release files

5.7.4

2 release files

5.7.1

2 release files

5.7.0

2 release files

5.6.0

2 release files

5.5.0

2 release files

5.4.0

2 release files

5.3.0

2 release files

5.2.1

2 release files

5.2.0

2 release files

5.1.0

2 release files

5.0.0

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.8.0

2 release files

3.7.0

2 release files

3.6.2

2 release files

3.6.1

2 release files

3.6.0

2 release files

3.5.2

2 release files

3.5.1

2 release files

3.5.0

2 release files

3.4.2

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.3

2 release files

3.3.2

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.2

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.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