The MineRL Python Package
Python package providing easy to use gym environments and a simple data api for the MineRLv0 dataset.
To get started please read the docs here!
Installation
With JDK-8 installed run this command
pip3 install --upgrade minerl
Basic Usage
Running an environment:
import minerl
import gym
env = gym.make('MineRLNavigateDense-v0')
obs = env.reset()
done = False
while not done:
action = env.action_space.sample()
# One can also take a no_op action with
# action =env.action_space.noop()
obs, reward, done, info = env.step(
action)
Sampling the dataset:
import minerl
# YOU ONLY NEED TO DO THIS ONCE!
minerl.data.download('/your/local/path')
data = minerl.data.make(
'MineRLObtainDiamond-v0',
data_dir='/your/local/path')
# Iterate through a single epoch gathering sequences of at most 32 steps
for current_state, action, reward, next_state, done \
in data.batch_iter(
num_epochs=1, seq_len=32):
# Print the POV @ the first step of the sequence
print(current_state['pov'][0])
# Print the final reward pf the sequence!
print(reward[-1])
# Check if final (next_state) is terminal.
print(done[-1])
# ... do something with the data.
print("At the end of trajectories the length"
"can be < max_sequence_len", len(reward))
Visualizing the dataset:
# Make sure your MINERL_DATA_ROOT is set!
export MINERL_DATA_ROOT='/your/local/path'
# Visualizes a random trajectory of MineRLObtainDiamondDense-v0
python3 -m minerl.viewer MineRLObtainDiamondDense-v0
MineRL Competition
If you're here for the MineRL competition. Please check the main competition website here.
Metadata
Release files for minerl 0.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| minerl-0.4.4.tar.gz | 70.1 MB | Details |
Release files / minerl-0.4.4.tar.gz
| Download URL | minerl-0.4.4.tar.gz |
|---|---|
| Size | 70.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8cdaefade9eac20177044cb87c009fe5b539ef7dd74c59f4103a8b161ae19580
|
|
BLAKE2b-256 checksum How to use checksums |
08c1651340d34dc6a165821c8aba61903db7c5ac874827efb185e78e35086835
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.4
|