Main Content

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.

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
trainFromDataTrain off-policy reinforcement learning agent using existing data
rlTrainingFromDataOptionsOptions to train reinforcement learning agents using existing data
inspectTrainingResultPlot training information from a previous training session
rlDataLoggerCreate either a file logger object or a monitor logger object to log training data
rlDataViewerOpen Reinforcement Learning Data Viewer tool
FileLoggerLog reinforcement learning training data to MAT files
MonitorLoggerLog reinforcement learning training data to monitor window
trainingProgressMonitorMonitor and plot training progress for deep learning custom training loops
setupSet up reinforcement learning environment or initialize data logger object
storeStore data in the internal memory of a (file or monitor) logger object
writeTransfer stored data from the internal logger memory to the logging target
cleanupClean up reinforcement learning environment or data logger object
simSimulate trained reinforcement learning agents within specified environment
rlSimulationOptionsOptions for simulating a reinforcement learning agent within an environment
runEpisodeSimulate reinforcement learning environment against policy or agent
setupSet up reinforcement learning environment or initialize data logger object
cleanupClean up reinforcement learning environment or data logger object
FutureObject that supports deferred outputs for reinforcement learning environment simulations running on workers
fetchNextRetrieve next available unread outputs from a reinforcement learning environment simulations running on workers
fetchOutputsRetrieve results from all reinforcement learning environment simulations running on workers
cancelCancel unfinished reinforcement learning environment simulations on workers
waitWait for reinforcement learning environment simulations running on a workers to finish

Blocks

RL AgentReinforcement learning agent
PolicyReinforcement learning policy

Topics

Training and Simulation Basics

Use the Reinforcement Learning Designer App

Use Multiple Processes and GPUs

Multi-Agent Training

Train Agents to Control Double Integrator System

Train Agents to Balance Cart-Pole System

Train Agents to Swing Up and Balance Pendulum

Train Agents to Perform Control Tasks

Train Agents to Control Robots

Generate Rewards from Control Specifications

Imitation Learning

Train Agents for Automotive Applications

Other Applications

Develop Custom Agents and Training Algorithms

Deploy Agents and Policies