Reinforcement Learning in Configurable Continuous Environments

Alberto Maria Metelli, Emanuele Ghelfi, Marcello Restelli

Standard Reinforcement Learning (RL) typically treats the environment as a fixed entity. An agent learns a policy $\pi$ to maximize rewards within a static set of rules and physics. However, many real-world scenarios are inherently configurable. Consider a Formula 1 driver: they do not just learn how to drive; they work with engineers to configure the car itself—adjusting aerodynamics, suspension, and gear ratios—to match their driving style and the specific track.

This concept is formalized as a Configurable Markov Decision Process (Conf-MDP). While previous algorithms attempted to solve Conf-MDPs, they suffered from two massive deal-breakers for real-world application: they only worked in finite, discrete state-action spaces, and they required full knowledge of the environment's true transition dynamics.

To bridge this gap, researchers introduced REMPS (Relative Entropy Model Policy Search), the first trust-region algorithm designed for Conf-MDPs in continuous environments that can operate without a perfect model of the world.

How REMPS Works

REMPS is a trust-region method inspired by the classic Relative Entropy Policy Search (REPS) algorithm. It jointly optimizes both the agent's behavior and the environment's physical parameters to reach global optima that standard RL might miss. The algorithm operates in two alternating phases:

  1. Optimization Phase: Instead of tweaking policy parameters directly, REMPS searches for an "ideal" stationary distribution of states and actions that maximizes the reward. To ensure training stability, it imposes a Relative Entropy (KL-divergence) constraint, denoted as $\kappa$. This keeps the new distribution close to the current one, preventing the wild oscillations or "catastrophic forgetting" common in simple gradient methods.
  2. Projection Phase: The "ideal" distribution found in the first step might not be physically possible given the current policy or environment constraints. In this phase, the algorithm performs a moment projection to find the parametric policy ($\pi_\theta$) and the environment configuration ($p_\omega$) that most closely match that ideal distribution.

Crucially, REMPS can be used in a model-free context. If the true environment dynamics are unknown, it uses a learned approximation (such as a neural network or Gaussian process) to estimate how different configurations affect transitions.

Key Insights: Escaping Local Optima

One of the most striking insights from the paper is that standard gradient-based methods (like REINFORCE) often fail in Conf-MDPs. Because gradients always try to improve performance immediately, they frequently get trapped in local optima.

Performance on the Chain Domain, illustrating how REMPS escapes local optima to find the global optimum, unlike standard gradient-based methods.

Thanks to its trust-region approach, REMPS can temporarily accept a "worse" policy if it allows for a significantly better environment configuration, eventually navigating out of the trap to reach a higher global optimum. The researchers demonstrated this clearly in the Chain Domain, a discrete environment specifically designed to test whether algorithms can escape local peaks. While the gradient-based G(PO)MDP method consistently got stuck, REMPS successfully found the global optimum.

Robustness to Approximation

Configuring the environment does not just lead to a better final result; it can actually act as a catalyst to speed up the learning process. By tuning the environment to be "easier" or more suited to the agent's current capabilities, the agent gathers better data faster.

Comparison of REMPS and G(PO)MDP using exact and approximate models, demonstrating REMPS's stability and higher returns even with imperfect environment dynamics.

Furthermore, REMPS is highly robust. In tests on a continuous Configurable Cartpole environment, REMPS achieved higher rewards than gradient methods. This performance gap was especially pronounced in the "approximated model" scenario, where REMPS maintained much greater stability and higher average returns despite lacking perfect knowledge of the environment's physics.

To prove its real-world viability, the authors also tested REMPS in TORCS (The Open Racing Car Simulator), a high-fidelity racing environment. The agent jointly learned to drive while configuring three car parameters: front wing orientation, rear wing orientation, and brake repartition. REMPS significantly outperformed standard REPS (which only learns the policy), achieving higher average rewards and faster lap times through successful aerodynamic and braking tuning.

Limitations and Future Directions

While REMPS represents a significant leap forward for Conf-MDPs, the authors note a few limitations:

  • Hyperparameter Sensitivity: The KL-divergence threshold $\kappa$ is critical. If it is too small, the agent learns too slowly; if it is too large, the estimates become noisy and unstable. Dynamically modifying $\kappa$ during training is a promising area for future research.
  • Knowledge of Configuration Space: The method assumes the engineers know which parameters can be configured (e.g., knowing a "wing angle" knob exists), even if the exact physics of that knob remain unknown.
  • Theoretical Guarantees: The paper provides a solid finite-sample analysis for a single step, but extending this to a full "finite-time" guarantee for the entire learning process remains an open theoretical challenge.

By allowing agents to shape their worlds alongside their behaviors, REMPS opens the door to more flexible, adaptable, and high-performing autonomous systems in complex, continuous environments.

Summary updated

BibTeX
@inproceedings{metelli2019reinforcement,
  author = {Alberto Maria Metelli and Emanuele Ghelfi and Marcello Restelli},
  title = {{Reinforcement Learning in Configurable Continuous Environments}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
}
Figure