When training an agent using the Reinforcement Learning Toolbox, how can I use a custom stopping criterion?

4 vues (au cours des 30 derniers jours)
The current options only allow for 5 predefined choices ("AverageSteps", "AverageReward", "EpisodeReward", "GlobalStepCount", "EpisodeCount"). I want to include a stopping criterion different from these. Is there any option to do the same?
  1 commentaire
goc3
goc3 le 14 Juil 2020
I was about to ask a similar question... The "accepted" answer below doesn't actually answer the question—instead, it confirms that those are the only available stop criteria.
It would be great if additional options and/or support for custom stopping criteria were added.
As an example, for a particular application, I would like to stop training once the episode reward plateaus. It is not known beforehand at what value it will plateau, so having to set a constant before training is very limiting for any application that is programmed to be dynamic or to proceed automatically based on training results.

Connectez-vous pour commenter.

Réponses (1)

Rajani Mishra
Rajani Mishra le 6 Jan 2020
trainOpts = rlTrainingOptions(Name,Value) creates an option set for training using specified name-value pairs.
Arguments like - 'StopTrainingCriteria', 'StopTrainingValue', 'MaxEpisodes' should be specified for defining stopping criterion while training an agent.
  • StopTrainingCriteria: Specifies the termination condition. Takes one of the choices as you have mentioned
  • StopTrainingValue: Specifies the Critical value of training termination condition. Training terminates when the termination condition specified by the StopTrainingCriteria option equals or exceeds this value
  • MaxEpisodes: Specifies maximum number of episodes to train the agent, once the number of episodes reached training terminates
For more information please refer to
  1. https://www.mathworks.com/help/reinforcement-learning/ref/rltrainingoptions.html#mw_f2a4c660-a2a4-417d-9dbc-df113aa3b975
  2. https://www.mathworks.com/help/reinforcement-learning/training-and-validation.html?s_tid=CRUX_lftnav
  1 commentaire
Tuwe Löfström
Tuwe Löfström le 13 Juil 2020
So there is no way of adding a custom stopping criteria, in a similar way as you can define custom reset and step functions?

Connectez-vous pour commenter.

Produits


Version

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by