specify training options in reinforcement learning designer
to configure the training of an agent in the reinforcement learning designer app, specify training options on the train tab.
specify basic options
on the train tab, you can specify the following basic training options.
option | description |
---|---|
max episodes | maximum number of episodes to train the agent, specified as a positive integer. |
max episode length | maximum number of steps to run per episode, specified as a positive integer. |
stopping criteria | training termination condition, specified as one of the following values.
|
stopping value | critical value of the training termination condition in stopping criteria, specified as a scalar. |
average window length | window length for averaging the scores, rewards, and number of steps for the agent when either stopping criteria or save agent criteria specify an averaging condition. |
specify additional options
to specify additional training options, on the train tab, click more options.
in the more training options dialog box, you can specify the following options.
option | description |
---|---|
save agent criteria | condition for saving agents during training, specified as one of the following values.
|
save agent value | critical value of the save agent condition in save agent
criteria, specified as a scalar or "none" . |
save directory | folder for saved agents. if you specify a name and the folder does not exist, the app creates the folder in the current working directory. to interactively select a folder, click browse. |
show verbose output | select this option to display training progress at the command line. |
stop on error | select this option to stop training when an error occurs during an episode. |
training plot | option to graphically display the training progress in the app, specified
as one of the following values.
|
specify parallel training options
to train your agent using parallel computing, on the train tab, click . training agents using parallel computing requires parallel computing toolbox™ software. for more information, see train agents using parallel computing and gpus.
to specify options for parallel training, select use parallel > parallel training options.
in the parallel training options dialog box, you can specify the following training options.
option | description |
---|---|
parallel computing mode | parallel computing mode, specified as one of the following values.
|
transfer workspace variables to workers | select this option to send model and workspace variables to parallel workers. when you select this option, the parallel pool client (the process that starts the training) sends variables used in models and defined in the matlab® workspace to the workers. |
random seed for workers | randomizer initialization for workers, specified as one of the following values.
|
files to attach to parallel pool | additional files to attach to the parallel pool. specify names of files in the current working directory, with one name on each line. |
worker setup function | function to run before training starts, specified as a handle to a function having no input arguments. this function is run once per worker before training begins. write this function to perform any processing that you need prior to training. |
worker cleanup function | function to run after training ends, specified as a handle to a function having no input arguments. you can write this function to clean up the workspace or perform other processing after training terminates. |
the following figure shows an example parallel training configuration for the following files and functions.
data file attached to the parallel pool —
workerdata.mat
worker setup function —
mysetup.m
worker cleanup function —
mycleanup.m
see also
apps
functions
objects
related examples
- design and train agent using reinforcement learning designer
- specify simulation options in reinforcement learning designer