Environments for reinforcement learning
Project description
rl-envs-forge
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
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
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
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 |
---|---|
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
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file rl_envs_forge-5.5.0.tar.gz
.
File metadata
- Download URL: rl_envs_forge-5.5.0.tar.gz
- Upload date:
- Size: 60.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ecced1c9d613271efb05cefe859d0f25f97f39baa0d91dd74beb8d07943ee19 |
|
MD5 | ae7a0ba5635a84e20d24670d50a51f16 |
|
BLAKE2b-256 | 9e4a5c8f1dd632ab8b81ebba0c19e3c053ee2b4c77d3804c0cdaada49ef6b72e |
File details
Details for the file rl_envs_forge-5.5.0-py3-none-any.whl
.
File metadata
- Download URL: rl_envs_forge-5.5.0-py3-none-any.whl
- Upload date:
- Size: 77.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70c9a3177fd4800e04cbd3eaa9c9c21193e215eee8d57e751b046cb2ad9232d1 |
|
MD5 | f839a0a8986ee1771f89ddc9d2780273 |
|
BLAKE2b-256 | bad8f0840759a444a60817d52bd844696c318a29d3ce70bc73d62920bfa4a54a |