This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Training and Validation

Train and simulate reinforcement learning agents

To learn an optimal policy, a reinforcement learning agent interacts with the environment through a repeated trial-and-error process. During training, the agent tunes the parameters of its policy representation to maximize the long-term reward. Reinforcement Learning Toolbox™ software provides functions for training agents and validating the training results through simulation. For more information, see Train Reinforcement Learning Agents.

Functions

trainTrain a reinforcement learning agent within a specified environment
rlTrainingOptionsOptions for training reinforcement learning agents
simSimulate a trained reinforcement learning agent within a specified environment
rlSimulationOptionsOptions for simulating reinforcement learning environments

Blocks

RL AgentReinforcement learning agent

Topics

Training and Simulation Basics

Train Reinforcement Learning Agents

Find the optimal policy by training your agent within a specified environment.

Train Reinforcement Learning Agent in Basic Grid World

Train Q-learning and SARSA agents to solve a grid world in MATLAB®.

Train Reinforcement Learning Agent in MDP Environment

Train a reinforcement learning agent in a generic Markov decision process environment.

Create Simulink Environment and Train Agent

Train a controller using reinforcement learning with a plant modeled in Simulink® as the training environment.

Parallel Computing

Train AC Agent to Balance Cart-pole System Using Parallel Computing

Train actor-critic agent using asynchronous parallel computing.

Train DQN Agent for Lane Keeping Assist Using Parallel Computing

Train a reinforcement learning agent for an automated driving application using parallel computing.

Train Agents in MATLAB Environments

Train DQN Agent to Balance Cart-Pole System

Train a deep Q-learning network agent to balance a cart-pole system modeled in MATLAB.

Train DDPG Agent to Control Double Integrator System

Train a deep deterministic policy gradient agent to control a second-order dynamic system modeled in MATLAB.

Train PG Agent to Balance Cart-Pole System

Train a policy gradient agent to balance a cart-pole system modeled in MATLAB.

Train PG Agent with Baseline to Control Double Integrator System

Train a policy gradient with a baseline to control a double integrator system modeled in MATLAB.

Train AC Agent to Balance Cart-Pole System

Train an actor-critic agent to balance a cart-pole system modeled in MATLAB.

Train DDPG Agent to Swing Up and Balance Pendulum with Image Observation

Train a reinforcement learning agent using an image-based observation signal.

Create 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™.

Train Agents in Simulink Environments

Train DQN Agent to Swing Up and Balance Pendulum

Train a Deep Q-network agent to balance a pendulum modeled in Simulink.

Train DDPG Agent to Swing Up and Balance Pendulum

Train a deep deterministic policy gradient agent to balance a pendulum modeled in Simulink.

Train DDPG Agent to Swing Up and Balance Pendulum with Bus Signal

Train a reinforcement learning agent to balance a pendulum Simulink model that contains observations in a bus signal.

Train DDPG Agent to Swing Up and Balance Cart-Pole System

Train a deep deterministic policy gradient agent to swing up and balance a cart-pole system modeled in Simscape™ Multibody™.

Train Custom Agents

Train Custom LQR Agent

Train an agent that uses a custom reinforcement learning algorithm.

Featured Examples