Main Content

Reinforcement Learning Toolbox

Design and train policies using reinforcement learning

Reinforcement Learning Toolbox™ provides an app, functions, and a Simulink® block for training policies using reinforcement learning algorithms, including DQN, PPO, SAC, and DDPG. You can use these policies to implement controllers and decision-making algorithms for complex applications such as resource allocation, robotics, and autonomous systems.

The toolbox lets you represent policies and value functions using deep neural networks or look-up tables and train them through interactions with environments modeled in MATLAB® or Simulink. You can evaluate the single- or multi-agent reinforcement learning algorithms provided in the toolbox or develop your own. You can experiment with hyperparameter settings, monitor training progress, and simulate trained agents either interactively through the app or programmatically. To improve training performance, simulations can be run in parallel on multiple CPUs, GPUs, computer clusters, and the cloud (with Parallel Computing Toolbox™ and MATLAB Parallel Server™).

Through the ONNX™ model format, existing policies can be imported from deep learning frameworks such as TensorFlow™ Keras and PyTorch (with Deep Learning Toolbox™). You can generate optimized C, C++, and CUDA® code to deploy trained policies on microcontrollers and GPUs. The toolbox includes reference examples to help you get started.

Get Started

Learn the basics of Reinforcement Learning Toolbox

MATLAB Environments

Model reinforcement learning environment dynamics using MATLAB

Simulink Environments

Model reinforcement learning environment dynamics using Simulink models


Create and configure reinforcement learning agents using common algorithms, such as SARSA, DQN, DDPG, and A2C

Policies and Value Functions

Define policy and value function representations, such as deep neural networks and Q tables

Training and Validation

Train and simulate reinforcement learning agents

Policy Deployment

Code generation and deployment of trained policies