/basalt-2022-behavioural-cloning-baseline

Simple behavioural cloning baseline solution for BASALT 2022

Primary LanguagePythonMIT LicenseMIT

NeurIPS 2022: MineRL BASALT Behavioural Cloning Baseline

Discord

This repository contains a behavioural cloning baseline solution for the MineRL BASALT 2022 Competition ("basalt" track)! This solution fine-tunes the "width-x1" models of OpenAI VPT for more sample-efficient training.

You can find the "intro" track baseline solution here.

MineRL BASALT is a competition on solving human-judged tasks. The tasks in this competition do not have a pre-defined reward function: the goal is to produce trajectories that are judged by real humans to be effective at solving a given task.

See the AICrowd competition page for further details on the competition.

Setting up

Install MineRL v1.0.0 (or newer) and the requirements for OpenAI VPT.

Download the dummy BASALT dataset from here (password: findcave2022). Also download the 1x width foundational model .weights and .model files for the OpenAI VPT model.

Place these data files under data to match the following structure:

├── data
│   ├── MineRLBasaltBuildVillageHouse-v0
│   │   ├── Player70-f153ac423f61-20220707-111912.jsonl
│   │   ├── Player70-f153ac423f61-20220707-111912.mp4
│   │   └── ... rest of the files
│   ├── MineRLBasaltCreateVillageAnimalPen-v0
│   │   └── ... files as above
│   ├── MineRLBasaltFindCave-v0
│   │   └── ... files as above
│   ├── MineRLBasaltMakeWaterfall-v0
│   │   └── ... files as above
│   └── VPT-models
│       ├── foundation-model-1x.model
│       └── foundation-model-1x.weights

Training models

Running following code will save a fine-tuned network for each task under train directory. This has been tested to fit into a 8GB GPU.

python train.py

Visualizing/enjoying/evaluating models

To run the trained model for MineRLBasaltFindCave-v0, run the following:

python run_agent.py --model data/VPT-models/foundation-model-1x.model --weights train/MineRLBasaltFindCave.weights --env MineRLBasaltFindCave-v0 --show

Change FindCave to other tasks to run for different tasks.

How to Submit a Model on AICrowd.

To submit this baseline agent follow the submission instructions, but use this repo instead of the starter kit repo.