FilippoAiraldi/mpc-reinforcement-learning
Reinforcement Learning with Model Predictive Control
What it solves
This library provides a framework for training model-based Reinforcement Learning (RL) agents where Model Predictive Control (MPC) serves as the function approximation. It merges MPC's ability to predict future environment behavior and compute optimal actions with RL's adaptability to unknown and complex environments, allowing the agent to learn optimal control policies in systems where the underlying dynamics or costs are not fully known.
How it works
The framework uses an MPC controller that is parametrized in its objective, predictive model, and constraints. This controller acts as both the policy provider (generating actions) and the function approximator for state and state-action value functions. An RL algorithm—such as Q-learning or Deterministic Policy Gradient (DPG)—is then used to tune these MPC parameters to increase performance. The library leverages csnlp to compute the sensitivities of the MPC controller relative to its parameters, which are essential for calculating RL updates.
Who it’s for
Researchers and engineers working in optimal control and reinforcement learning, specifically those dealing with continuous state and action spaces in physical or simulated systems (e.g., Linear Time Invariant systems).
Highlights
- Hybrid Approach: Combines MPC and RL into a single data-driven control technique.
- Multiple RL Algorithms: Supports gradient-based methods like on-policy and off-policy Q-learning and DPG, as well as gradient-free methods like Bayesian Optimization.
- Integration: Works with
gymnasiumenvironments and leveragescsnlpfor sensitivity analysis. - Parametrized Control: Allows the tuning of predictive models, objectives, and constraints through RL learning agents.
Related
- Project
- Project
- Project
- Dispatch
- Project