Deep Reinforcement Learning with Model Learning and Monte Carlo Tree Search in Minecraft

Stephan AlanizarXiv 2018 · OpenReview

Abstract

Deep reinforcement learning has been successfully applied to several visual-input tasks using model-free methods. In this paper, we propose a model-based approach that combines learning a DNN-based transition model with Monte Carlo tree search to solve a block-placing task in Minecraft. Our learned transition model predicts the next frame and the rewards one step ahead given the last four frames of the agent's first-person-view image and the current action. Then a Monte Carlo tree search algorithm uses this model to plan the best sequence of actions for the agent to perform. On the proposed task in Minecraft, our model-based approach reaches the performance comparable to the Deep Q-Network's, but learns faster and, thus, is more training sample efficient.

Introduction

Model-free reinforcement learning (RL) algorithms, such as Deep Q-Networks (DQN), have demonstrated remarkable success in complex environments. However, these methods are often criticized for their low sample efficiency, requiring millions of interactions to map observations to optimal actions without an inherent understanding of environmental dynamics. This paper explores a model-based RL approach in the context of Minecraft, a partially observable environment where first-person views and block-placing actions create complex visual dynamics. The goal is to develop an agent capable of learning an internal transition model to plan actions proactively rather than reactively.

Methodology

The proposed system integrates a deep neural network (DNN) transition model with Monte Carlo Tree Search (MCTS).

Transition Model

The transition model functions as an internal "world simulator." It takes the last four frames of the agent's first-person view (64x64 grayscale) and the current action as input. Using an encoder-decoder architecture, it compresses these inputs into a feature vector to predict the subsequent frame and the rewards for all possible next actions.

The DNN transition model architecture featuring an encoder-decoder structure for frame reconstruction and reward prediction.

Monte Carlo Tree Search (MCTS)

Instead of relying solely on learned Q-values, the agent utilizes the transition model to simulate future action sequences. The UCT (Upper Confidence Bound applied to Trees) algorithm balances exploration and exploitation during this planning phase. A critical innovation is the one-step-ahead reward prediction, which allows the MCTS to evaluate states more efficiently by predicting rewards for the next state simultaneously with the state transition.

Overview of the model-based planning process, illustrating the transition from state $s_t$ to $s_{t+1}$ and the associated reward prediction $\hat{r}_{t+2}$.

Experimental Setup

The approach was evaluated using a custom "Block-Placing Task" within the Malmo framework. The agent is tasked with placing blocks on specific colored tiles within a 5x5 grid within a limit of 30 actions. Performance was benchmarked against a standard DQN agent across 100 random task instances.

Results and Discussion

The model-based approach demonstrated superior sample efficiency compared to the model-free baseline. While both agents eventually converged to a success rate of approximately 72-74% after 5 million steps, the MCTS agent reached a 64% success rate in just 1 million steps—a milestone the DQN agent required 2.5 million steps to achieve.

Metric (at 1M steps) MCTS Agent (Model-Based) DQN Agent (Model-Free)
Average Reward 2.15 0.05
Success Rate 64% 12%

Key findings include:

  • Learning Dynamics vs. Values: Learning the environment's transition function proved to be a more straightforward task for the network than learning long-term Q-values, contributing to the observed sample efficiency.
  • The Power of Foresight: The inclusion of one-step-ahead reward predictions significantly boosted performance, doubling the agent's score by providing better guidance for MCTS exploration.
  • Mitigating Compounding Errors: Despite the risk of prediction errors accumulating over time, the structured, grid-like nature of the Minecraft environment allowed for reliable planning up to 10 steps deep.

Conclusion

This study demonstrates that combining a learned transition model with MCTS can significantly improve the sample efficiency of RL agents in complex, visual environments. While the MCTS agent is more computationally intensive during inference, its ability to learn from fewer interactions is a major advantage. Future work could incorporate Recurrent Neural Networks (RNNs) to provide the agent with longer-term memory, potentially overcoming current limitations in partially observable scenarios where placed blocks or landmarks may leave the immediate field of view.

Summary updated

Abstract

Deep reinforcement learning has been successfully applied to several visual-input tasks using model-free methods. In this paper, we propose a model-based approach that combines learning a DNN-based transition model with Monte Carlo tree search to solve a block-placing task in Minecraft. Our learned transition model predicts the next frame and the rewards one step ahead given the last four frames of the agent's first-person-view image and the current action. Then a Monte Carlo tree search algorithm uses this model to plan the best sequence of actions for the agent to perform. On the proposed task in Minecraft, our model-based approach reaches the performance comparable to the Deep Q-Network's, but learns faster and, thus, is more training sample efficient.
BibTeX
@misc{alaniz2018deep,
  author = {Stephan Alaniz},
  title = {{Deep Reinforcement Learning with Model Learning and Monte Carlo Tree Search in Minecraft}},
  year = {2018},
  eprint = {1803.08456},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1803.08456},
}
Figure