Skip to main content

The MineRL Python Package

Downloads

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()

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')

# Iterate through a single epoch gathering sequences of at most 32 steps
for obs, rew, done, act in data.seq_iter(num_epochs=1, batch_size=32):
    print("Number of diffrent actions:", len(act))
    for action in act:
        print(act)
    print("Number of diffrent observations:", len(obs), obs)
    for observation in obs:
        print(obs)
    print("Rewards:", rew)
    print("Dones:", done)

MineRL Competition

If you're here for the MineRL competition. Please check the main competition website here.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

minerl-0.1.3.tar.gz (31.7 MB view details)

Uploaded Source

File details

Details for the file minerl-0.1.3.tar.gz.

File metadata

  • Download URL: minerl-0.1.3.tar.gz
  • Upload date:
  • Size: 31.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for minerl-0.1.3.tar.gz
Algorithm Hash digest
SHA256 84eb898d5eeda7bb443acf963975ec7ecb36f127df1f7f858a8263abdff23276
MD5 240fe14c7ede8c30ee7cd6a8fd328aa4
BLAKE2b-256 7c5e350c8767da67fc3b6e52e64687f0422138b6c18888f52b4170886ea7032d

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 Sentry Error logging StatusPage Status page