Skip to main content

Simple noisy environment augmentation for reinforcement learning

Project description

noisyenv: Simple Noisy Environment Augmentation for Reinforcement Learning

This package contains a set of generic wrappers designed to augment RL environments with noise and encourage agent exploration and improve training data diversity which are applicable to a broad spectrum of RL algorithms and environments. For more details, please refer to our paper: https://arxiv.org/abs/2305.02882.

Note that this package has been developed for the new step and reset API introduced in OpenAI Gym v26 and Gymnasium v26. Use the gymnasium.wrappers.EnvCompatibility wrapper to update old environments for compatibility.

Installation

pip install noisyenv

Usage

import gymnasium as gym
from noisyenv.wrappers import RandomUniformScaleReward

base_env = gym.make("HalfCheetah-v2")
env = RandomUniformScaleReward(env=base_env, noise_rate=0.01, low=0.9, high=1.1)

# And just use as you would normally
observation, info = env.reset(seed=333)

for _ in range(100):
    action = env.action_space.sample()
    observation, reward, terminated, truncated, info = env.step(action)

    if terminated or truncated:
        observation, info = env.reset()
env.close()

Citing noisyenv

If you use noisyenv in your work, please cite our paper:

@misc{khraishi2023simple,
      title={Simple Noisy Environment Augmentation for Reinforcement Learning}, 
      author={Raad Khraishi and Ramin Okhrati},
      year={2023},
      eprint={2305.02882},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}

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

noisyenv-0.1.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

noisyenv-0.1.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file noisyenv-0.1.1.tar.gz.

File metadata

  • Download URL: noisyenv-0.1.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for noisyenv-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ddd180a6174a7e8f58c888a1af64b7bce22e9ffea61a520ebd732cfe183f0434
MD5 298ee2c01fb7d8e7f63f127f13692bd1
BLAKE2b-256 810981c0fae2fab6ae842af089375b2eb5446cb57ad7ee5b292f87e4a2e773cc

See more details on using hashes here.

File details

Details for the file noisyenv-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: noisyenv-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for noisyenv-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ae426fd10a550505305c11aaa1dbb51bf894093e19fb25b9a2fb51df0f6a8b7
MD5 576eb407f4121c9b7a73f07c647ef311
BLAKE2b-256 ece7b762e99403d581c9825f797af3bb81d87205886dbe09c98d57435450a2b1

See more details on using hashes here.

Supported by

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