Giter Site home page Giter Site logo

jerryfrancis-97 / basalt-2022-behavioural-cloning-baseline Goto Github PK

View Code? Open in Web Editor NEW

This project forked from minerllabs/basalt-2022-behavioural-cloning-baseline

0.0 0.0 0.0 128 KB

Simple behavioural cloning baseline solution for BASALT 2022

License: MIT License

Python 99.29% Dockerfile 0.71%

basalt-2022-behavioural-cloning-baseline's Introduction

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.

Downloading the BASALT dataset

You can find the index files containing all the download URLs for the full BASALT dataset in the OpenAI VPT repository at the bottom.

We have included a download utility (utils/download_dataset.py) to help you download the dataset. You can use it with the index files from the OpenAI VPT repository. For example, if you download the FindCave dataset index file, named find-cave-Jul-28.json, you can download first 100 demonstrations to MineRLBasaltFindCave-v0 directory with:

python download_dataset.py --json-file find-cave-Jul-28.json --output-dir MineRLBasaltFindCave-v0 --num-demos 100

Basic dataset statistics (note: one trajectory/demonstration may be split up into multiple videos):

Size  #Videos  Name
--------------------------------------------------
146G  1399     MineRLBasaltBuildVillageHouse-v0
165G  2833     MineRLBasaltCreateVillageAnimalPen-v0
165G  5466     MineRLBasaltFindCave-v0
175G  4230     MineRLBasaltMakeWaterfall-v0

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.

Note: This repository is not submittable as-is. You first need to train the models, add them to the git repository and then submit to AICrowd.

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

basalt-2022-behavioural-cloning-baseline's People

Contributors

miffyli avatar yamatokataoka avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.