Plug and Play, Model-Based Reinforcement Learning

Majid Abdolshah, Hung Le, Thommen George Karimpanal, Sunil Gupta, Santu Rana, Svetha VenkatesharXiv 2021

Abstract

Standard Reinforcement Learning (RL) agents often fail to generalize when environment configurations change. We present Plug and Play Reinforcement Learning (PaPRL), a framework that factorizes global dynamics into modular, object-specific transition and reward models. By treating objects as independent components with class-wide physics and instance-specific goals, PaPRL enables zero-shot integration of new objects and robust adaptation to scene changes. Our results in physics-based reasoning tasks demonstrate superior sample efficiency and dynamic adaptability compared to traditional global RL approaches.

Introduction

Reinforcement Learning (RL) has achieved significant success in static environments, yet it remains brittle when faced with dynamic scene changes. Most existing Object-Oriented RL (OORL) approaches rely on global transition models and reward functions. Consequently, adding a new obstacle or altering an existing object's properties often necessitates extensive retraining. There is a critical need for architectures where objects carry their own "knowledge"—encompassing both physics and goals—allowing for seamless scaling in complex, dynamic environments.

Methodology: The PaP-MDP Framework

The proposed Plug and Play Markov Decision Processes (PaP-MDP) framework factorizes the environment into modular components. The architecture relies on three core innovations:

  1. Factorized Transition Models: Local transition functions are learned for specific classes of objects. For instance, all "rotating walls" share a common physics model, which can be pre-trained in simple simulations and "plugged" into complex scenes.
  2. Object-Specific Reward Models: Instead of a centralized reward function, each active object maintains its own reward model. The global reward is treated as the aggregate result of these individual interactions.
  3. The Trust Factor (TF): This transfer learning mechanism allows new objects to inherit reward models from their class. The Trust Factor monitors prediction accuracy; if the inherited model fails to predict actual rewards (e.g., due to unique object dimensions), the agent transitions to learning a specific model for that instance.
Architecture of the PaP-MDP framework showing modular object-specific reward and transition models.

Experimental Setup

The framework was evaluated using a custom environment inspired by the PHYRE benchmark for physical reasoning. The setup includes:

  • Active Objects: "Rotating Walls" and "Arc Walls" that adjust their rotation or velocity to influence the scene.
  • Neutral Objects: A "Neutral-ball" that responds to physics but does not take actions.
  • The Task: A basketball-style challenge where active objects must coordinate to guide the neutral ball into a target basket.
The experimental environment where active objects (red) must manipulate a neutral ball (blue) into a target basket (green).

Results and Discussion

Experimental results indicate that PaP-Offline (using pre-trained physics) significantly outperforms standard Deep Q-Networks (DQN) and Multi-Object DQN (MO-DQN) in terms of sample efficiency. By bypassing the need to re-learn basic collision physics, the agent achieves high reward levels rapidly.

Furthermore, PaPRL demonstrates remarkable robustness to "scene churn." In tests where objects were added or removed mid-episode, PaPRL showed immediate performance gains upon the addition of new "tools," whereas baseline models struggled to adapt. Even the PaP-Online variant, which learns physics from scratch, eventually surpassed baselines, suggesting that factorization provides a clearer learning signal.

Conclusion and Future Work

PaPRL offers a modular path forward for RL in dynamic environments. However, several challenges remain. Currently, the system assumes pre-processed object attributes; integrating raw pixel-based vision is a necessary next step. Additionally, the model assumes active objects do not interact directly with one another. Future research will explore multi-agent coordination within the plug-and-play paradigm and the application of this factorized approach to more complex, stochastic, or soft-body physics environments.

Summary updated

BibTeX
@misc{abdolshah2021plug,
  author = {Majid Abdolshah and Hung Le and Thommen George Karimpanal and Sunil Gupta and Santu Rana and Svetha Venkatesh},
  title = {{Plug and Play, Model-Based Reinforcement Learning}},
  year = {2021},
  eprint = {2108.08960},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2108.08960},
}
Figure