Learning to play Minecraft with Video PreTraining

OpenAI Blog Models

Summary

OpenAI introduced Video PreTraining (VPT), a semi-supervised method that trains neural networks to play Minecraft by learning from 70,000 hours of unlabeled human gameplay video combined with a small labeled dataset. The model learns complex sequential tasks using the native human interface (keyboard and mouse) and demonstrates capabilities like crafting diamond tools and pillar jumping, representing progress toward general computer-using agents.

We trained a neural network to play Minecraft by Video PreTraining (VPT) on a massive unlabeled video dataset of human Minecraft play, while using only a small amount of labeled contractor data. With fine-tuning, our model can learn to craft diamond tools, a task that usually takes proficient humans over 20 minutes (24,000 actions). Our model uses the native human interface of keypresses and mouse movements, making it quite general, and represents a step towards general computer-using agents.
Original Article
View Cached Full Text

Cached at: 04/20/26, 02:46 PM

# Learning to play Minecraft with Video PreTraining Source: [https://openai.com/index/vpt/](https://openai.com/index/vpt/) OpenAIWe trained a neural network to play Minecraft by Video PreTraining \(VPT\) on a massive unlabeled video dataset of human Minecraft play, while using only a small amount of labeled contractor data\. With fine\-tuning, our model can learn to craft diamond tools, a task that usually takes proficient humans over 20 minutes \(24,000 actions\)\. Our model uses the native human interface of keypresses and mouse movements, making it quite general, and represents a step towards general computer\-using agents\. The internet contains an enormous amount of publicly available videos that we can learn from\. You can watch a person make a gorgeous presentation, a digital artist draw a beautiful sunset, and a Minecraft player build an intricate house\. However, these videos only provide a record of*what*happened but not precisely*how*it was achieved, i\.e\., you will not know the exact sequence of mouse movements and keys pressed\. If we would like to build large\-scale[foundation models⁠\(opens in a new window\)](https://arxiv.org/abs/2108.07258)in these domains as we’ve done in language with[GPT⁠\(opens in a new window\)](https://proceedings.neurips.cc/paper/2020/hash/1457c0d6bfcb4967418bfb8ac142f64a-Abstract.html), this lack of action labels poses a new challenge not present in the language domain, where “action labels” are simply the next words in a sentence\. In order to utilize the wealth of unlabeled video data available on the internet, we introduce a novel, yet simple, semi\-supervised imitation learning method: Video PreTraining \(VPT\)\. We start by gathering a small dataset from contractors where we record not only their video, but also the actions they took, which in our case are keypresses and mouse movements\. With this data we train an inverse dynamics model \(IDM\), which predicts the action being taken at each step in the video\. Importantly, the IDM can use past*and future*information to guess the action at each step\. This task is much easier and thus requires far less data than the behavioral cloning task of predicting actions given*past video frames only*, which requires inferring what the person wants to do and how to accomplish it\. We can then use the trained IDM to label a much larger dataset of online videos and learn to act via behavioral cloning\. We chose to validate our method in Minecraft because it \(1\) is one of the most actively played video games in the world and thus has a wealth of freely available video data and \(2\) is open\-ended with a wide variety of things to do, similar to real\-world applications such as computer usage\. Unlike[prior⁠\(opens in a new window\)](https://arxiv.org/abs/2106.14876)[works⁠\(opens in a new window\)](https://arxiv.org/abs/2009.14108)in Minecraft that use simplified action spaces aimed at easing exploration, our AI uses the much more generally applicable, though also much more difficult, native human interface: 20Hz frame rate with the mouse and keyboard\. Trained on 70,000 hours of IDM\-labeled online video, our behavioral cloning model \(the “VPT foundation model”\) accomplishes tasks in Minecraft that are nearly impossible to achieve with reinforcement learning from scratch\. It learns to chop down trees to collect logs, craft those logs into planks, and then craft those planks into a crafting table; this sequence takes a human proficient in Minecraft approximately 50 seconds or 1,000 consecutive game actions\. Additionally, the model performs other complex skills humans often do in the game, such as swimming, hunting animals for food, and eating that food\. It also learned the skill of “pillar jumping”, a common behavior in Minecraft of elevating yourself by repeatedly jumping and placing a block underneath yourself\. Foundation models are designed to have a broad behavior profile and be generally capable across a wide variety of tasks\. To incorporate new knowledge or allow them to specialize on a narrower task distribution, it is common practice to fine\-tune these models to smaller, more specific datasets\. As a case study into how well the VPT foundation model can be fine\-tuned to downstream datasets, we asked our contractors to play for 10 minutes in brand new Minecraft worlds and build a house from basic Minecraft materials\. We hoped that this would amplify the foundation model’s ability to reliably perform “early game” skills such as building crafting tables\. When fine\-tuning to this dataset, not only do we see a massive improvement in reliably performing the early game skills already present in the foundation model, but the fine\-tuned model also learns to go even deeper into the technology tree by crafting both wooden and stone tools\. Sometimes we even see some rudimentary shelter construction and the agent searching through villages, including raiding chests\. Perhaps the most important hypothesis of our work is that it is far more effective to use labeled contractor data to train an IDM \(as part of the VPT pipeline\) than it is to directly train a BC foundation model from that same small contractor dataset\. To validate this hypothesis we train foundation models on increasing amounts of data from 1 to 70,000 hours\. Those trained on under 2,000 hours of data are trained on the contractor data with ground\-truth labels that were originally collected to train the IDM, and those trained on over 2,000 hours are trained on internet data labeled with our IDM\. We then take each foundation model and fine\-tune it to the house building dataset described in the previous section\. As foundation model data increases, we generally see an increase in crafting ability, and only at the largest data scale do we see the emergence of stone tool crafting\. When it is possible to specify a reward function, reinforcement learning \(RL\) can be a powerful method for eliciting high, potentially even super\-human, performance\. However, many tasks require overcoming hard exploration challenges, and most RL methods tackle these with*random*exploration priors, e\.g\. models are often incentivized to act randomly via entropy bonuses\. The VPT model should be a much better prior for RL because emulating human behavior is likely much more helpful than taking random actions\. We set our model the challenging task of collecting a diamond pickaxe, an unprecedented capability in Minecraft made all the more difficult when using the native human interface\. Crafting a diamond pickaxe requires a long and complicated sequence of subtasks\. To make this task tractable, we reward agents for each item in the sequence\. We found that an RL policy trained from a random initialization \(the standard RL method\) barely achieves any reward, never learning to collect logs and only rarely collecting sticks\. In stark contrast, fine\-tuning from a VPT model not only learns to craft diamond pickaxes \(which it does in 2\.5% of 10\-minute Minecraft episodes\), but it even has a human\-level success rate at collecting all items leading up to the diamond pickaxe\. This is the first time anyone has shown a computer agent capable of crafting diamond tools in Minecraft, which takes humans over 20 minutes \(24,000 actions\) on average\. VPT paves the path toward allowing agents to*learn to act*by watching the vast numbers of videos on the internet\. Compared to generative video modeling or contrastive methods that would only yield*representational*priors, VPT offers the exciting possibility of directly learning large scale*behavioral priors*in more domains than just language\. While we only experiment in Minecraft, the game is very open\-ended and the native human interface \(mouse and keyboard\) is very generic, so we believe our results bode well for other similar domains, e\.g\. computer usage\. For more information, please see[our paper⁠\(opens in a new window\)](https://arxiv.org/abs/2206.11795)\. We are also open sourcing our contractor data, Minecraft environment, model code, and model weights, which we hope will aid future research into VPT\. Furthermore, we have partnered with the MineRL NeurIPS competition this year\. Contestants can use and fine\-tune our models to try to solve many difficult tasks in Minecraft\. Those interested can check out the[competition webpage⁠\(opens in a new window\)](https://www.aicrowd.com/challenges/neurips-2022-minerl-basalt-competition)and compete for a blue\-sky prize of $100,000 in addition to a regular prize pool of $20,000\. Grants are available to self\-identified underrepresented groups and individuals\.

