Main Content

Training and Simulation

R2026b
Train and simulate reinforcement learning agents

During training, the agent continuously updates its parameters to learn the optimal policy for a given environment. During simulation, the agent receives observations and a reward from the environment, and returns an action to the environment without updating its parameters.

Reinforcement Learning Toolbox™ provides functions for training agents and validating the training results through simulation. For an introduction to training and simulating agents, see Train Reinforcement Learning Agents.

Apps

Reinforcement Learning DesignerDesign, train, and simulate reinforcement learning agents

Functions

expand all

trainTrain reinforcement learning agents within a specified environment
rlTrainingOptionsOptions for training reinforcement learning agents
rlMultiAgentTrainingOptionsOptions for training multiple reinforcement learning agents (Since R2022a)
trainWithEvolutionStrategyTrain DDPG, TD3 or SAC agent using an evolutionary strategy within a specified environment (Since R2023b)
rlEvolutionStrategyTrainingOptionsOptions for training off-policy reinforcement learning agents using an evolutionary strategy (Since R2023b)
showVisualize a training result object in a new Reinforcement Learning Training Monitor window (Since R2024a)
trainFromDataTrain off-policy reinforcement learning agent using existing data (Since R2023a)
rlTrainingFromDataOptionsOptions to train reinforcement learning agents using existing data (Since R2023a)
showVisualize a training result object in a new Reinforcement Learning Training Monitor window (Since R2024a)
rlEvaluatorOptions for evaluating reinforcement learning agents during training (Since R2023b)
rlCustomEvaluatorCustom object for evaluating reinforcement learning agents during training (Since R2023b)
rlDataLoggerCreate either a file logger object or a monitor logger object to log training data (Since R2022b)
rlDataViewerOpen Reinforcement Learning Data Viewer tool (Since R2023a)
trainingProgressMonitorMonitor and plot training progress for deep learning custom training loops (Since R2022b)
simSimulate trained reinforcement learning agents within specified environment
rlSimulationOptionsOptions for simulating a reinforcement learning agent within an environment

Blocks

RL Agent blockRL AgentReinforcement learning agent
Policy blockPolicyReinforcement learning policy (Since R2022b)

Topics

Training and Simulation Basics

Use the Reinforcement Learning Designer App

Create and Train Default Agents

Create and Train Agents with Custom Approximators

Create and Train Agents for Custom Simulink Environments

Use Multiple Processes and GPUs

Training and Simulation Advanced

Log Training Data and Tune Hyperparameters

Multiagent Training