Reinforcement Learning Toolbox
Design and train policies using reinforcement learning
Have questions? Contact sales.
Have questions? Contact sales.
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.
Create agents using deep Q-network (DQN), deep deterministic policy gradient (DDPG), proximal policy optimization (PPO), and other built-in algorithms. Use templates to develop custom agents for training policies.
Interactively design, train, and simulate reinforcement learning agents. Export trained agents to MATLAB for further use and deployment.
For complex systems with large state-action spaces, define deep neural network policies programmatically, using layers from Deep Learning Toolbox, or interactively, with Deep Network Designer. Alternatively, use the default network architecture suggested by the toolbox. Initialize the policy using imitation learning to accelerate training. Import and export ONNX models for interoperability with other deep learning frameworks.
Create and train reinforcement learning agents in Simulink with the RL Agent block. Train multiple agents simultaneously (multi-agent reinforcement learning) in Simulink using multiple instances of the RL Agent block.
Use Simulink and Simscape™ to create a model of an environment. Specify the observation, action, and reward signals within the model.
Use MATLAB functions and classes to model an environment. Specify observation, action, and reward variables within the MATLAB file.
Speed up training by running parallel simulations on multicore computers, cloud resources, or compute clusters using Parallel Computing Toolbox and MATLAB Parallel Server.
Speed up deep neural network training and inference with high-performance NVIDIA® GPUs. Use MATLAB with Parallel Computing Toolbox and most CUDA-enabled NVIDIA GPUs that have compute capability 3.0 or higher.
Use GPU Coder™ to generate optimized CUDA code from MATLAB code representing trained policies. Use MATLAB Coder™ to generate C/C++ code to deploy policies.
Use MATLAB Compiler™ and MATLAB Compiler SDK™ to deploy trained policies as standalone applications, C/C++ shared libraries, Microsoft® .NET assemblies, Java® classes, and Python® packages.
See how to develop reinforcement learning policies for problems such as inverting a simple pendulum, navigating a grid world, balancing a cart-pole system, and solving generic Markov decision processes.
Design reinforcement learning policies for automated driving applications such as adaptive cruise control, lane keeping assistance, and automatic parking.
Design reinforcement learning policies for robotics applications.
Design reinforcement learning policies for tuning, calibration, and scheduling applications.
Watch the videos in this series to learn more about reinforcement learning.