Python package providing easy to use Gym environments and data access for training agents in Minecraft.
Curious to see what people have done with MineRL? See this page where we collect projects using MineRL. Got a project using MineRL (academic or fun hobby project)? Edit this file, add links to your projects and create a PR!
To get started with MineRL, check out the docs here!
The original data mirrors for MineRL-v0 are down (e.g., original MineRLObtainDiamond-v0
data). We have uploaded copies of the primary datasets to this Zenodo record so people can find them: https://zenodo.org/records/12659939
MineRL consists of three unique versions, each with a slightly different sets of features. See full comparison here.
pip install minerl==0.4.4
pip install minerl==0.3.7
Install requirements (Java JDK 8 is required. Mac may require additional steps) and then install MineRL with
pip install git+https://github.com/minerllabs/minerl
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.
craft
and smelt
actions. Only GUI and mouse control (camera action moves mouse around).