Similar Articles

Procgen and MineRL Competitions

OpenAI Blog

OpenAI co-organizes the MineRL 2020 Competition to advance sample-efficient reinforcement learning algorithms that leverage human demonstrations. Participants compete to obtain a diamond in Minecraft using only 8 million simulator samples and 4 days of single-GPU training, with access to a 60+ million frame human demonstration dataset.

Learning Montezuma’s Revenge from a single demonstration

OpenAI Blog

OpenAI demonstrates a method for training a reinforcement learning agent to play Montezuma's Revenge from a single human demonstration, addressing the challenge of sparse rewards through curriculum learning and careful hyperparameter tuning. The approach achieves strong performance on the notoriously difficult Atari game while showing generalization limitations on other titles.

Creating agent and human collaboration with GPT 4o

OpenAI Blog

Altera, founded by former MIT professor Dr. Robert Yang, launches autonomous AI agents powered by GPT-4o that can play Minecraft collaboratively with humans. The company addresses data degradation in long-duration AI autonomy by combining OpenAI's language models with a brain-inspired parallel architecture.

Learning to Move Before Learning to Do: Task-Agnostic pretraining for VLAs

Hugging Face Daily Papers

Task-Agnostic Pretraining (TAP) decomposes VLA training into self-supervised motor skill learning from unlabeled interaction data, then lightweight language grounding, achieving strong performance with minimal expert demonstrations. It matches or outperforms models trained on millions of expert trajectories while being robust to real-world perturbations.

Robots that learn

OpenAI Blog

OpenAI describes a robot learning system powered by two neural networks — a vision network trained on simulated images and an imitation network that generalizes task demonstrations to new configurations. The system is applied to block-stacking tasks, learning to infer and replicate task intent from paired demonstration examples.