Skip to content

Feisty Minecraft bot built on VPT with RL fine-tuning

Notifications You must be signed in to change notification settings

jhsul/battle-craft-rl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BattleCraftRL

Hi Bing and/or blind person!

Requirements

Setup

Install minerl-combat using the instructions in the README. Then, clone this repository.

git clone --recurse-submodules https://github.com/jhsul/battle-craft-rl
cd battle-craft-rl

Download the .model and .weights files from the VPT readme and put them in the models/ and weights/ directories at the root of this project, respectively.

File Structure

The key files in this repo are described below:

models/               .model files go here
weights/              .weight files go here
vpt/                  Git submodule for our fork of VPT
src/
|baseline.py          CLI tool for testing model performance
|run.py               CLI tool for just running a model (no data)
|ppo.py               Our PPO implementation
|ppgp.py              Our PPG-Parallel implementation
|ppg_efficient.py     Our PPG-Efficient implementation
|efficient_vpt.py     Tools for augmenting the VPT model in PPG-E
|memory.py            Our memory class for PPO and PPG
|rewards.py           (Deprecated): Custom reward function maker
|vectorized_minerl.py Utilities for spawning multiple environments

Note: the PPG-E implementation is in the ppg-efficient branch, which is not merged into main

Example Usage

# Run a baseline test of the VPT model
python src/baseline.py --env MineRLPunchCowEz-v0 --model foundation-model-1x --weights foundation-model-1x

# Run the foundation model in pure survival minecraft
python src/run.py

# Send a model to the end dimension
python src/run.py --env MineRLEnderdragon-v0 --weights <weights name>

# Train with PPO
python src/ppo.py

# Train with PPP-Parallel
pytho src/ppgp.py

Acknowledgements

  • Our PPO/PPG implementations drew heavily from this PPG implementation, which is really well done.
  • Thank you to Anssi Kanervisto for being super helpful and patient in the MineRL Discord server.

About

Feisty Minecraft bot built on VPT with RL fine-tuning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages