Skip to main content

A collection of RL environments

Project description

RL Enviros

RL Enviros is a collection of custom environments compatible with Gymnasium, designed to simulate various games and scenarios for reinforcement learning experiments. This project aims to provide a variety of environments to help researchers and enthusiasts develop and test reinforcement learning algorithms.

Table of Contents

Installation

PyPi

You can install the rl-enviros-rlate package directly from PyPi:

pip install rl-enviros-rlate

Environments

PickHigh

PickHigh is a simple game where the player picks between two cards, aiming to select the higher card. This environment is useful for testing basic reinforcement learning algorithms.

  • Observation Space: Discrete space of size 100, representing two cards (e.g., 34 for left card 3 and right card 4).
  • Action Space: Discrete space of size 2. Action 0 selects the left card, and action 1 selects the right card.
  • Reward:
    • +1 if the chosen card is higher.
    • 0 if both cards are the same.
    • -1 if the chosen card is lower.
  • Episode Termination: The episode terminates when the player picks a card that is different from the dealer's card.

Detailed Documentation for PickHigh

Usage

Here is an example of how to use the PickHigh environment:

import gymnasium as gym
from gym_examples.envs.pick_high import PickHigh

# Create the environment
env = PickHigh()

# Reset the environment to get the initial observation
observation, info = env.reset(seed=42)

# Print the initial observation
print(f"Initial observation: {observation}")

# Take a random action
action = env.action_space.sample()
observation, reward, terminated, truncated, info = env.step(action)

# Print the results of the action
print(f"Action taken: {action}")
print(f"New observation: {observation}")
print(f"Reward: {reward}")
print(f"Terminated: {terminated}")
print(f"Truncated: {truncated}")
print(f"Info: {info}")

# Render the environment
print(env.render())

# Close the environment
env.close()

Contributing

Contributions are welcome! If you have an environment you'd like to add or an improvement to suggest, please open an issue or submit a pull request.

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Repository

GitHub Repository: https://github.com/RLate-Space/RL-Enviros

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

rlate_env-0.0.6.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

rlate_env-0.0.6-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file rlate_env-0.0.6.tar.gz.

File metadata

  • Download URL: rlate_env-0.0.6.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.6

File hashes

Hashes for rlate_env-0.0.6.tar.gz
Algorithm Hash digest
SHA256 6b655351c2ed3175609da3f951f52d6287960d2ab2bfa920454b11e6eb6d6d12
MD5 0ab064ffb2b88d35db4a4a6ef9009846
BLAKE2b-256 e8501e0f9ce85e9af4bc50eae8b7e221ef81ce5af5144a14f274cf4b4c5feb6e

See more details on using hashes here.

File details

Details for the file rlate_env-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: rlate_env-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.6

File hashes

Hashes for rlate_env-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c0aa55c5b9b71cda30eec3121a349a5751c0bf37f5151d0b6c51b30e081cc65d
MD5 12a5619f0d102d4b3913adbe57b9564f
BLAKE2b-256 c85517bbb78109f8227a27504e85edbe61d7ebbed4ef78eef9fcd120933243a2

See more details on using hashes here.

Supported by

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