Environment with different disk dynamics for distractions in RL environments
Project description
Gym Distractions
This package provides a number of distractions that can be added to pixel based gym environments. It directly includes the creation of MuJoCo Environments with these distractions.
Installation
Release install from pypi
pip install gym-distractions
Installation of latest from GIT Repository
pip install -e git+https://github.com/sebimarkgraf/gym-distractions.git
Using MuJoCo Environments
Use the MuJoCo environments by importing it and using the make() method.
import gym_distractions
env = gym_distractions.make(domain_name,
task_name,
distract_type,
ground,
difficulty,
background_dataset_path,
train_or_val,
seed,
visualize_reward,
from_pixels,
height,
width,
camera_id,
frame_skip,
episode_length,
environment_kwargs,
time_limit,
channels_first
)
The following is the explanation of the parameters which used to control the background/foreground, and the rest of the parameters are the same as the original dmc2gym code.
distract_type : choice{'color', 'noise', 'dots', 'videos'}, default: None
ground : choice{'background', 'forground', 'both'}, default: None,
'both' only used for 'videos' distractor, 'color' and 'noise' only have 'background'
difficulty : choice{'easy', 'medium', 'hard'}, default: 'hard'
only useful for 'dots' and 'videos' distractor
when use 'dots' distractor, set num_dots to: 'hard'=16, 'medium'=8, 'easy'=5;
when use 'videos' distract type, set num_video to: 'hard'=all, others the same as 'dots'
intensity : 0-1, default: 1
distracting intensity(non-transparency?): 1 is all distrated, 0 is same as original env
background_dataset_path : where you put your video/image dataset, only useful for 'videos'
train_or_val : choice{'train', 'val'}, default: None
when use DAVIS Dataset, can divided it to train-set and validation-set
when you use 'dots', by default, distractors are repeated, and movements of dots obey the dynamics of an ideal gas with no collison. If you want to change those default settings, or you want to modify sizes/velocitys/positions/quantity/or some others of dots, you can modify them in file 'background_source.py', class 'RandomDotsSource' by yourself.
Attribution
Based on work of:
- Philipp Becker
- Yiping Wei
- Yitian Yang
Citing This Work
If you find this work helpful, please cite the corresponding publication
TODO
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
Hashes for gym_distractions-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1f486c8723f2466d03db41ee0fc8e96f0fae182fb3176b29cc7afc51019dbf0 |
|
MD5 | fbb2181e5b5d026785870b64d06f93c1 |
|
BLAKE2b-256 | 01272a043d9f1a096a992b0360f0b36a44c77fd3494b30318365aaefcbca5320 |