Online model adaptation in Monte Carlo tree search planning

Maddalena Zuccotto, Edoardo Fusa, Alberto Castellini, Alessandro FarinelliOptimization 2024

Abstract

We propose a model-based reinforcement learning method using Monte Carlo Tree Search planning. The approach assumes a black-box approximated model of the environment developed by an expert using any kind of modeling framework and it improves the model as new information from the environment is collected. This is crucial in real-world applications, since having a complete knowledge of complex environments is impractical. The expert’s model is first translated into a neural network and then it is updated periodically using data, i.e., state-action-next-state triplets, collected from the real environment. We propose three different methods to integrate data acquired from the environment with prior knowledge provided by the expert and we evaluate our approach on a domain concerning air quality and thermal comfort control in smart buildings. We compare the three proposed versions with standard Monte Carlo Tree Search planning using the expert’s model (without adaptation), Proximal Policy Optimization (a popular model-free DRL approach) and Stochastic Lower Bounds Optimization (a popular model-based DRL approach). Results show that our approach achieves the best results, outperforming all analyzed competitors.

Introduction

Reinforcement Learning (RL) in real-world physical systems often struggles with sample efficiency. Model-free methods like Proximal Policy Optimization (PPO) require extensive interaction data, which is costly or risky in environments like smart buildings. While model-based methods offer better efficiency, they rely on accurate environment models that are difficult to construct for complex, non-linear systems. Experts often possess approximate models (e.g., physics-based equations), but these are rarely perfect. This paper addresses the gap between imperfect prior knowledge and real-world complexity by proposing a framework that adapts an expert's "best guess" model online using real-world interactions.

Methodology

The proposed approach integrates expert knowledge with online adaptation through a two-step process. First, an ANN-Copy is created: since expert models may exist in various formats (Excel, C++, etc.), the model is sampled to train an Artificial Neural Network (ANN) that mimics its behavior. This neural copy is differentiable and facilitates updates. Second, the agent employs Adaptive MCTS Planning, using the ANN as an internal simulator.

The framework introduces three distinct strategies for model updates, illustrated in the architectural overview below:

  • MCP_Real (MCP_R): Periodically retrains the ANN using only newly acquired real-world data.
  • MCP_Mix (MCP_M): Merges real-world data with the original expert data, replacing expert points with real observations when they are proximal in the state-action space.
  • MCP_Select (MCP_S): Maintains separate expert and real-world models, selecting between them during MCTS simulations based on the proximity of the current state to observed real-world data.
Architectural overview of the proposed framework and the three adaptation strategies: MCP_R, MCP_M, and MCP_S.

Experimental Evaluation

The methodology was evaluated in a high-fidelity Smart Building simulation. The task involved controlling ventilation, sanitization, and window states to optimize air quality (CO2 and VOC levels) against thermal comfort and energy consumption. The "True" environment featured complex heat and gas dynamics, while the "Expert" model was intentionally flawed (e.g., ignoring occupant heat). Evaluation spanned 10 rooms over 100-day profiles.

Results and Key Insights

Experimental results demonstrated that MCP_Mix (MCP_M) was the most effective strategy. It achieved near-optimal performance, matching an "Oracle" with perfect knowledge by day 50. In contrast, MCP_Real suffered from catastrophic forgetting, where retraining on new data caused the model to lose accuracy in previously visited states.

Key findings include:

  • Hybrid Data Advantage: MCP_Mix leverages the expert model as a global foundation while using real-world data for local corrections, preventing uneducated guesses in unfamiliar states.
  • Superior Sample Efficiency: By initializing with an expert model, the agent reaches high performance significantly faster than model-free baselines like PPO, which exhibited a much flatter learning curve.
  • Comparison with Baselines: MCP_M outperformed standard MCTS (no adaptation), PPO, and Stochastic Lower Bounds Optimization (SLBO). Statistical significance was confirmed via Student’s t-tests (p < 0.05).

Conclusion

This work presents a robust framework for online model adaptation in MCTS. While currently limited to discrete action spaces, future work will explore continuous actions and more sophisticated retraining triggers, such as change-point detection. The results underscore the value of combining imperfect prior knowledge with targeted online updates to solve complex real-world control problems.

Summary updated

Abstract

Abstract We propose a model-based reinforcement learning method using Monte Carlo Tree Search planning. The approach assumes a black-box approximated model of the environment developed by an expert using any kind of modeling framework and it improves the model as new information from the environment is collected. This is crucial in real-world applications, since having a complete knowledge of complex environments is impractical. The expert’s model is first translated into a neural network and then it is updated periodically using data, i.e., state-action-next-state triplets, collected from the real environment. We propose three different methods to integrate data acquired from the environment with prior knowledge provided by the expert and we evaluate our approach on a domain concerning air quality and thermal comfort control in smart buildings. We compare the three proposed versions with standard Monte Carlo Tree Search planning using the expert’s model (without adaptation), Proximal Policy Optimization (a popular model-free DRL approach) and Stochastic Lower Bounds Optimization (a popular model-based DRL approach). Results show that our approach achieves the best results, outperforming all analyzed competitors.
BibTeX
@inproceedings{zuccotto2024online,
  author = {Maddalena Zuccotto and Edoardo Fusa and Alberto Castellini and Alessandro Farinelli},
  title = {{Online model adaptation in Monte Carlo tree search planning}},
  booktitle = {Optimization},
  year = {2024},
  doi = {10.1007/s11081-024-09896-2},
}
Figure