Applications
Examples of how to apply reinforcement learning
Reinforcement learning can be applied to a variety of problems in different fields, such as control, robotics, scheduling, optimization, and finance. Here are some examples.
Tutorials
- Train DQN Agent to Balance Discrete Cart-Pole System
Train a DQN agent to balance discrete action space cart-pole system modeled in MATLAB®. - Train PG Agent to Balance Discrete Cart-Pole System
Train a PG agent to balance a discrete action space cart-pole system modeled in MATLAB. - Train AC Agent to Balance Discrete Cart-Pole System
Train an AC agent to balance a discrete action space cart-pole system modeled in MATLAB. - Train DDPG Agent to Swing Up and Balance Cart-Pole System
Train a DDPG agent to swing up and balance a continuous action space cart-pole system modeled in Simscape™ Multibody™. - Train MBPO Agent to Balance Continuous Cart-Pole System
A model-based reinforcement learning agent learns a model of its environment that it can use to generate additional experiences for training. - Train DQN Agent to Swing Up and Balance Pendulum
Train a DQN agent to swing up and balance a discrete action space pendulum modeled in Simulink®. - Train DDPG Agent to Swing Up and Balance Pendulum
Train a DDPG agent to balance a continuous action space pendulum modeled in Simulink. - Train DDPG Agent to Swing Up and Balance Pendulum with Bus Signal
Train a DDPG agent to balance a continuous action space pendulum Simulink model that contains observations in a bus signal. - Train DDPG Agent to Swing Up and Balance Pendulum with Image Observation
Train a DDPG agent using an image-based observation signal. - Create DQN Agent Using Deep Network Designer and Train Using Image Observations
Create a reinforcement learning agent using the Deep Network Designer app from the Deep Learning Toolbox™. - Compare DDPG Agent to LQR Controller
Train a DDPG agent to control a second-order dynamic system modeled in MATLAB and compare it to an LQR controller. - Train PG Agent with Custom Networks to Control Discrete Double Integrator
Train a PG agent with a baseline to control a discrete action space double integrator system modeled in MATLAB. - Control Water Level in a Tank Using a DDPG Agent
Train a controller using reinforcement learning with a plant modeled in Simulink as the training environment. - Tune PI Controller Using Reinforcement Learning
Tune the gains of a PI controller using a TD3 agent. - Train SAC Agent for Ball Balance Control
Train a SAC agent to balance a ball on a flat surface using a robot arm. - Control Water Level in a Tank Using a DDPG Agent
Train a controller using reinforcement learning with a plant modeled in Simulink as the training environment. - Train Reinforcement Learning Agents to Control Quanser QUBE Pendulum
Train SAC and PPO agents to balance the Quanser QUBE rotational inverted pendulum. - Train Reinforcement Learning Agent Offline to Control Quanser QUBE Pendulum
Train TD3 agent offline to control a Quanser QUBE pendulum. - Train TD3 Agent for PMSM Control
Train a TD3 agent to control the currents in a permanent magnet synchronous motor. - Train DQN Agent with LSTM Network to Control House Heating System
Train a DQN agent with a recurrent network to control the temperature of an house. - Train Reinforcement Learning Agent with Constraint Enforcement
Train a DDPG agent with actions constrained using the Constraint Enforcement block. - Create and Train Custom LQR Agent
Create a custom agent that solves an LQR problem and train it using the built-in train function. - Train DDPG Agent to Control Sliding Robot
Train a DDPG agent to control a continuous action space flying robot model. - Train PPO Agent for a Lander Vehicle
Train a discrete PPO agent to land a flying vehicle. - Train Discrete Soft Actor Critic Agent for Lander Vehicle
Train a discrete SAC agent to land a flying vehicle. - Train Biped Robot to Walk Using Reinforcement Learning Agents
Compare DDPG and TD3 agent for the control a biped walking robot modeled in Simscape Multibody. - Train Biped Robot to Walk Using Evolution Strategy-Reinforcement Learning Agents
Train TD3 agent using evolutionary strategy. - Quadruped Robot Locomotion Using DDPG Agent
Train a DDPG agent to control a quadruped walking robot modeled in Simscape Multibody. - Generate Reward Function from a Model Predictive Controller for a Servomotor
Generate a reward function from an MPC controller applied to a servomotor and use it to train a TD3 agent. - Generate Reward Function from a Model Verification Block for a Water Tank System
Generate a reward function from an model verification block applied to a water tank system and use it to train a TD3 agent. - Imitate MPC Controller for Lane Keeping Assist
Train a deep neural network to imitate the behavior of a model predictive controller within a lane keeping assist system. - Imitate Nonlinear MPC Controller for Flying Robot
Train a deep neural network to imitate the behavior of a nonlinear model predictive controller for a flying robot. - Train DDPG Agent with Pretrained Actor Network
Train a DDPG agent using an actor network that has been previously trained using supervised learning. - Train DQN Agent for Lane Keeping Assist
Train a DQN agent for a lane keeping assist application. - Train PPO Agent with Curriculum Learning for a Lane Keeping Application
Train a PPO agent for a lane keeping assist task by gradually increasing task complexity. - Train DDPG Agent for Adaptive Cruise Control
Train a DDPG agent for an adaptive cruise control application. - Train DDPG Agent for Path-Following Control
Train a DDPG agent for lane following control. - Train Multiple Agents for Path Following Control
Train a DQN and a DDPG agent to collaboratively perform adaptive cruise control and lane keeping assist to follow a path. - Train Hybrid SAC Agent for Path Following Control
Train an hybrid SAC agent for lane following control. - Train PPO Agent for Automatic Parking Valet
Train a discrete action space PPO agent to park a car in an open parking space. - Automatic Parking Valet with Unreal Engine Simulation
Use a TD3 agent with an MPC controller to perform a parking maneuver. - Train Reinforcement Learning Agent for Simple Contextual Bandit Problem
Train Q and DQN agents to solve a contextual bandit problem. - Train Agent to Play Turn-Based Game
Train a DQN agent to play a turn-based game. - Deep Reinforcement Learning for Optimal Trade Execution
This example shows how to use the Reinforcement Learning Toolbox™ and Deep Learning Toolbox™ to design agents for optimal trade execution. - Multiperiod Goal-Based Wealth Management Using Reinforcement Learning
This example shows a reinforcement learning (RL) approach to maximize the probability of obtaining an investor's wealth goal at the end of the investment horizon. - Train DQN Agent for Beam Selection
Train a deep Q-network (DQN) reinforcement learning agent for beam selection in a 5G new radio communications system. - Water Distribution System Scheduling Using Reinforcement Learning
Train a DQN agent to optimally activate pumps in a water distribution system. - Train MBPO Agent to Balance Continuous Cart-Pole System
A model-based reinforcement learning agent learns a model of its environment that it can use to generate additional experiences for training. - Model-Based Reinforcement Learning Using Custom Training Loop
Create a model-based reinforcement learning agent using a custom training loop.