/MineRL2021-Intro-baselines

MineRL 2021 Intro track baselines

Primary LanguagePythonMIT LicenseMIT

MineRL2021-Intro-baselines

MineRL 2021 Intro track has three baseline agents:

  1. Fully scripted
  2. Behavioural cloning (BC) plus scripted
  3. Reinforcement Learning (RL) plus scripted

The agents can be run in three different ways:

  1. Colab notebook
  2. Standalone file
  3. Submittable repository

Colab notebooks

This is the same code as in standalone files, but with extra documentation and fully running in Colab. The RL_plus_script is not included as it takes too long to run fully in Colab. The notebooks are:

MineRL fully scripted on a fixed seed

MineRL fully scripted

MineRL BC+scripted

Standalone files

These are used to run the agents on your local machine and are located in the standalone directory.
MineRL requires JDK8 to be installed first. After that, run:

pip install -r requirements.txt

The agents can be run with:

python fully_scripted_fixed_seed.py
python fully_scripted.py
python BC_plus_script.py
python RL_plus_script.py

The BC and RL ones come with pretrained models. If you want to train them yourself, you will have to uncomment the train() line at the end of the file.

Submittable repositories

The following links will lead you to submittable versions of the baselines:

Fully scripted

Behavioural cloning plus script

Reinforcement learning plus script

Results

Baseline results over several thousands of episodes can be seen below:

Videos

Some videos of agents in action (best watched at 2x speed). Filmed using the interactive mode.

MineRL agent trained to chop trees released in a village
MineRL fully scripted agent, good seed
MineRL fully scripted agent, bad seed
MineRL RL trained on Treechop + scripted agent

Weights & Biases integration

The RL baselines come with an integration for Weights & Biases logging, for demonstration purposes. To use them you need to install W&B with pip install wandb and uncomment lines in the baseline codes.

This will allow easy logging of training runs and evaluation episodes to online dashboards. Especially the logging of videos is handy if you wish to debug what your agent is doing!

Credits

Thank you to Anssi Kanervisto for developing the Behavioural cloning part of the baselines, and Costa Huang for adding Wandb support.