minerl-wrappers compiles common wrappers and standardizes code for reproducibility in the MineRL environment!
Project description
minerl-wrappers
minerl-wrappers compiles common wrappers and standardizes code for reproducibility in the MineRL environment!
Currently Supported Environments
- MineRL Basic Environments
- MineRL Diamond Competition Environments
MineRLTreechopVectorObf-v0MineRLNavigateVectorObf-v0MineRLNavigateDenseVectorObf-v0MineRLNavigateExtremeVectorObf-v0MineRLNavigateExtremeDenseVectorObf-v0MineRLObtainDiamondVectorObf-v0MineRLObtainDiamondDenseVectorObf-v0MineRLObtainIronPickaxeVectorObf-v0MineRLObtainIronPickaxeDenseVectorObf-v0
Wappers
- pfrl wrappers: an assortment of wrappers ported over from the 2020 PfN minerl baselines
and 2019 PfN minerl baselines
- Supports Basic Environments for 2019 and Diamond Competition Environments for 2020
- diamond wrappers: updated wrappers for the 2021 MineRL Diamond Competition Environments
Wrap arguments
For documentation see wrapper files:
pfrl_2019_wrappers.py
pfrl_2020_wrappers.py
diamond_wrappers.py
Requirements
- Java JDK 8
- Python 3.7+
Install
Make sure you have Java JDK 8 installed as the only Java version for MineRL.
Install with pip from pypi:
pip install minerl-wrappers
Install directly from git:
pip install git+https://github.com/minerl-wrappers/minerl-wrappers.git
Clone and Install
git clone https://github.com/minerl-wrappers/minerl-wrappers.git
cd minerl-wrappers
Use your own virtual environment
virtualenv
Installed Python 3.7+
python3 -m virtualenv venv
source venv/bin/activate
conda
Install Anaconda or Miniconda
conda create --name minerl-wrappers python=3.7
conda activate minerl-wrappers
Install dependencies
- Install dependencies with pip:
# install fixed requirements
pip install -r requirements.txt
# set the minerl-wrappers module for imports
export PYTHONPATH=$PYTHONPATH:$(pwd)
- Install dependencies with
poetryinto your virtual environment:
# this also installs minerl-wrappers as a package
poetry install --no-dev
Use
To quickly test out the wrappers try:
import gym
import minerl
from minerl_wrappers import wrap
env = gym.make("MineRLObtainDiamondDenseVectorObf-v0")
env = wrap(env) # plug this into your rl algorithm
Change which wrappers to apply by supplying config arguments:
config = {
"diamond": True,
"diamond_config": {
"frame_skip": 4,
"frame_stack": 4,
}
}
env = wrap(env, **config)
Contributing
It is highly encouraged to contribute wrappers that worked well for you!
Just create a Pull Request on this repository,
and we'll work together to get it merged!
Read README-DEV.md for contributing guidelines and more details!
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file minerl-wrappers-0.1.6.tar.gz.
File metadata
- Download URL: minerl-wrappers-0.1.6.tar.gz
- Upload date:
- Size: 55.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.3 CPython/3.8.11 Linux/5.8.0-1040-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
87fba6e3c0a3e83851e66f953c9c11a0d4796fbd3e0e9379fdb064f98299b84a
|
|
| MD5 |
8c3f092010541fd172774c9d7a6e9192
|
|
| BLAKE2b-256 |
203332afa543859f84a30a3ab72d31a4d692c0c1755f8c1128ae1f26748d945b
|
File details
Details for the file minerl_wrappers-0.1.6-py3-none-any.whl.
File metadata
- Download URL: minerl_wrappers-0.1.6-py3-none-any.whl
- Upload date:
- Size: 58.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.3 CPython/3.8.11 Linux/5.8.0-1040-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c17bda1c43a375e4208ea81e645e15dad3c2d4266db25e044e89523268a387d
|
|
| MD5 |
d2107284db7aa693678658f3993403e5
|
|
| BLAKE2b-256 |
8452ad5f09cfa08f4e710fd57a507d2dec4832e50c633d5aeb5fdd03c1f6d389
|