Skip to content

MineRL Competition for Sample Efficient Reinforcement Learning - Python Package

License

Notifications You must be signed in to change notification settings

OopsYouDiedE/minerl

 
 

Repository files navigation

The MineRL Python Package

Documentation Status Downloads PyPI version "Open Issues" GitHub issues by-label Discord

Python package providing easy to use Gym environments and data access for training agents in Minecraft.

To get started please read the docs here!

MineRL Versions

MineRL consists of three unique versions, each with a slightly different sets of features. See full comparison here.

  • v1.0: [Code][Docs] This version you are looking at. Needed for the OpenAI VPT models and the MineRL BASALT 2022 competition.
  • v0.4: [Code][Docs] Version used in the 2021 competitions (Diamond and BASALT). Supports the original MineRL-v0 dataset. Install with pip install minerl==0.4
  • v0.3: [Code][Docs] Version used prior to 2021, including the first two MineRL competitions (2019 and 2020). Supports the original MineRL-v0 dataset. Install with pip install minerl==0.3

Installation

Install requirements (Java JDK 8 is required) and then install MineRL with

pip install git+https://github.com/minerllabs/minerl

Basic Usage

Can be used much like any Gym environment:

import gym
import minerl

# Uncomment to see more logs of the MineRL launch
# import coloredlogs
# coloredlogs.install(logging.DEBUG)

env = gym.make("MineRLBasaltBuildVillageHouse-v0")
obs = env.reset()

done = False
while not done:
    ac = env.action_space.noop()
    # Spin around to see what is around us
    ac["camera"] = [0, 3]
    obs, reward, done, info = env.step(ac)
    env.render()
env.close()

Check the documentation for further examples and notes.

Major changes in v1.0

  • New Minecraft version (11.2 -> 16.5)
  • Larger resolution by default (64x64 -> 640x360)
  • Near-human action-space: no more craft and smelt actions. Only GUI and mouse control (camera action moves mouse around).
  • Observation space is only pixels, no more inventory observation by default.

About

MineRL Competition for Sample Efficient Reinforcement Learning - Python Package

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 79.2%
  • Python 19.6%
  • CMake 0.5%
  • Shell 0.3%
  • Batchfile 0.2%
  • Jinja 0.1%
  • GLSL 0.1%