Custom Training
R2026bTrain and simulate reinforcement learning agents
You can implement your learning algorithm within custom agents and then train and
simulate them using train and
sim. You
can also develop custom training loops that execute your own training algorithm and
use them to train either built-in agents provided by Reinforcement Learning Toolbox™ or your custom agents.
Functions
Topics
Develop Custom Agents
- Create and Train Custom PG Agent
Create a custom PG agent and train it using the built-in train function. - Create and Train Custom LQR Agent
Create a custom agent that solves an LQR problem and train it using the built-in train function.
Use Custom Training Loops
- Train Reinforcement Learning Policy Using Custom Training Loop
Train a reinforcement learning policy using your own custom training loop. - Custom DQN Training Loop with LSTM Network
Use a custom training loop to train a DQN agent with an LSTM network. - Custom PPO Training Loop with Random Network Distillation
Use a custom training loop to train a custom PPO policy with random network distillation on a pendulum environment with sparse rewards. - Custom Training Loop with Simulink Action Noise
Use a custom training loop to train a continuous action space reinforcement learning policy in Simulink® when action noise is generated within the model. - Model-Based Reinforcement Learning Using Custom Training Loop
Create a model-based reinforcement learning agent using a custom training loop.